简体   繁体   English

数字证书:签名与验证?

[英]Digital certificates: signing vs verifying?

I am trying to understand the two main uses of digital certificates (such as SSL certs), which are signing and verification (I believe). 我试图了解数字证书的两个主要用途(例如SSL证书),这是签名验证 (我相信)。

In the case of SSL between a client and a web server, my understanding of certificate verification is that the browser contacts the server at a URL using HTTPS. 对于客户端和Web服务器之间的SSL,我证书验证的理解是浏览器使用HTTPS在URL上联系服务器。 The server then presents the browser with its SSL certificate. 然后,服务器向浏览器显示其SSL证书。 The browser must then verify that the SSL certificate is valid and that it belongs to the same domain as the domain in the URL. 然后,浏览器必须验证 SSL证书是否有效,以及它是否与URL中的域属于同一域。

Again, in the case of SSL between a client and a web server, my understanding of certificate signing is that the client (browser) first verifies that the server's SSL cert is valid, and if it is, the browser places the cert in its own trust store (some local, embedded DB). 同样,对于客户端和Web服务器之间的SSL,我证书签名的理解是客户端(浏览器)首先验证服务器的SSL证书是否有效,如果是,浏览器将证书放在自己的证书中信任存储(一些本地,嵌入式数据库)。 Subsequent request to this domain will first check to see if the server's SSL cert is in the client's trust store, and if it is, then verification is no longer required. 对该域的后续请求将首先检查服务器的SSL证书是否在客户端的信任库中,如果是,则不再需要验证。

Am I more or less correct here, or am I way off base? 我在这里或多或少是正确的,还是我离开基地?

You're pretty much correct about verification. 你对验证非常正确。 I would add that the browser also tries to verify the cert against a CA (Certificate Authority) but this can be waived by the user. 我想补充说,浏览器还尝试针对CA(证书颁发机构)验证证书,但用户可以放弃。

Beautifully explained here How are ssl certificates verified? 这里精美解释如何验证ssl证书?

Signing is a different thing. 签名是另一回事。 When an applicant (eg web server) wants a CA to sign a certificate for it, it creates a key pair, private key and public key, and then prepares a CSR (Certificate Signing Request) containing among other things, the previously created public key. 当申请人(例如Web服务器)希望CA为其签署证书时,它会创建密钥对,私钥和公钥,然后准备CSR(证书签名请求),其中包含先前创建的公钥。 Then the CA then creates a signed certificate (using its own private key), that can be verified by any entity that knows this CA's public key. 然后,CA然后创建签名证书(使用其自己的私钥),任何知道此CA的公钥的实体都可以验证该证书。 Web browsers have a list of the most common CA's pre-installed. Web浏览器具有预安装的最常见CA的列表。

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

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