# Steps to generate a certificate file in linux. # Keep a common password whenever asked during the process. Commonly used password is "changeit". # Minimum requirement - openssl and jdk must be installed.# In this example domain name used for demonstration is "localhost".# Run these commands in the same order as written.# Generate a key
openssl genrsa -des3 -out localhost.key 1024
# Generate a local certificate sigining request.# In this step some information related to company will be asked to enter, keep in mind that "common name" must be the domain name.
openssl req -new -key localhost.key -out localhost.csr
# Generate a certificate from csr file, it has validity of 365 days.
openssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -out localhost.crt
#...