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

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

Issue 2349103002: Include the RSA key modulus size in error message when it is too small. (Closed)
Patch Set: address mattm's comment 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 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/verify_certificate_chain.h" 5 #include "net/cert/internal/verify_certificate_chain.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // This class changes the error scope to indicate which certificate in the 62 // This class changes the error scope to indicate which certificate in the
63 // chain is currently being processed. 63 // chain is currently being processed.
64 class CertErrorScoperForCert : public CertErrorScoper { 64 class CertErrorScoperForCert : public CertErrorScoper {
65 public: 65 public:
66 CertErrorScoperForCert(CertErrors* parent_errors, size_t index) 66 CertErrorScoperForCert(CertErrors* parent_errors, size_t index)
67 : CertErrorScoper(parent_errors), index_(index) {} 67 : CertErrorScoper(parent_errors), index_(index) {}
68 68
69 std::unique_ptr<CertErrorNode> BuildRootNode() override { 69 std::unique_ptr<CertErrorNode> BuildRootNode() override {
70 return base::MakeUnique<CertErrorNode>( 70 return base::MakeUnique<CertErrorNode>(
71 CertErrorNodeType::TYPE_CONTEXT, kContextCertificate, 71 CertErrorNodeType::TYPE_CONTEXT, kContextCertificate,
72 CreateCertErrorParamsSizeT("index", index_)); 72 CreateCertErrorParams1SizeT("index", index_));
73 } 73 }
74 74
75 private: 75 private:
76 size_t index_; 76 size_t index_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(CertErrorScoperForCert); 78 DISALLOW_COPY_AND_ASSIGN(CertErrorScoperForCert);
79 }; 79 };
80 80
81 // Returns true if the certificate does not contain any unconsumed _critical_ 81 // Returns true if the certificate does not contain any unconsumed _critical_
82 // extensions. 82 // extensions.
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 617
618 // TODO(eroman): RFC 5280 forbids duplicate certificates per section 6.1: 618 // TODO(eroman): RFC 5280 forbids duplicate certificates per section 6.1:
619 // 619 //
620 // A certificate MUST NOT appear more than once in a prospective 620 // A certificate MUST NOT appear more than once in a prospective
621 // certification path. 621 // certification path.
622 622
623 return true; 623 return true;
624 } 624 }
625 625
626 } // namespace net 626 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698