简体   繁体   English

有没有办法将CA颁发的证书与存储的CSR进行比较?

[英]Is there a way to compare a CA issued Certificate against the CSR stored?

I would like to know if there is a way ( in JAVA ) to compare the CA issued certificate for a corresponding CSR against the CSR itself. 我想知道(在JAVA中)是否有一种方法可以将CA颁发的对应CSR的证书与CSR本身进行比较。 To be more precise; 更准确地说; DN comparison or the comparing the Public Key? DN比较还是比较公钥?

I doubt if the public key entity of the CSR could be compared with that of the Certificate's public Key. 我怀疑是否可以将CSR的公钥实体与证书的公钥实体进行比较。 Is that possible? 那可能吗?

You could use the CA issued certificate to validate the digital signature in the CSR. 您可以使用CA颁发的证书来验证CSR中的数字签名。 Every CSR is signed by the private key corresponding to the public key in the CSR. 每个CSR均由与CSR中的公钥相对应的私钥签名。 If you can use the public key from the certificate to validate the signature, you can ensure they are related. 如果可以使用证书中的公钥来验证签名,则可以确保它们之间存在关联。

You could also compare the public key in the CSR with the public key in the certificate. 您还可以将CSR中的公钥与证书中的公钥进行比较。 I would avoid DN comparison, as some CA software allows the registration authority to modify the DN prior to issuing the certificate. 我会避免进行DN比较,因为某些CA软件允许注册机构在颁发证书之前修改DN。 So, you could conceivably end up with a cert that has a DN that differs from the one in the CSR, even though they are directly related. 因此,可以想象,最终获得的DN与CSR中的DN有所不同,即使它们是直接相关的。

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

相关问题 可以将CA(客户端)颁发的证书与“自签名”(服务器)证书进行通信吗? - Can communicate a certificate issued by a CA (client) with a certificate Self Signed (server)? 在 Netty 中,我想验证证书是否由 CA 颁发 - In Netty, I want to verify whether the certificate is issued by a CA or not 2路TLS和CA签名证书 - 2 way TLS with CA signed certificate 如何在JAVA中将CERTIFICATE与CSR相匹配 - How can i match a CERTIFICATE against CSR in JAVA 在Java中针对CA验证X.509证书 - Validate X.509 certificate against CA in Java JAVA-Android-根据CA证书验证X509Certificate(颁发者证书) - JAVA-Android- Validating the X509Certificate Against CA Certificate(Issuer Certificate) 根据密钥库验证CSR - Validate CSR against keystore 无法创建CSR证书 - Unable to create CSR certificate 有没有办法使用cdk创建没有CA(多账户注册)的证书? - Is there a way to create a certificate without CA (multi-account registration) with cdk? 如何修复“javax.net.ssl.SSLHandshakeException:TLS 服务器证书在 2019 年 4 月 16 日之后颁发并由不受信任的旧版赛门铁克根 CA 锚定” - How to fix “javax.net.ssl.SSLHandshakeException: TLS Server certificate issued after 2019-04-16 and anchored by a distrusted legacy Symantec root CA”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM