'The fields of a `subjectAltName` extension on an X509 may contain NUL
bytes and this value is reflected in the string representation of the
extension object.'

def test_nullbyte_subjectAltName(self):

    cert = load_certificate(FILETYPE_PEM, nulbyteSubjectAltNamePEM)
    ext = cert.get_extension(3)
    self.assertEqual(ext.get_short_name(), b('subjectAltName'))
    self.assertEqual(b('DNS:altnull.python.org\x00example.com,    email:null@python.org\x00user@example.org,    URI:http://null.python.org\x00http://example.org,    IP    Address:192.0.2.1,    IP    Address:2001:DB8:0:0:0:0:0:1\n'), b(str(ext)))
