- Download and Install OpenSSL
- Create a Self Signed Digital Certificate
- Open the Command Prompt
- Create a directory
mkdir C:\Bitbucket\JWT
- Go to JWT directory
cd C:\Bitbucket\JWT
- Generate a private key, and store it in a file called server.key
openssl genpkey -des3 -algorithm RSA -pass pass:MY_PASS -out server.pass.key -pkeyopt rsa_keygen_bits:2048
openssl rsa -passin pass:MY_PASS -in server.pass.key -out server.key
- Now delete the server.pass.key file from the C:\Bitbucket\JWT directory
- Generate a certificate signing request using the server.key file. Store the certificate signing request in a file called server.csr
openssl req -new -key server.key -out server.csr
- Enter these details one by one
- Country Code:
- State or Province:
- Locality:
- Organization Name:
- Organizational Unit Name:
- Common Name:
- Email Address:
- Challenge Password:
- Optional Company Name:
- Generate a self-signed digital certificate from the server.key and server.csr files. Store the certificate in a file called server.crt
openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt