Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Firstly:</p> <p>The "principal mismatch" indicates that the common name of the certificate on the secured server does not match the DNS name that you are connecting to.</p> <p>Considering that you are making a connect to localhost (127.0.0.1) there will most certainly be a mismatch. Flash sockets are particularly strict when it comes to making secure connections and there is no mechanism to override security features unlike other runtimes (e.g. .NET and Java). The following must be true:</p> <ol> <li>The certificate common name mush match the DNS name (there is a relaxation here for 'star' certs i.e. a cert for <code>*.bob.com</code> is considered valid for <code>mr.bob.com</code>)</li> <li>The certificate must be valid in terms of expiry and trust chain</li> </ol> <p>Secondly:</p> <p>You seem to have some misconception on how certificates work. You do not need to add any certificates using the <code>addBinaryChainBuildingCertificate()</code> method if the server certificate is issued by a trusted root authority i.e. the certificate that signed the server certificate is in the local trust store of the target device.</p> <p>To illustrate:</p> <ul> <li>I have a certificate for <code>this.is.awesome.com</code> installed on my server and a DNS entry that resolves <code>this.is.awesome.com</code> to my server's IP Address</li> <li>This certificate is issued by the Entrust L1C certificate authority.</li> <li>The L1C certificate is in turn issued by the Entrust 2048 root authority.</li> </ul> <p>On my PC I have the Entrust 2048 Root authority installed in my Trusted Root certificate store. However I do not have the L1C certificate installed. When I attempt to connect to <code>this.is.awesome.com</code> the connection will fail as the server certificate cannot be validated against the L1C authority.</p> <p>If I add the DER encoded L1C certificate using <code>addBinaryChainBuildingCertificate()</code> then the connection will succeed. The server certificate will be validated against the L1C certificate which will in turn be validated against the 2048 Root certificate which is a trusted root.</p> <p>To summarize:</p> <p>Your connection issues seem to stem from your attempt to connect to localhost. Try adding an entry to your HOSTS file that maps the name on your certificate to 127.0.0.1 and then connecting to that name. If that fails check the issuer chain on your certificate and add the chain of issuers by calling <code>addBinaryChainBuildingCertificate()</code> once for each issuing certificate in the chain. The final or root certificate should be marked as such by passing <code>true</code> as the second parameter to <code>addBinaryChainBuildingCertificate()</code></p>
    singulars
    1. This table or related slice is empty.
    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.
    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