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
2 files changed