SSL 和证书如何在服务器和浏览器之间工作

Tho*_*mas 2 ssl certificate

我不太了解 SSL 和证书在服务器和浏览器之间如何工作。所以我从这个网站http://www.tldp.org/HOWTO/SSL-Certificates-HOWTO/x64.html上写了一些关于这个问题的文章,无论他们说的对我来说不是很清楚

他们说

1) A browser requests a secure page (usually https://).

2) The web server sends its public key with its certificate.

3) The browser checks that the certificate was issued by a trusted party 
   (usually a trusted root CA), that the certificate is still valid and that the 
   certificate is related to the site contacted.

4) The browser then uses the public key, to encrypt a random symmetric 
   encryption key and sends it to the server with the encrypted URL required 
   as well as other encrypted http data.

5) The web server decrypts the symmetric encryption key using 
   its private key and uses the symmetric key to decrypt the URL and http data.

6) The web server sends back the requested html document and 
   http data encrypted with the symmetric key.

7) The browser decrypts the http data and html document using 
   the symmetric key and displays the information.
Run Code Online (Sandbox Code Playgroud)

见第2点

浏览器请求安全页面,网络服务器只需将带有证书的公钥发送给浏览器,而没有页面或数据?

如果可能,请讨论有关浏览器请求任何 https 页面时会发生什么情况的问题。谢谢

use*_*421 5

1) 浏览器请求安全页面(通常为 https://)。

不会。浏览器会协商 TLS 连接,其中会执行步骤 2 和 3 以及其他一些步骤。然后浏览器请求安全页面并执行第 6 步。

2) Web 服务器发送其公钥及其证书。

3) 浏览器检查证书是否由受信任方(通常是受信任的根 CA)颁发、证书是否仍然有效以及证书是否与所联系的站点相关。

好的到这里。

4) 浏览器然后使用公钥来加密随机对称加密密钥,并将其与所需的加密 URL 以及其他加密的 http 数据一起发送到服务器。

5) Web服务器使用其私钥解密对称加密密钥

4和5完全是幻想,但却是常见的错觉。真正发生的是密钥协商算法,其精确性质取决于密码套件,但从涉及传输会话密钥。

并使用对称密钥解密 URL 和 http 数据。

6) Web服务器发回请求的html文档和使用对称密钥加密的http数据。

7) 浏览器使用对称密钥解密http数据和html文档并显示信息。

正确的。