Create Self-Signed SSL Certificate and Keys for Testing

For production systems you will need to get SSL certificates from a Certificate Authority. For test systems, creating a self-signed SSL certificate and keys using OpenSSL is quite easy.

You will need to have OpenSSL installed.

Create a public/private key file pair:

  1. Create a new directory on the drive Iguana is installed and give it an appropriate name (i.e., Test).

  2. Open a Command Prompt window and go to the new directory. For example

    cd Test
  3. Type the path of the OpenSSL install directory, followed by the RSA key algorithm. For example:

    c:openssl\bin\openssl genrsa -out privkey.pem 4096

You will see the key being generated:

Loading 'screen' into random state - done Generating RSA private key, 4096 bit long modulus .................................+++ ...........................................+++ e is 65537 (0x10001)
  1. Run the following command to split the generated file into separate private and public key files

  1. Use the ssh-keygen utility which is included as part of most POSIX systems.

  2. Create a new directory and give it an appropriate name (i.e., Test).

  3. Open a Command Prompt window and go to the new directory. For example:

  4. Use the rsa option to create a public private key pair (using your email as a comment):

Create a certificate file:

  1. Open a command prompt window and go to the directory you created earlier for the public/private key file. For example:

  1. Enter the path of the OpenSSL install directory, followed by the self-signed certificate algorithm. For example:

  1. Follow the instructions that appear in the screen. For example:

  1. Open a command prompt window and go to the directory you created earlier for the public/private key file. For example:

  1. Enter the path of the OpenSSL install directory, followed by the self-signed certificate algorithm. For example:

  1. Follow the instructions that appear in the screen. For example:

 

Related pages