History log of /libcore/luni/src/test/java/libcore/javax/net/ssl/DefaultHostnameVerifierTest.java
Revision Date Author Comments
77a7e48ac80c5bb9ac4d9b6bfdecf31d46b09fd1 19-Nov-2014 Alex Klyubin <klyubin@google.com> Fix a bug in DefaultHostnameVerifier wildcard handling.

Wildcard domain name patterns of the form *.remainder are supposed to
match domain names that exactly match the remainder. Due to a bug,
the match was not exact but rather a prefix match: domain names
starting with the remainder would match too.

This CL fixes the issue.

(cherry picked from commit eecc5b7cf59b1b03ab030d01cc2c4875c8287336)

Bug: 18432707
Change-Id: I3b7715adf7a66e57fafe2a0218a73f4ff2dd4182
eecc5b7cf59b1b03ab030d01cc2c4875c8287336 19-Nov-2014 Alex Klyubin <klyubin@google.com> Fix a bug in DefaultHostnameVerifier wildcard handling.

Wildcard domain name patterns of the form *.remainder are supposed to
match domain names that exactly match the remainder. Due to a bug,
the match was not exact but rather a prefix match: domain names
starting with the remainder would match too.

This CL fixes the issue.

Bug: 18432707
Change-Id: Ic2fccbfeac4f5d6e71b49ecbd36c248214baebad
2a6f23ff8690ac2f025588a360547ce96cde0943 29-Jun-2013 Elliott Hughes <enh@google.com> Add java.nio.charsets.StandardCharsets.

Bug: 3484927
Change-Id: I5820267491b850b8fcc696fa48962710de123009
1331404bf45cb2f220ee9aa2c0c108ce59453a74 21-Dec-2012 Brian Carlstrom <bdc@google.com> Should favor last CN when working with distinguished names

Bug: 7894348
Bug: http://code.google.com/p/android/issues/detail?id=41662
Change-Id: I3814d653b628f6af12ce1ba59b39b1c7cc45e124
57d73e33dc039f6fff06db52106a358192868060 27-Dec-2011 Jesse Wilson <jessewilson@google.com> Move the frameworks/base hostname verifier into libcore. Part 1/2

This replaces our libcore's DefaultHostnameVerifier.

The frameworks/base verifier is better exercised because it's used by
the browser. The libcore one includes a few dubious behaviors: parsing
toString() and non-standard TLD validation.

Behavior changes in libcore:
- A wildcard cert like *.co.uk would be honored. This would require
a rogue CA. We had a comment documenting that other SSL clients don't
do this.
- Wildcards in substrings like "f*.android.com" are now supported.
- Wildcards match without a child domain: "*.android.com" will match
"android.com".
- If an alt name is present, the CN is not used.
- subject alt name IP addresses are supported.

This also moves the tests into libcore.

Bug: http://b/5619726
Change-Id: Ia952c33f8009ee3c5ed5935ae5f74b6093b1b8e0