Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The Common Name (CN) field of the SSL certificate should be the DNS name of the host you are are trying to connect to. You are "Trusting" the "<strong><em>Trusted</em></strong> Root Certificate Authorites" that they will not issue a certificate with a CN without validating ownership of DNS name listed in the CN. </p> <p>You have bypassed this by manually adding a Certificate Authority (CA) to the Trusted list. So the computer trusts your personal CA that the certificate it received from the server is authorized to be used for whatever CN listed on the certificate.</p> <p>A attacker can not make a "Fake" certificate as the CA who issued the unauthorized certificate is not "Trusted" so the validation fails.</p> <hr> <p>This is how coperate proxies often work. The IT department installs a CA on the workstations. When you make a SSL request it goes through the proxy, when the reply comes back the proxy intercepts "<code>CN=*.google.com</code> Signed by VeriSign" and sends to your workstation "<code>CN=*.google.com</code>, Signed by XYZ Corperate Proxy". Because the IT <strong>pre-installed</strong> the Trusted Root CA the browser does not complain. </p> <p>However if you use some browser that does not use the normal store, or does not have CA installed you would get a certificate error as your computer would see the "Signed by XYZ Coperate Proxy" cert, not know who that CA is, then return <a href="http://msdn.microsoft.com/en-us/library/ms145055.aspx" rel="nofollow"><code>RemoteCertificateChainErrors</code></a> on the <code>sslPolicyErrors</code> argument.</p> <hr> <p>Code example of checking the CA's hash.</p> <pre><code>if (sslPolicyErrors == SslPolicyErrors.None) { var apiCertHash = new byte[] { 0x79, 0x04, 0x15, 0xC5, 0xC4, 0xF1, 0x6A, 0xA7, 0xC9, 0x12, 0xBB, 0x23, 0xED, 0x5A, 0x60, 0xA7, 0x92, 0xA8, 0xD5, 0x94 }; if(chain.ChainElements.Count &gt; 0) { //Not 100% if the root is first or last in the array. Don't have the program running to check. var certHash = chain.ChainElements[chain.ChainElements.Count - 1].Certificate.GetCertHash(); if (certHash.Length == apiCertHash.Length) { for (var idx = 0; idx &lt; certHash.Length; idx++) { if (certHash[idx] == apiCertHash[idx]) { return true; } } } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload