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

Side by Side Diff: net/ssl/ssl_info.h

Issue 71633002: Convert SignedCertificateClass to be ref_counted, and add an SCTStore in which to store them. Add S… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: few lint fixes Created 7 years, 1 month 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/socket/ssl_client_socket_nss.cc ('k') | net/ssl/ssl_info.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 #ifndef NET_SSL_SSL_INFO_H_ 5 #ifndef NET_SSL_SSL_INFO_H_
6 #define NET_SSL_SSL_INFO_H_ 6 #define NET_SSL_SSL_INFO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
12 #include "net/cert/cert_status_flags.h" 12 #include "net/cert/cert_status_flags.h"
13 #include "net/cert/sct_status_flags.h"
13 #include "net/cert/x509_cert_types.h" 14 #include "net/cert/x509_cert_types.h"
14 15
15 namespace net { 16 namespace net {
17 namespace ct {
18 class SignedCertificateTimestamp;
19 }
16 20
17 class X509Certificate; 21 class X509Certificate;
18 22
23 typedef std::vector<std::pair<scoped_refptr<ct::SignedCertificateTimestamp>,
24 net::SignedCertificateTimestampVerificationStatus> > SCTStatusList;
25
19 // SSL connection info. 26 // SSL connection info.
20 // This is really a struct. All members are public. 27 // This is really a struct. All members are public.
21 class NET_EXPORT SSLInfo { 28 class NET_EXPORT SSLInfo {
22 public: 29 public:
23 // HandshakeType enumerates the possible resumption cases after an SSL 30 // HandshakeType enumerates the possible resumption cases after an SSL
24 // handshake. 31 // handshake.
25 enum HandshakeType { 32 enum HandshakeType {
26 HANDSHAKE_UNKNOWN = 0, 33 HANDSHAKE_UNKNOWN = 0,
27 HANDSHAKE_RESUME, // we resumed a previous session. 34 HANDSHAKE_RESUME, // we resumed a previous session.
28 HANDSHAKE_FULL, // we negotiated a new session. 35 HANDSHAKE_FULL, // we negotiated a new session.
29 }; 36 };
30 37
31 SSLInfo(); 38 SSLInfo();
32 SSLInfo(const SSLInfo& info); 39 SSLInfo(const SSLInfo& info);
33 ~SSLInfo(); 40 ~SSLInfo();
34 SSLInfo& operator=(const SSLInfo& info); 41 SSLInfo& operator=(const SSLInfo& info);
35 42
36 void Reset(); 43 void Reset();
37 44
38 bool is_valid() const { return cert.get() != NULL; } 45 bool is_valid() const { return cert.get() != NULL; }
39 46
40 // Adds the specified |error| to the cert status. 47 // Adds the specified |error| to the cert status.
41 void SetCertError(int error); 48 void SetCertError(int error);
42 49
43 // The SSL certificate. 50 // The SSL certificate.
44 scoped_refptr<X509Certificate> cert; 51 scoped_refptr<X509Certificate> cert;
52 SCTStatusList scts;
45 53
46 // Bitmask of status info of |cert|, representing, for example, known errors 54 // Bitmask of status info of |cert|, representing, for example, known errors
47 // and extended validation (EV) status. 55 // and extended validation (EV) status.
48 // See cert_status_flags.h for values. 56 // See cert_status_flags.h for values.
49 CertStatus cert_status; 57 CertStatus cert_status;
50 58
51 // The security strength, in bits, of the SSL cipher suite. 59 // The security strength, in bits, of the SSL cipher suite.
52 // 0 means the connection is not encrypted. 60 // 0 means the connection is not encrypted.
53 // -1 means the security strength is unknown. 61 // -1 means the security strength is unknown.
54 int security_bits; 62 int security_bits;
(...skipping 17 matching lines...) Expand all
72 HandshakeType handshake_type; 80 HandshakeType handshake_type;
73 81
74 // The hashes, in several algorithms, of the SubjectPublicKeyInfos from 82 // The hashes, in several algorithms, of the SubjectPublicKeyInfos from
75 // each certificate in the chain. 83 // each certificate in the chain.
76 HashValueVector public_key_hashes; 84 HashValueVector public_key_hashes;
77 }; 85 };
78 86
79 } // namespace net 87 } // namespace net
80 88
81 #endif // NET_SSL_SSL_INFO_H_ 89 #endif // NET_SSL_SSL_INFO_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/ssl/ssl_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698