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

Side by Side Diff: net/cert/internal/certificate_policies_unittest.cc

Issue 2872113002: Add parsing code for RFC 5280 PolicyConstraints. (Closed)
Patch Set: update ios bundle_data Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « net/cert/internal/certificate_policies.cc ('k') | net/cert/internal/parse_certificate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/internal/certificate_policies.h" 5 #include "net/cert/internal/certificate_policies.h"
6 6
7 #include "net/cert/internal/test_helpers.h" 7 #include "net/cert/internal/test_helpers.h"
8 #include "net/der/input.h" 8 #include "net/der/input.h"
9 #include "net/der/parser.h" 9 #include "net/der/parser.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 TEST(ParseCertificatePoliciesTest, TwoPoliciesWithQualifiers) { 140 TEST(ParseCertificatePoliciesTest, TwoPoliciesWithQualifiers) {
141 std::string der; 141 std::string der;
142 ASSERT_TRUE(LoadTestData("policy_1_2_3_and_1_2_4_with_qualifiers.pem", &der)); 142 ASSERT_TRUE(LoadTestData("policy_1_2_3_and_1_2_4_with_qualifiers.pem", &der));
143 std::vector<der::Input> policies; 143 std::vector<der::Input> policies;
144 EXPECT_TRUE(ParseCertificatePoliciesExtension(der::Input(&der), &policies)); 144 EXPECT_TRUE(ParseCertificatePoliciesExtension(der::Input(&der), &policies));
145 ASSERT_EQ(2U, policies.size()); 145 ASSERT_EQ(2U, policies.size());
146 EXPECT_EQ(der::Input(policy_1_2_3_der), policies[0]); 146 EXPECT_EQ(der::Input(policy_1_2_3_der), policies[0]);
147 EXPECT_EQ(der::Input(policy_1_2_4_der), policies[1]); 147 EXPECT_EQ(der::Input(policy_1_2_4_der), policies[1]);
148 } 148 }
149 149
150 // NOTE: The tests for ParseCertificatePolicies() are part of
151 // parsed_certificate_unittest.cc
152
150 } // namespace net 153 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/certificate_policies.cc ('k') | net/cert/internal/parse_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698