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.
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.