简体   繁体   English

适用于SSL的Java Keytool:CSR别名,密钥和密钥库

[英]Java Keytool for SSL: CSR Aliases, Keys and Keystores

I read this article on how to use keytool to generate CSRs for your organization. 我看了这个文章就如何使用keytool来生成您的组织的客户服务代表。 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? Java的CSR alias的概念是什么?为什么要使用alias Where is this alias field stored and what other tools/APIs have access to it? 此别名字段存储在哪里,还有哪些其他工具/ API可以访问它?
  • What is the difference between a key and a keystore ? keykeystore什么区别?

What is Java's concept of a CSR alias and why would you want to use one? Java的CSR别名的概念是什么?为什么要使用别名? Where is this alias field stored and what other tools/APIs have access to it? 此别名字段存储在哪里,还有哪些其他工具/ API可以访问它?

First of all, java uses keystores to keep keys (and certificates ) inside. 首先,java使用密钥库密钥 (和证书 )保留在内部。 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 ). 具有密钥库别名 (如果需要,还需要密码),您可以使用Java Crypto API (特别是类似Keystore类)从密钥库中获取证书 Here, you have a an example of how the Crypto API can be used to load a key from keystore 在这里,您有一个示例如何使用Crypto API从密钥库加载密钥示例

What is the difference between a key and a keystore? 密钥和密钥库有什么区别?

The keystore is a container. 密钥库是一个容器。 The keys are kept inside keystores . 密钥保存在密钥库中

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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