by

Generate Permanently Valid Self Signed Key

Once you have a DSA or ECDSA key pair, you can generate a self-signed certificate containing the public key, and signed with the private key: openssl req -x509 -new -key dsakey.pem -out cert.pem (Replace 'dsakey.pem' with 'eckey.pem' to use the EC key generated above.). Generate certificates, public and private keys with Java. I need to generate a self signed certificates at run time, sign them and import to the Java keystore. I can do this using 'keytool' and 'openssl' from command line in the following way.

Self-signed ssl certificates can be used to set up temporary ssl servers. You can use it for test and development servers where security is not a big concern. Use the form below to generate a self-signed ssl certificate and key.

About SSL Certificates

SSL certificates are required in order to run web sites using the HTTPS protocol. For professional web sites, you usually buy such a certificate from Verisign, Thawte or any other ssl certificate vendor. SSL certificates use a chain of trust, where each certificate is signed (trusted) by a higher, more credible certificate. At the top of the chain of trust are the root certificates, owned by Verisign and others. These certificates are typically shipped with your operating system or web browser.

In Internet Explorer and Firefox

When you visit a web site over HTTPS, your web browser will receive the ssl certificate for the web site. It will examine the contents of the certificate to see that is indeed valid for the domain name you are trying to visit. After that, it will verify the chain of trust. It will look at who has signed the certificate. If that certificate is a root-certificate, it will compare it against the ones shipped with the operating system. If it is a non-root certificate, it will follow the chain of trust up one more level.

Self-signed certificates

When using a self-signed certificate, there is no chain of trust. The certificate has signed itself. The web browser will then issue a warning, telling you that the web site certificate cannot be verified. Therefore, you should not use self-signed certificates for professional use, as your visitors will not trust your web site to be safe.

Buying a certificate

A real certificate is safer than a self-signed. If you wish to buy a real SSL certificate, click here.

You are here: Using Certificates in HTTPS Clusters > Generating a Self-Signed Certificate

To generate a self signed certificate in PEM format:

  1. Generate a self-signed x509 format certificate by entering this command:

openssl req -new -x509 -newkey rsa:1024 -out selfcert.pem -days 1095

This creates a self-signed certificate (selfcert.pem) that will be valid for 1095 days (about three years) andalso generates a new private key to be output into a file named privkey.pem. If you already have a private key, use - key filename instead of -newkey rsa:1024 to specify the file containing the private key.

After generating the private key, the following prompts are displayed (example responses shown):

Enter PEM pass phrase: <password> /the-settlers-7-cd-key-generator.html.

Verifying - Enter PEM pass phrase: <password>

Country Name (2 letter code) [AU]:US

State or Province Name (full name) [Some-State]:New York

Locality Name (eg, city) []:Millerton

Organization Name (eg, company) [Internet Widgits Pty Ltd]:CPS Inc.

Organizational Unit Name (eg, section) []:Engineering Common Name (eg, YOUR name) []:myclient.example.com

Email Address []:admin@example.com

Depending on the tool you use to create the certificate, you may also be asked for a challenge password and other optional information. Make sure you remember the password (and, if prompted, the challenge password) you specify, as you will need it to install the certificate.

The Common Name provided must be the DNS-resolvable fully qualified domain name (FQDN) used by the cluster. For a server certificate, when the client receives the certificate from the server, the browser will display a warning if the Common Name does not match the hostname of the request URI. For a client certificate, the Common Name in the client’s copy of the certificate is only compared to the Common Name in the copy on the server, so this can be any value.

  1. Combine the private key and certificate into one file, using a command like the following:

cat selfcert.pem privkey.pem > clustercert.pem

  1. You can now install your self signed certificate and private key file, clustercert.pem, on Equalizer and your clients, as appropriate.

Generate Permanently Valid Self Signed Key Card