【问题标题】:How SSL and Certificates work between server & browserSSL 和证书如何在服务器和浏览器之间工作
【发布时间】:2020-03-20 21:12:36
【问题描述】:

我不太了解 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.

见第2点

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

如果可能,请讨论浏览器请求任何 https 页面时会发生什么。谢谢

【问题讨论】:

    标签: ssl certificate


    【解决方案1】:

    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 文档使用 对称密钥并显示信息。

    正确。

    【讨论】:

    • 您能否详细说明“谁的确切性质取决于密码套件”?
    【解决方案2】:

    TLS 握手在任何 HTTP 请求发送之前发生(并且完成)。握手涉及在客户端和服务器之间发送和返回的几条消息。

    这里有更多detailed description of SSL/TLS handshake

    因此,只有在 SSL/TLS 层准备好之后才会发送任何 HTTP 请求。否则会带来安全风险。

    【讨论】:

    • 链接中的第 3 点不正确,并且关于如何协商会话密钥非常模糊。公钥不能用于签署任何东西,并且会话密钥被传输的含义也不正确。
    猜你喜欢
    • 2012-12-04
    • 1970-01-01
    • 2021-12-16
    • 2013-05-24
    • 1970-01-01
    • 2018-05-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多