Java encryption Technology (10)

Source: Internet
Author: User

In the Java encryption Technology (IX), we use a self-signed certificate to complete the authentication. Next, we use the Third-party CA signing authority to complete the certificate signing.

Here we use Thawte to provide a 21-day free CA certificate for the test.

1. To indicate your domain name on the website, here use www.zlex.org as the test domain name (do not use the domain name as your domain name address, the domain name is protected by law!) Please use another unregistered domain name! )。

2. If the domain name is valid, you will receive an email asking you to access Https://www.thawte.com/cgi/server/try.exe to obtain the CA certificate.

3. Retell the creation of the KeyStore.

Shell Code

Keytool-genkey-alias Www.zlex.org-keyalg Rsa-keystore D:\zlex.keystore

The password I use here is 123456.

Console output:

Console code

输入keystore密码:
再次输入新密码:
您的名字与姓氏是什么?
   [Unknown]:  www.zlex.org
您的组织单位名称是什么?
   [Unknown]:  zlex
您的组织名称是什么?
   [Unknown]:  zlex
您所在的城市或区域名称是什么?
   [Unknown]:  BJ
您所在的州或省份名称是什么?
   [Unknown]:  BJ
该单位的两字母国家代码是什么
   [Unknown]:  CN
CN=www.zlex.org, OU=zlex, O=zlex, L=BJ, ST=BJ, C=CN 正确吗?
   [否]:  Y

输入<tomcat>的主密码
         (如果和 keystore 密码相同,按回车):
再次输入新密码:

4. Export the CA certificate request from Zlex.keystore through the following command.

Shell Code

Keytool-certreq-alias www.zlex.org-file D:\zlex.csr-keystore d:\zlex.keystore-v

You will get the ZLEX.CSR file, which can be opened in Notepad with the following format:

Text Code

-----BEGIN NEW CERTIFICATE REQUEST-----
MIIBnDCCAQUCAQAwXDELMAkGA1UEBhMCQ04xCzAJBgNVBAgTAkJKMQswCQYDVQQHEwJCSjENMAsG
A1UEChMEemxleDENMAsGA1UECxMEemxleDEVMBMGA1UEAxMMd3d3LnpsZXgub3JnMIGfMA0GCSqG
SIb3DQEBAQUAA4GNADCBiQKBgQCR6DXU9Mp+mCKO7cv9JPsj0n1Ec/GpM09qvhpgX3FNad/ZWSDc
vU77YXZSoF9hQp3w1LC+eeKgd2MlVpXTvbVwBNVd2HiQPp37ic6BUUjSaX8LHtCl7l0BIEye9qQ2
j8G0kak7e8ZA0s7nb3Ymq/K8BV7v0MQIdhIc1bifK9ZDewIDAQABoAAwDQYJKoZIhvcNAQEFBQAD
gYEAMA1r2fbZPtNx37U9TRwadCH2TZZecwKJS/hskNm6ryPKIAp9APWwAyj8WJHRBz5SpZM4zmYO
oMCI8BcnY2A4JP+R7/SwXTdH/xcg7NVghd9A2SCgqMpF7KMfc5dE3iygdiPu+UhY200Dvpjx8gmJ
1UbH3+nqMUyCrZgURFslOUY=
-----END NEW CERTIFICATE REQUEST-----

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.