Java SSL:使用openSSL创建并使用keytool安装的CSR文件
我用openSSL命令创建了CSR,并购买了Java SSL:使用openSSL创建并使用keytool安装的CSR文件,java,tomcat,ssl,https,openssl,Java,Tomcat,Ssl,Https,Openssl,我用openSSL命令创建了CSR,并购买了crt文件 openssl genrsa -out private-key.pem 2048 openssl req -new -key private-key.pem -out csr.pem 使用keystore命令安装这个文件可以吗,因为我没有使用keytool创建CSR文件(而是使用openSSL创建的) 另一个问题是我从可信证书生成公司得到了三个文件。那么,如何确定哪一个是主要的、根的、中间的crt文件呢?文件名本身没有提到文件类型(根,
crt
文件
openssl genrsa -out private-key.pem 2048
openssl req -new -key private-key.pem -out csr.pem
使用keystore
命令安装这个文件可以吗,因为我没有使用keytool创建CSR文件(而是使用openSSL创建的)
另一个问题是我从可信证书生成公司得到了三个文件。那么,如何确定哪一个是主要的、根的、中间的crt文件呢?文件名本身没有提到文件类型(根,中间)。我必须根据crt
文件类型运行以下命令
keytool -import -alias root -keystore tomcat.keystore -trustcacerts -file [name of the root certificate]
keytool -import -alias intermed -keystore tomcat.keystore -trustcacerts -file [name of the intermediate certificate]
keytool -import -alias tomcat -keystore tomcat.keystore -trustcacerts -file [name of the certificate]
可以使用keystore命令安装它吗
使用keytool创建CSR文件(但使用openSSL创建)
您还必须将私钥导入密钥库。否则密钥库将毫无用处
有两种方法可以做到这一点:
- 根CA证书始终具有相同的SubjectDN和IssuerDN李>
- 中间CA将根CA的SubjectDN作为其IssuerDN和另一个SubjectDN李>
- SSL证书将中间CA的SubjectDN作为其颁发者DN,域名作为其SubjectDN的一部分
openssl x509 -noout -subject -issuer -nameopt RFC2253 -inform DER -in <cert-file>
opensslx509-noout-subject-issuer-nameopt RFC2253-notify DER-in
或
openssl x509-noout-subject-issuer-nameopt RFC2253-notify PEM-in
三个文件的keytool
输出是什么?@TimBiegeleisen我没有执行命令,因为我认为如果执行不正确,会在系统中造成混乱。我要继续执行吗?请看一下这个网站:@TimBiegeleisen该URL没有提供识别文件类型的信息我不熟悉“文件类型”是SSL证书的标准属性。“文件类型”是别名吗?
openssl x509 -noout -subject -issuer -nameopt RFC2253 -inform PEM -in <cert-file>