Convert the Java Keytools certificate to Openssl PEM file or keytools to export the private key file, keytoolspem

Source: Internet
Author: User
Tags pkcs12

Convert the Java Keytools certificate to Openssl PEM file or keytools to export the private key file, keytoolspem

The process and operation of requesting a certificate from a Godaddy user was mentioned above;

Because Incapsula is used for https protection, you need to customize the certificate when adding a website. You need to upload the private key information. Because the public key can be generated through keytool, You need to export the private key information;

The export procedure is as follows:

I. Install openssl and openssl-devel:

Yum-y install openssl-devel

Ii. You can use keytool to export the Certificate file cer format. The tomcat. keystore File Password is generated before 1234567:

/Usr/java/jre/bin/keytool-export-alias tomcat-storepass 1234567-file server. cer-keystore tomcat. keystore

Iii. Switch server. cer To The PKCS Certificate file through kyetools, and prompt that a password is required. Enter the password and define the key password when generating the key:

/Usr/java/jre/bin/keytool-v-importkeystore-srckeystore tomcat. keystore-srcalias tomcat-destkeystore my12.p12-deststoretype PKCS12

4. Use openssl to convert a pkcs file to a PEM file:

Openssl pkcs12-in my12.p12-out private. pem

Then, when the incapsula needs to upload the key, upload pprivate. pem to access the file;

 

There may be additional steps in the previous steps, but because everything is normal, please do not spray!

 

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.