Difference between https protocol and SSL Certificate

前端 未结 4 1012
名媛妹妹
名媛妹妹 2021-01-30 06:23

What is difference between https protocol and SSL Certificate that we use in web browser?

Aren\'t both of these used to encrypt communication between client (browser) an

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-30 07:21

    HTPS is the new HTTPS. HTTPS is highly vulnerable to SSL Stripping / MITM (man in the middle). to quote adam langley's (google) blog imperial violet:

    "HTTPS tends to cause people to give talks mocking certificate security and the ecosystem around it. "

    The problem is that the page isn't served over HTTPS. It should have been, but when a user types a hostname into a browser, the default scheme is HTTP. The server may attempt to redirect users to HTTPS, but that redirect is insecure: a MITM attacker can rewrite it and keep the user on HTTP, spoofing the real site the whole time. The attacker can now intercept all the traffic to this perfectly well configured and secure website.

    This is called SSL stripping and it's terribly simple and devastatingly effective. We probably don't see it very often because it's not something that corporate proxies need to do, so it's not in off-the-shelf devices. But that respite is unlikely to last very long and maybe it's already over: how would we even know if it was being used?

    In order to stop SSL stripping, we need to make HTTPS the only protocol. We can't do that for the whole Internet, but we can do it site-by-site with HTTP Strict Transport Security (HSTS).

    HSTS tells browsers to always make requests over HTTPS to HSTS sites. Sites become HSTS either by being built into the browser, or by advertising a header:

    Strict-Transport-Security: max-age=8640000; includeSubDomains

    The header is in force for the given number of seconds and may also apply to all subdomains. The header must be received over a clean HTTPS connection.

    Once the browser knows that a site is HTTPS only, the user typing mail.google.com is safe: the initial request uses HTTPS and there's no hole for an attacker to exploit.

    (mail.google.com and a number of other sites are already built into Chrome as HSTS sites so it's not actually possible to access accounts.google.com over HTTP with Chrome - I had to doctor that image! If you want to be included in Chrome's built-in HSTS list, email me.)

    HSTS can also protect you, the webmaster, from making silly mistakes. Let's assume that you've told your mother that she should always type https:// before going to her banking site or maybe you setup a bookmark for her. That's honestly more than we can, or should, expect of our users. But let's say that our supererogatory user... ]

    because of obstructing/very stupid link-rules for new users on stackoverflow i cannot give you the rest of adam's answer and you'll have to visit adam langley's blog yourself at https://www.imperialviolet.org/2012/07/19/hope9talk.html

    "Adam Langley works on both Google's HTTPS serving infrastructure and Google Chrome's network stack."

提交回复
热议问题