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

Side by Side Diff: net/cert/cert_verify_proc.cc

Issue 2926463002: Fix TransportSecurityState unittests to run in --single-process mode. (Closed)
Patch Set: Fixup model tests 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 unified diff | Download patch
« no previous file with comments | « net/BUILD.gn ('k') | net/cert/cert_verify_proc_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/cert_verify_proc.h" 5 #include "net/cert/cert_verify_proc.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 797
798 static const char kDomainsTest[][kMaxDomainLength] = { 798 static const char kDomainsTest[][kMaxDomainLength] = {
799 "example.com", 799 "example.com",
800 "", 800 "",
801 }; 801 };
802 802
803 static const PublicKeyDomainLimitation kLimits[] = { 803 static const PublicKeyDomainLimitation kLimits[] = {
804 // C=FR, ST=France, L=Paris, O=PM/SGDN, OU=DCSSI, 804 // C=FR, ST=France, L=Paris, O=PM/SGDN, OU=DCSSI,
805 // CN=IGC/A/emailAddress=igca@sgdn.pm.gouv.fr 805 // CN=IGC/A/emailAddress=igca@sgdn.pm.gouv.fr
806 { 806 {
807 {0x79, 0x23, 0xd5, 0x8d, 0x0f, 0xe0, 0x3c, 0xe6, 0xab, 0xad, 0xae, 807 {0x79, 0x23, 0xd5, 0x8d, 0x0f, 0xe0, 0x3c, 0xe6, 0xab, 0xad,
808 0x27, 0x1a, 0x6d, 0x94, 0xf4, 0x14, 0xd1, 0xa8, 0x73}, 808 0xae, 0x27, 0x1a, 0x6d, 0x94, 0xf4, 0x14, 0xd1, 0xa8, 0x73},
809 kDomainsANSSI, 809 kDomainsANSSI,
810 }, 810 },
811 // C=IN, O=India PKI, CN=CCA India 2007 811 // C=IN, O=India PKI, CN=CCA India 2007
812 // Expires: July 4th 2015. 812 // Expires: July 4th 2015.
813 { 813 {
814 {0xfe, 0xe3, 0x95, 0x21, 0x2d, 0x5f, 0xea, 0xfc, 0x7e, 0xdc, 0xcf, 814 {0xfe, 0xe3, 0x95, 0x21, 0x2d, 0x5f, 0xea, 0xfc, 0x7e, 0xdc,
815 0x88, 0x3f, 0x1e, 0xc0, 0x58, 0x27, 0xd8, 0xb8, 0xe4}, 815 0xcf, 0x88, 0x3f, 0x1e, 0xc0, 0x58, 0x27, 0xd8, 0xb8, 0xe4},
816 kDomainsIndiaCCA, 816 kDomainsIndiaCCA,
817 }, 817 },
818 // C=IN, O=India PKI, CN=CCA India 2011 818 // C=IN, O=India PKI, CN=CCA India 2011
819 // Expires: March 11 2016. 819 // Expires: March 11 2016.
820 { 820 {
821 {0xf1, 0x42, 0xf6, 0xa2, 0x7d, 0x29, 0x3e, 0xa8, 0xf9, 0x64, 0x52, 821 {0xf1, 0x42, 0xf6, 0xa2, 0x7d, 0x29, 0x3e, 0xa8, 0xf9, 0x64,
822 0x56, 0xed, 0x07, 0xa8, 0x63, 0xf2, 0xdb, 0x1c, 0xdf}, 822 0x52, 0x56, 0xed, 0x07, 0xa8, 0x63, 0xf2, 0xdb, 0x1c, 0xdf},
823 kDomainsIndiaCCA, 823 kDomainsIndiaCCA,
824 }, 824 },
825 // C=IN, O=India PKI, CN=CCA India 2014 825 // C=IN, O=India PKI, CN=CCA India 2014
826 // Expires: March 5 2024. 826 // Expires: March 5 2024.
827 { 827 {
828 {0x36, 0x8c, 0x4a, 0x1e, 0x2d, 0xb7, 0x81, 0xe8, 0x6b, 0xed, 0x5a, 828 {0x36, 0x8c, 0x4a, 0x1e, 0x2d, 0xb7, 0x81, 0xe8, 0x6b, 0xed,
829 0x0a, 0x42, 0xb8, 0xc5, 0xcf, 0x6d, 0xb3, 0x57, 0xe1}, 829 0x5a, 0x0a, 0x42, 0xb8, 0xc5, 0xcf, 0x6d, 0xb3, 0x57, 0xe1},
830 kDomainsIndiaCCA, 830 kDomainsIndiaCCA,
831 }, 831 },
832 // Not a real certificate - just for testing. This is the SPKI hash of 832 // Not a real certificate - just for testing. This is the SPKI hash of
833 // the keys used in net/data/ssl/certificates/name_constraint_*.pem. 833 // the keys used in net/data/ssl/certificates/name_constraint_*.pem.
834 { 834 {
835 {0x48, 0x49, 0x4a, 0xc5, 0x5a, 0x3e, 0xcd, 0xc5, 0x62, 0x9f, 0xef, 835 {0x7b, 0x29, 0x02, 0xb7, 0x17, 0x63, 0x7f, 0xef, 0x53, 0x70,
836 0x23, 0x14, 0xad, 0x05, 0xa9, 0x2a, 0x5c, 0x39, 0xc0}, 836 0xff, 0x9d, 0x95, 0xee, 0x11, 0x64, 0xe7, 0x2e, 0x59, 0xf2},
837 kDomainsTest, 837 kDomainsTest,
838 }, 838 },
839 }; 839 };
840 840
841 for (unsigned i = 0; i < arraysize(kLimits); ++i) { 841 for (unsigned i = 0; i < arraysize(kLimits); ++i) {
842 for (HashValueVector::const_iterator j = public_key_hashes.begin(); 842 for (HashValueVector::const_iterator j = public_key_hashes.begin();
843 j != public_key_hashes.end(); ++j) { 843 j != public_key_hashes.end(); ++j) {
844 if (j->tag == HASH_VALUE_SHA1 && 844 if (j->tag == HASH_VALUE_SHA1 &&
845 memcmp(j->data(), kLimits[i].public_key, base::kSHA1Length) == 0) { 845 memcmp(j->data(), kLimits[i].public_key, base::kSHA1Length) == 0) {
846 if (dns_names.empty() && ip_addrs.empty()) { 846 if (dns_names.empty() && ip_addrs.empty()) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 return true; 903 return true;
904 904
905 return false; 905 return false;
906 } 906 }
907 907
908 // static 908 // static
909 const base::Feature CertVerifyProc::kSHA1LegacyMode{ 909 const base::Feature CertVerifyProc::kSHA1LegacyMode{
910 "SHA1LegacyMode", base::FEATURE_DISABLED_BY_DEFAULT}; 910 "SHA1LegacyMode", base::FEATURE_DISABLED_BY_DEFAULT};
911 911
912 } // namespace net 912 } // namespace net
OLDNEW
« no previous file with comments | « net/BUILD.gn ('k') | net/cert/cert_verify_proc_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698