How to issue an SSL certificate

Source: Internet
Author: User
Tags install openssl pkcs12 in domain ssl certificate

Recently doing how to make the website have SSL, have a day, now summarize

The first thing to do is to install OpenSSL and Java Keytool

Generate private keys and CSRs with OpenSSL first

openssl req -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr

You will be prompted to enter some information at the time of generation, remember to enter the information of the domain name to be authenticated in common name, such as Xxx.xxx.com

After the build, the CSR information is opened in Notepad, the information is entered into the CA certificate publisher's website, and then the certificate signed

After the completion of the name may send a compressed file to you, I use the Comodo certificate

Contains 3 files

Domain.ca-bundle

Domain.crt

domain.p7b

Must go to their website to download, they will only email you send two files, one is domain.ca-bundle another is DOMAIN.CRT

The rest is to convert p7b to PFX.

Convert p7b to CER first

OpenSSL pkcs7-print_certs-in domain.p7b-out domain.cer

Then generate a PFX with the previous generation and signature of the private and CER files

OpenSSL pkcs12-export-in Domain.cer-inkey domain.key-out domain.pfx

If you are using Tomcat,tomcat to support PFX, but I like to build it jks, so take one step

Keytool -importkeystore -srckeystore domain.pfx -srcstoretype pkcs12 -destkeystore domain.jks -deststoretype jks

Then add this certificate in Tomcat's server.xml to start the certificate and you can use the

How to issue an SSL certificate

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.