| 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_IMPL_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // pending Connect, Read or Write calls, if any. Retries all state machines | 168 // pending Connect, Read or Write calls, if any. Retries all state machines |
| 169 // and, if complete, runs the respective callbacks. | 169 // and, if complete, runs the respective callbacks. |
| 170 void RetryAllOperations(); | 170 void RetryAllOperations(); |
| 171 | 171 |
| 172 int VerifyCT(); | 172 int VerifyCT(); |
| 173 | 173 |
| 174 // Callback from the SSL layer that indicates the remote server is requesting | 174 // Callback from the SSL layer that indicates the remote server is requesting |
| 175 // a certificate for this client. | 175 // a certificate for this client. |
| 176 int ClientCertRequestCallback(SSL* ssl); | 176 int ClientCertRequestCallback(SSL* ssl); |
| 177 | 177 |
| 178 // CertVerifyCallback is called to verify the server's certificates. We do | |
| 179 // verification after the handshake so this function only enforces that the | |
| 180 // certificates don't change during renegotiation. | |
| 181 int CertVerifyCallback(X509_STORE_CTX* store_ctx); | |
| 182 | |
| 183 // Called after the initial handshake completes and after the server | 178 // Called after the initial handshake completes and after the server |
| 184 // certificate has been verified. The order of handshake completion and | 179 // certificate has been verified. The order of handshake completion and |
| 185 // certificate verification depends on whether the connection was false | 180 // certificate verification depends on whether the connection was false |
| 186 // started. After both have happened (thus calling this twice), the session is | 181 // started. After both have happened (thus calling this twice), the session is |
| 187 // safe to cache and will be cached. | 182 // safe to cache and will be cached. |
| 188 void MaybeCacheSession(); | 183 void MaybeCacheSession(); |
| 189 | 184 |
| 190 // Called from the SSL layer whenever a new session is established. | 185 // Called from the SSL layer whenever a new session is established. |
| 191 int NewSessionCallback(SSL_SESSION* session); | 186 int NewSessionCallback(SSL_SESSION* session); |
| 192 | 187 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // True if PKP is bypassed due to a local trust anchor. | 348 // True if PKP is bypassed due to a local trust anchor. |
| 354 bool pkp_bypassed_; | 349 bool pkp_bypassed_; |
| 355 | 350 |
| 356 NetLogWithSource net_log_; | 351 NetLogWithSource net_log_; |
| 357 base::WeakPtrFactory<SSLClientSocketImpl> weak_factory_; | 352 base::WeakPtrFactory<SSLClientSocketImpl> weak_factory_; |
| 358 }; | 353 }; |
| 359 | 354 |
| 360 } // namespace net | 355 } // namespace net |
| 361 | 356 |
| 362 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ | 357 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ |
| OLD | NEW |