summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2018-01-10 21:04:31 +0000
committerTobias Thierer <tobiast@google.com>2018-01-11 15:42:27 +0000
commit70bd0982aa6ed2603615df8a963f285b91872c87 (patch)
tree38dcf537a8d89b9216cf87bda8d1c5eeca69923e /support
parentfe7ce3fb69b789110782ab9aae366ad4089d1944 (diff)
Track behavior change in default HostnameVerifier.
The default HostnameVerifier now ignores any CommonName in the certificate provided by the server, even when no subjectAltName is present. Bug: 70278814 Test: CtsLibcoreTestCases (ran against an internal build with this CL cherrypicked) Change-Id: Ib6fa0c40d8903352e88d8812bf0c09ec1d8ef6be
Diffstat (limited to 'support')
-rw-r--r--support/src/test/java/libcore/java/security/TestKeyStore.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/src/test/java/libcore/java/security/TestKeyStore.java b/support/src/test/java/libcore/java/security/TestKeyStore.java
index 3829dc1e24..be9874f6e9 100644
--- a/support/src/test/java/libcore/java/security/TestKeyStore.java
+++ b/support/src/test/java/libcore/java/security/TestKeyStore.java
@@ -230,7 +230,7 @@ public final class TestKeyStore {
.aliasPrefix("server")
.signer(INTERMEDIATE_CA.getPrivateKey("RSA", "RSA"))
.rootCa(INTERMEDIATE_CA.getRootCertificate("RSA"))
- .addSubjectAltNameIpAddress(LOCAL_HOST_ADDRESS)
+ .addSubjectAltName(new GeneralName(GeneralName.dNSName, LOCAL_HOST_NAME))
.certificateSerialNumber(BigInteger.valueOf(3))
.build();
CLIENT = new TestKeyStore(createClient(INTERMEDIATE_CA.keyStore), null, null);
@@ -641,7 +641,7 @@ public final class TestKeyStore {
}
private X500Principal localhost() {
- return new X500Principal("CN=" + LOCAL_HOST_NAME);
+ return new X500Principal("CN=Local Host");
}
}