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

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

Issue 2282183004: Add error information to VerifyCertificateChain(). (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/verify_certificate_chain.h" 5 #include "net/cert/internal/verify_certificate_chain.h"
6 6
7 #include "net/cert/internal/parsed_certificate.h" 7 #include "net/cert/internal/parsed_certificate.h"
8 #include "net/cert/internal/signature_policy.h" 8 #include "net/cert/internal/signature_policy.h"
9 #include "net/cert/internal/trust_store.h" 9 #include "net/cert/internal/trust_store.h"
10 #include "net/der/input.h" 10 #include "net/der/input.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 scoped_refptr<TrustAnchor> trust_anchor = 69 scoped_refptr<TrustAnchor> trust_anchor =
70 TrustAnchor::CreateFromCertificateNoConstraints(input_chain.back()); 70 TrustAnchor::CreateFromCertificateNoConstraints(input_chain.back());
71 input_chain.pop_back(); 71 input_chain.pop_back();
72 72
73 SimpleSignaturePolicy signature_policy(1024); 73 SimpleSignaturePolicy signature_policy(1024);
74 74
75 // Run all tests at the time the PKITS was published. 75 // Run all tests at the time the PKITS was published.
76 der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0}; 76 der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0};
77 77
78 // TODO(crbug.com/634443): Test errors on failure?
79 CertErrors errors;
78 return VerifyCertificateChain(input_chain, trust_anchor.get(), 80 return VerifyCertificateChain(input_chain, trust_anchor.get(),
79 &signature_policy, time); 81 &signature_policy, time, &errors);
80 } 82 }
81 }; 83 };
82 84
83 } // namespace 85 } // namespace
84 86
85 class PkitsTest01SignatureVerificationCustom 87 class PkitsTest01SignatureVerificationCustom
86 : public PkitsTest<VerifyCertificateChainPkitsTestDelegate> {}; 88 : public PkitsTest<VerifyCertificateChainPkitsTestDelegate> {};
87 89
88 // Modified version of 4.1.4 Valid DSA Signatures Test4 90 // Modified version of 4.1.4 Valid DSA Signatures Test4
89 TEST_F(PkitsTest01SignatureVerificationCustom, 91 TEST_F(PkitsTest01SignatureVerificationCustom,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 207
206 // TODO(mattm): CRL support: PkitsTest04BasicCertificateRevocationTests, 208 // TODO(mattm): CRL support: PkitsTest04BasicCertificateRevocationTests,
207 // PkitsTest05VerifyingPathswithSelfIssuedCertificates, 209 // PkitsTest05VerifyingPathswithSelfIssuedCertificates,
208 // PkitsTest14DistributionPoints, PkitsTest15DeltaCRLs 210 // PkitsTest14DistributionPoints, PkitsTest15DeltaCRLs
209 211
210 // TODO(mattm): Certificate Policies support: PkitsTest08CertificatePolicies, 212 // TODO(mattm): Certificate Policies support: PkitsTest08CertificatePolicies,
211 // PkitsTest09RequireExplicitPolicy PkitsTest10PolicyMappings, 213 // PkitsTest09RequireExplicitPolicy PkitsTest10PolicyMappings,
212 // PkitsTest11InhibitPolicyMapping, PkitsTest12InhibitAnyPolicy 214 // PkitsTest11InhibitPolicyMapping, PkitsTest12InhibitAnyPolicy
213 215
214 } // namespace net 216 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698