Skip to content

Commit

Permalink
Merge pull request #25 from njsmith/yay-idna
Browse files Browse the repository at this point in the history
Update DNSName calls in test suite for new cryptography
  • Loading branch information
njsmith committed Dec 8, 2017
2 parents bfb7834 + b94264b commit f184ade
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_trustme.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,20 @@ def test_hostname_variants():
u"*.example.org": x509.DNSName(u"*.example.org"),

# IDN
u"éxamplë.org": x509.DNSName(u"éxamplë.org"),
u"xn--xampl-9rat.org": x509.DNSName(u"éxamplë.org"),
u"éxamplë.org": x509.DNSName(u"xn--xampl-9rat.org"),
u"xn--xampl-9rat.org": x509.DNSName(u"xn--xampl-9rat.org"),

# IDN + wildcard
u"*.éxamplë.org": x509.DNSName(u"*.éxamplë.org"),
u"*.xn--xampl-9rat.org": x509.DNSName(u"*.éxamplë.org"),
u"*.éxamplë.org": x509.DNSName(u"*.xn--xampl-9rat.org"),
u"*.xn--xampl-9rat.org": x509.DNSName(u"*.xn--xampl-9rat.org"),

# IDN that acts differently in IDNA-2003 vs IDNA-2008
u"faß.de": x509.DNSName(u"faß.de"),
u"xn--fa-hia.de": x509.DNSName(u"faß.de"),
u"faß.de": x509.DNSName(u"xn--fa-hia.de"),
u"xn--fa-hia.de": x509.DNSName(u"xn--fa-hia.de"),

# IDN with non-permissable character (uppercase K)
# (example taken from idna package docs)
u"Königsgäßchen.de": x509.DNSName(u"königsgäßchen.de"),
u"Königsgäßchen.de": x509.DNSName(u"xn--knigsgchen-b4a3dun.de"),

# IP addresses
u"127.0.0.1": x509.IPAddress(IPv4Address(u"127.0.0.1")),
Expand Down

0 comments on commit f184ade

Please sign in to comment.