development:openssl
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| development:openssl [2016/11/12 03:25] – anthonysena | development:openssl [2016/11/12 03:47] (current) – anthonysena | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| This page will detail how to use [[https:// | This page will detail how to use [[https:// | ||
| - | ===== Creating a Certificate | + | Before moving ahead, please make sure that you have created your keystore and CSR (Certificate |
| - | The following link describes the steps for creating | + | ==== Creating |
| - | [ CA_default | + | The following link describes the steps for creating a [[https:// |
| - | # Directory and file locations. | + | |
| - | dir = C:\\My Projects\\keystore\\root\\ca | + | |
| - | certs = $dir\\certs | + | |
| - | crl_dir | + | |
| - | new_certs_dir | + | |
| - | database | + | |
| - | serial | + | |
| - | RANDFILE | + | |
| + | [ 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.1478921131.txt.gz · Last modified: by anthonysena
