Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: components/cronet/ios/test/cronet_pkp_test.mm

Issue 2937523002: add setter for enable_pkp_bypass_etc (Closed)
Patch Set: add test for set_enable_pkp_bypass_etc Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698