OLD | NEW |
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_SOCKET_SSL_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // | 63 // |
64 class NET_EXPORT SSLClientSocket : public SSLSocket { | 64 class NET_EXPORT SSLClientSocket : public SSLSocket { |
65 public: | 65 public: |
66 SSLClientSocket(); | 66 SSLClientSocket(); |
67 | 67 |
68 // Next Protocol Negotiation (NPN) allows a TLS client and server to come to | 68 // Next Protocol Negotiation (NPN) allows a TLS client and server to come to |
69 // an agreement about the application level protocol to speak over a | 69 // an agreement about the application level protocol to speak over a |
70 // connection. | 70 // connection. |
71 enum NextProtoStatus { | 71 enum NextProtoStatus { |
72 // WARNING: These values are serialized to disk. Don't change them. | 72 // WARNING: These values are serialized to disk. Don't change them. |
73 | |
74 kNextProtoUnsupported = 0, // The server doesn't support NPN. | 73 kNextProtoUnsupported = 0, // The server doesn't support NPN. |
75 kNextProtoNegotiated = 1, // We agreed on a protocol. | 74 kNextProtoNegotiated = 1, // We agreed on a protocol. |
76 kNextProtoNoOverlap = 2, // No protocols in common. We requested | 75 kNextProtoNoOverlap = 2, // No protocols in common. We requested |
77 // the first protocol in our list. | 76 // the first protocol in our list. |
78 }; | 77 }; |
79 | 78 |
80 // StreamSocket: | 79 // StreamSocket: |
81 virtual bool WasNpnNegotiated() const OVERRIDE; | 80 virtual bool WasNpnNegotiated() const OVERRIDE; |
82 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; | 81 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; |
83 | 82 |
84 // Gets the SSL CertificateRequest info of the socket after Connect failed | 83 // Gets the SSL CertificateRequest info of the socket after Connect failed |
85 // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. | 84 // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. |
86 virtual void GetSSLCertRequestInfo( | 85 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) = 0; |
87 SSLCertRequestInfo* cert_request_info) = 0; | |
88 | 86 |
89 // Get the application level protocol that we negotiated with the server. | 87 // Get the application level protocol that we negotiated with the server. |
90 // *proto is set to the resulting protocol (n.b. that the string may have | 88 // *proto is set to the resulting protocol (n.b. that the string may have |
91 // embedded NULs). | 89 // embedded NULs). |
92 // kNextProtoUnsupported: *proto is cleared. | 90 // kNextProtoUnsupported: *proto is cleared. |
93 // kNextProtoNegotiated: *proto is set to the negotiated protocol. | 91 // kNextProtoNegotiated: *proto is set to the negotiated protocol. |
94 // kNextProtoNoOverlap: *proto is set to the first protocol in the | 92 // kNextProtoNoOverlap: *proto is set to the first protocol in the |
95 // supported list. | 93 // supported list. |
96 // *server_protos is set to the server advertised protocols. | 94 // *server_protos is set to the server advertised protocols. |
97 virtual NextProtoStatus GetNextProto(std::string* proto, | 95 virtual NextProtoStatus GetNextProto(std::string* proto, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 bool channel_id_sent_; | 181 bool channel_id_sent_; |
184 // True if SCTs were received via a TLS extension. | 182 // True if SCTs were received via a TLS extension. |
185 bool signed_cert_timestamps_received_; | 183 bool signed_cert_timestamps_received_; |
186 // True if a stapled OCSP response was received. | 184 // True if a stapled OCSP response was received. |
187 bool stapled_ocsp_response_received_; | 185 bool stapled_ocsp_response_received_; |
188 }; | 186 }; |
189 | 187 |
190 } // namespace net | 188 } // namespace net |
191 | 189 |
192 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 190 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |