Chromium Code Reviews| Index: components/cronet/ios/test/cronet_pkp_test.mm |
| diff --git a/components/cronet/ios/test/cronet_pkp_test.mm b/components/cronet/ios/test/cronet_pkp_test.mm |
| index 2255766c094226c49f45eb8f0b70525f1c675d53..c92475e8a307d308a61e3cef5c6126f1db537644 100644 |
| --- a/components/cronet/ios/test/cronet_pkp_test.mm |
| +++ b/components/cronet/ios/test/cronet_pkp_test.mm |
| @@ -140,6 +140,14 @@ TEST_F(PkpTest, TestSuccessIfPinMatches) { |
| ASSERT_NO_FATAL_FAILURE(sendRequestAndAssertResult(request_url_, kSUCCESS)); |
| } |
| +TEST_F(PkpTest, TestBypass) { |
| + [Cronet setMockCertVerifier:CreateMockCertVerifier({kSERVER_CERT}, NO)]; |
| + [Cronet setEnablePublicKeyPinningBypassForLocalTrustAnchors:YES]; |
|
mef
2017/06/13 21:12:42
This seems to test the default case as if it is no
|
| + AddPkpAndStartCronet(server_host_, NonMatchingHash(), kEXCLUDE_SUBDOMAINS, |
| + distant_future); |
| + ASSERT_NO_FATAL_FAILURE(sendRequestAndAssertResult(request_url_, kSUCCESS)); |
| +} |
| + |
| // Tests the case when the pin hash does not match and the client accesses the |
| // subdomain of the configured PKP host with includeSubdomains flag set to true. |
| // The client is expected to receive the error response. |