Installing a Signed SSL Certificate Provided by Authorities
- /opt/aspera/common/apache/conf/server.crt
- /opt/aspera/common/apache/conf/server.key
-
Enter the OpenSSL command to generate your Private Key and Certificate Signing Request
(CSR).
Run the following command (where key_name.key is the name of the unique key that you are creating and csr_name.csr is the name of your CSR):
After entering the command, you are prompted to enter several pieces of information, which are the certificate's X.509 attributes.$ openssl req -new -nodes -newkey rsa:2048 -keyout key_name.key -out csr_name.csr
Important: The Common Name field must be filled in with the fully qualified domain name of the server to be protected by SSL. If you are generating a certificate for an organization outside of the US, see https://www.iso.org/obp/ui/#search/code/ for a list of 2-letter, ISO country codes.Generating a 1024 bit RSA private key ....................++++++ ................++++++ writing new private key to 'my_key_name.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [US]:Your_2_letter_ISO_country_code State or Province Name (full name) [Some-State]:Your_State_Province_or_County Locality Name (eg, city) []:Your_City Organization Name (eg, company) [Internet Widgits Pty Ltd]:Your_Company Organizational Unit Name (eg, section) []:Your_Department Common Name (i.e., your server's hostname) []:secure.yourwebsite.com Email Address []:johndoe@yourwebsite.com
Note: You are prompted to enter "extra" attributes, including an optional challenge password. Manually entering a challenge password when starting the server can be problematic in some situations (for example, when starting the server from the system boot scripts). You can skip entering values for any extra attribute by hitting the "enter" button.... Enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
After finalizing the attributes, the private key and CSR will be saved to your root directory.
Important: If you make a mistake when running the OpenSSL command, you may discard the generated files and run the command again. After successfully generating your key and Certificate Signing Request, be sure to guard your private key, as it cannot be re-generated. -
Send CSR to your signing authority.
You now need to send your unsigned CSR to a Certifying Authority (CA). Once the CSR has been signed, you have a real Certificate. Follow the key provider's instructions to generate and submit both your private key and the Certificate Signing Request (CSR) to acquire the certificate.
Important: Some Certificate Authorities provide a Certificate Signing Request generation tool on their Website. Check with your CA for additional information.At this point, you may need to generate a self-signed certificate because:
- You don't plan on having your certificate signed by a CA.
- You wish to test your new SSL implementation while the CA is signing your certificate.
-
Store your certificates on your machine.
For example:
- ~/my_server.crt
- ~/my_server.key
Your certificate provider may require you to also install an Intermediate CA Certificate file. Copy the file to the following location:
/opt/aspera/common/apache/conf/server-ca.crt
-
Install the SSL certificate with the following command:
$
asctl apache:install_ssl_cert cert_file key_file [chain_file]For example:$
asctl apache:install_ssl_cert ~/my_server.crt ~/my_server.key /opt/aspera/common/apache/conf/server-ca.crtYou can find the installed certificate at the following location:- /opt/aspera/common/apache/conf/server.crt
- /opt/aspera/common/apache/conf/server.key
-
Rename the certificate files provided with Shares.
Locate the original cert.pem and cert.key files in /opt/aspera/shares/etc/nginx. Rename them as follows:
# cd /opt/aspera/shares/etc/nginx # mv cert.pem cert.pem.orig # mv cert.key cert.key.orig
-
After receiving your signed certificate from your CA, if the CA requires a bundle or
intermediate certificate, you need to concatenate the certificates for them to
work with nginx. Bundle your intermediate certificate with your primary
certificate.
# cat your_domain_name.crt DigiCertCA.crt >> cert.pem
- Copy your new SSL cert files to /opt/aspera/shares/etc/nginx. If the files are named differently, rename the cert file cert.pem and rename the key file cert.key.
-
Restart the web service.
Restart nginx as follows:
# /opt/aspera/shares/sbin/sv restart nginx