如果从对等方收到证书:
应该抛出什么错误?不可信证书还是过期证书?我似乎找不到相关的RFC的建议。
发布于 2019-04-19 11:32:17
不可信证书还是过期证书?
如果严格按照RFC 5280命令执行,则应返回“不可信证书”。
更具体地说,第6.1.3节从
The basic path processing actions to be performed for certificate i (for all i in [1..n]) are listed below. (a) Verify the basic certificate information. The certificate MUST satisfy each of the following: (1) The signature on the certificate can be verified using working\_public\_key\_algorithm, the working\_public\_key, and the working\_public\_key\_parameters. (2) The certificate validity period includes the current time.
当RFC 5280从签名者转到收货人时,当前的working_public_key是所有可信CA (第6.1.2 (h)节)中的一个。由于所讨论的CA不受信任,任何公钥都不会产生成功的验证。因为这是在过期前检查的,所以应该会产生错误。
请注意,从密码学的角度来看,这也是有意义的,因为您总是希望在解析数据之前确保数据是真实的,以避免恶意数据(如恶意构建的证书)破坏和利用解析器。
https://crypto.stackexchange.com/questions/68889
复制相似问题