Keytool tool Use

Source: Internet
Author: User

1. Create a certificate
1 keytool -genkeypair -alias "cas"-keyalg "RSA"-keystore "F:\sync\java\Keys\cas.keystore"

1, "First name and surname" should be the domain name, if the name is lost, and the real run when the domain name does not match, will be problematic;
2, re-enter the password, the first input is the key store (keystore) password, the second time entered is the password of the certificate entry
3. keystore file is a key pair (private key and public key)

12345678910111213141516 -certreq 生成证书请求-changealias 更改条目的别名-delete删除条目-exportcert 导出证书-genkeypair 生成密钥对-genseckey 生成密钥-gencert 根据证书请求生成证书-importcert 导入证书或证书链-importpass 导入口令-importkeystore 从其他密钥库导入一个或-keypasswd 更改条目的密钥口令-list 列出密钥库中的条目-printcert 打印证书内容-printcertreq 打印证书请求的内容-printcrl 打印 CRL 文件的内容-storepasswd 更改密钥库的存储口令
2. View KeyStore
1 keytool -list -keystore "F:\sync\java\Keys\cas.keystore"
3. Export to certificate file
1 keytool -export -alias cas -file "F:\sync\java\Keys\cas.crt"-keystore "F:\sync\java\Keys\cas.keystore"

1. The certificate file contains the public key, the name, and the digital signature of the Certificate Authority Center

4. Import the certificate information
1 keytool -import -keystore "F:\sync\java\Keys\cas.keystore"-file "F:\sync\java\Keys\cas.crt"
5. View certificate Information
1 keytool -printcert -file "F:\sync\java\Keys\cas.crt"
6. Delete entries in the KeyStore
1 keytool -delete -keystore "F:\sync\java\Keys\cas.keystore"-alias cas
7. Modify the password for the certificate entry
1 keytool -keypasswd -alias cas -keystore "F:\sync\java\Keys\cas.keystore"




From for notes (Wiz)

Keytool tool Use

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.