简体   繁体   中英

Java Keytool for SSL: CSR Aliases, Keys and Keystores

I read this article on how to use keytool to generate CSRs for your organization. It was simple and easy, but left me with a few questions that I couldn't find clear, descriptive answers to:

  • What is Java's concept of a CSR alias and why would you want to use one? Where is this alias field stored and what other tools/APIs have access to it?
  • What is the difference between a key and a keystore ?

What is Java's concept of a CSR alias and why would you want to use one? Where is this alias field stored and what other tools/APIs have access to it?

First of all, java uses keystores to keep keys (and certificates ) inside. Single keystore can hold many certificates, so you need a way to differentiate them. That's what aliases are for. Having a keystore , an alias (and a password if needed) you can get the certificate from the keystore using Java Crypto API (specifically classes like Keystore ). Here, you have a an example of how the Crypto API can be used to load a key from keystore

What is the difference between a key and a keystore?

The keystore is a container. The keys are kept inside keystores .

密钥库是一种用于保存证书和私钥的文件格式,别名用于标识密钥库中的每个条目。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM