development:openssl
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| development:openssl [2016/11/12 03:08] – created anthonysena | development:openssl [2016/11/12 03:47] (current) – anthonysena | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Using OpenSSL to create an SSL Certificate ====== | ====== Using OpenSSL to create an SSL Certificate ====== | ||
| + | This page will detail how to use [[https:// | ||
| + | |||
| + | Before moving ahead, please make sure that you have created your keystore and CSR (Certificate Signing Request) as detailed in the steps [[development: | ||
| + | |||
| + | ==== Creating a Certificate Authority ==== | ||
| + | |||
| + | The following link describes the steps for creating a [[https:// | ||
| + | |||
| + | [ CA_default ] | ||
| + | # Directory and file locations. | ||
| + | dir = C: | ||
| + | certs = $dir\\certs | ||
| + | crl_dir | ||
| + | new_certs_dir | ||
| + | database | ||
| + | serial | ||
| + | RANDFILE | ||
| + | |||
| + | Note the change to the '' | ||
| + | |||
| + | ==== Signing the certificate ==== | ||
| + | |||
| + | Using the intermediate pair created in the previous step, we can now create a server certificate using the following OpenSSL command | ||
| + | |||
| + | openssl ca -config .\root\ca\intermediate\openssl.cnf -extensions server_cert -days 7300 -notext -md sha256 -in C: | ||
| + | | ||
| + | Next we can create the .p7b file that will be used to store in the keystore: | ||
| + | |||
| + | openssl crl2pkcs7 -nocrl -certfile C: | ||
| + | |||
| + | ==== Installing into the keystore ==== | ||
| + | |||
| + | Before we can install the certificate, | ||
| + | |||
| + | Root: | ||
| + | |||
| + | keytool -import -alias root -keystore keystore.jks -trustcacerts -file .\root\ca\certs\ca.cert.pem | ||
| + | |||
| + | Intermediate: | ||
| + | |||
| + | keytool -import -alias intermed -keystore keystore.jks -trustcacerts -file .\root\ca\intermediate\certs\intermediate.cert.pem | ||
| + | |||
| + | Now we can import the certificate for the application: | ||
| + | |||
| + | keytool -import -alias webapi -keystore keystore.jks -trustcacerts -file C: | ||
development/openssl.1478920137.txt.gz · Last modified: by anthonysena
