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

Side by Side Diff: net/cert/asn1_util.h

Issue 2731603002: Check TBSCertificate.algorithm and Certificate.signatureAlgorithm for (Closed)
Patch Set: moar Created 3 years, 9 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 | « no previous file | net/cert/asn1_util.cc » ('j') | net/cert/cert_verify_proc.cc » ('J')
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 #ifndef NET_CERT_ASN1_UTIL_H_ 5 #ifndef NET_CERT_ASN1_UTIL_H_
6 #define NET_CERT_ASN1_UTIL_H_ 6 #define NET_CERT_ASN1_UTIL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 base::StringPiece cert, 43 base::StringPiece cert,
44 std::vector<base::StringPiece>* urls_out); 44 std::vector<base::StringPiece>* urls_out);
45 45
46 // HasTLSFeatureExtension parses the DER encoded certificate in |cert| 46 // HasTLSFeatureExtension parses the DER encoded certificate in |cert|
47 // and extracts the TLS feature extension 47 // and extracts the TLS feature extension
48 // (https://tools.ietf.org/html/rfc7633) if present. Returns true if the 48 // (https://tools.ietf.org/html/rfc7633) if present. Returns true if the
49 // TLS feature extension was present, and false if the extension was not 49 // TLS feature extension was present, and false if the extension was not
50 // present or if there was a parsing failure. 50 // present or if there was a parsing failure.
51 NET_EXPORT_PRIVATE bool HasTLSFeatureExtension(base::StringPiece cert); 51 NET_EXPORT_PRIVATE bool HasTLSFeatureExtension(base::StringPiece cert);
52 52
53 // Extracts the two (SEQUENCE) tag-length-values for the signature
54 // AlgorithmIdentifiers in a DER encoded certificate. Does not use
55 // strict parsing or validate the resulting AlgorithmIdentifiers.
mattm 2017/03/08 01:41:35 extra space
eroman 2017/03/08 17:09:24 Done.
56 //
57 // Returns true on success and fills |cert_signature_algorithm_sequence|
58 // with Certificate.signatureAlgorithm and |tbs_signature_algorithm_sequence|
59 // with TBSCertificate.algorithm.
60 NET_EXPORT_PRIVATE bool ExtractSignatureAlgorithmsFromDERCert(
61 base::StringPiece cert,
62 base::StringPiece* cert_signature_algorithm_sequence,
63 base::StringPiece* tbs_signature_algorithm_sequence);
64
53 } // namespace asn1 65 } // namespace asn1
54 66
55 } // namespace net 67 } // namespace net
56 68
57 #endif // NET_CERT_ASN1_UTIL_H_ 69 #endif // NET_CERT_ASN1_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | net/cert/asn1_util.cc » ('j') | net/cert/cert_verify_proc.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698