Java Keytools Certificate converted to OpenSSL PEM file or Keytools export private key file

Source: Internet
Author: User
Tags install openssl pkcs12

The last time and said GoDaddy health please certificate process and operation;

Now because of using Incapsula protection to use to HTTPS, when adding a website needs a custom certificate, which needs to upload private key information, because the public key can be keytool generated, so need to export private key information;

The steps to export are as follows:

One: Install OpenSSL and Openssl-devel:

Yum Install OpenSSL openssl-devel

Two: Can over Keytool export the certificate file in the format CER, where 1234567 before the Tomcat.keystore file password is generated:

1234567 -file server.cer-keystore tomcat.keystore

Three: Then through the kyetools to convert the Server.cer to a PKCS certificate file, prompting for a password, enter the password to generate the key and define the key password:

/usr/java/jre/bin/keytool-v-importkeystore-srckeystore Tomcat.keystore-srcalias Tomcat-destkeystore MY12.P12- Deststoretype PKCS12

Four: Convert PKCS files to PEM files via OpenSSL:

OpenSSL  pkcs12- in My12.p12-out Private.pem

The Incapsula need to upload the key when uploading PPRIVATE.PEM access resolution;

The upper part of the procedure may appear superfluous steps, but because use all normal all write, please pass the big God do not spray!

Java Keytools Certificate converted to OpenSSL PEM file or Keytools export private key file

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.