[RESTRICT AUTOMERGE] Track behavior change in default HostnameVerifier.

Oreo MR1 will no longer support hostnames in the CN field of
X.509 certificates after the next security bulletin, so this
CL cherry-picks the relevant test changes from Pie.

Original change description:
The default HostnameVerifier now ignores any CommonName
in the certificate provided by the server, even when no
subjectAltName is present.

As well as the cherrypick for the CommonName behaviour change,
this also contains changes to match http://ag/13135278 which
rejects non-ASCII names.

Bug: 70278814
Bug: 171980069
Test: CtsLibcoreTestCases
Change-Id: Ib6fa0c40d8903352e88d8812bf0c09ec1d8ef6be
(cherry picked from commit 70bd0982aa6ed2603615df8a963f285b91872c87)
4 files changed