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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // | 81 // |
82 // TODO(sergeyu): Move this method to the SSLSocket interface and | 82 // TODO(sergeyu): Move this method to the SSLSocket interface and |
83 // implemented in SSLServerSocket too. | 83 // implemented in SSLServerSocket too. |
84 virtual void GetSSLInfo(SSLInfo* ssl_info) = 0; | 84 virtual void GetSSLInfo(SSLInfo* ssl_info) = 0; |
85 | 85 |
86 // Gets the SSL CertificateRequest info of the socket after Connect failed | 86 // Gets the SSL CertificateRequest info of the socket after Connect failed |
87 // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. | 87 // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. |
88 virtual void GetSSLCertRequestInfo( | 88 virtual void GetSSLCertRequestInfo( |
89 SSLCertRequestInfo* cert_request_info) = 0; | 89 SSLCertRequestInfo* cert_request_info) = 0; |
90 | 90 |
| 91 // StreamSocket: |
| 92 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; |
| 93 |
91 // Get the application level protocol that we negotiated with the server. | 94 // Get the application level protocol that we negotiated with the server. |
92 // *proto is set to the resulting protocol (n.b. that the string may have | 95 // *proto is set to the resulting protocol (n.b. that the string may have |
93 // embedded NULs). | 96 // embedded NULs). |
94 // kNextProtoUnsupported: *proto is cleared. | 97 // kNextProtoUnsupported: *proto is cleared. |
95 // kNextProtoNegotiated: *proto is set to the negotiated protocol. | 98 // kNextProtoNegotiated: *proto is set to the negotiated protocol. |
96 // kNextProtoNoOverlap: *proto is set to the first protocol in the | 99 // kNextProtoNoOverlap: *proto is set to the first protocol in the |
97 // supported list. | 100 // supported list. |
98 // *server_protos is set to the server advertised protocols. | 101 // *server_protos is set to the server advertised protocols. |
99 virtual NextProtoStatus GetNextProto(std::string* proto, | 102 virtual NextProtoStatus GetNextProto(std::string* proto, |
100 std::string* server_protos) = 0; | 103 std::string* server_protos) = 0; |
(...skipping 15 matching lines...) Expand all Loading... |
116 static void ClearSessionCache(); | 119 static void ClearSessionCache(); |
117 | 120 |
118 virtual bool was_npn_negotiated() const; | 121 virtual bool was_npn_negotiated() const; |
119 | 122 |
120 virtual bool set_was_npn_negotiated(bool negotiated); | 123 virtual bool set_was_npn_negotiated(bool negotiated); |
121 | 124 |
122 virtual bool was_spdy_negotiated() const; | 125 virtual bool was_spdy_negotiated() const; |
123 | 126 |
124 virtual bool set_was_spdy_negotiated(bool negotiated); | 127 virtual bool set_was_spdy_negotiated(bool negotiated); |
125 | 128 |
126 virtual NextProto protocol_negotiated() const; | |
127 | |
128 virtual void set_protocol_negotiated(NextProto protocol_negotiated); | 129 virtual void set_protocol_negotiated(NextProto protocol_negotiated); |
129 | 130 |
130 // Returns the ServerBoundCertService used by this socket, or NULL if | 131 // Returns the ServerBoundCertService used by this socket, or NULL if |
131 // server bound certificates are not supported. | 132 // server bound certificates are not supported. |
132 virtual ServerBoundCertService* GetServerBoundCertService() const = 0; | 133 virtual ServerBoundCertService* GetServerBoundCertService() const = 0; |
133 | 134 |
134 // Returns true if a domain bound certificate was sent on this connection. | 135 // Returns true if a domain bound certificate was sent on this connection. |
135 // This may be useful for protocols, like SPDY, which allow the same | 136 // This may be useful for protocols, like SPDY, which allow the same |
136 // connection to be shared between multiple domains, each of which need | 137 // connection to be shared between multiple domains, each of which need |
137 // a domain bound certificate. | 138 // a domain bound certificate. |
(...skipping 13 matching lines...) Expand all Loading... |
151 // Protocol that we negotiated with the server. | 152 // Protocol that we negotiated with the server. |
152 NextProto protocol_negotiated_; | 153 NextProto protocol_negotiated_; |
153 // Type of the domain bound cert that was sent, or CLIENT_CERT_INVALID_TYPE | 154 // Type of the domain bound cert that was sent, or CLIENT_CERT_INVALID_TYPE |
154 // if none was sent. | 155 // if none was sent. |
155 SSLClientCertType domain_bound_cert_type_; | 156 SSLClientCertType domain_bound_cert_type_; |
156 }; | 157 }; |
157 | 158 |
158 } // namespace net | 159 } // namespace net |
159 | 160 |
160 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ | 161 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |