chromium / badssl.com

:lock: Memorable site for testing clients against bad SSL configs.
https://badssl.com
Apache License 2.0
2.85k stars 191 forks source link

Test for OpenSSLs badly encoded UTF8-in-OCTET STRING SubjectAltName #289

Open Spindel opened 7 years ago

Spindel commented 7 years ago

OpenSSL will, when presented with the same IDN say, räksmörgås.se do the Right thing in the Subject ( CN= ) by encoding this part as UTF8String, and simultaneously do the Wrong thing in the SubjectAltName.

The SAN should contain only Octet String which is ASCII, and is not IDN-aware, which means that it needs to be ~encoded~ punycoded to be valid.

However, OpenSSL will gladly generate and sign a cert with the correct CN, and the incorrect (utf8 inside octet string, which can be a decode error) SubjectAltName in the certificate.

This situation can be quite interesting, and is handled differently by different TLS stacks.

lgarron commented 7 years ago

Is it possible to get a publicly trusted certificate like this without violating the Baseline Requirements?

Spindel commented 7 years ago

I'll have to investigate that further if it's actually possible (or should be possible)