OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BASE_SSL_CLIENT_SOCKET_NSS_H_ | 5 #ifndef NET_BASE_SSL_CLIENT_SOCKET_NSS_H_ |
6 #define NET_BASE_SSL_CLIENT_SOCKET_NSS_H_ | 6 #define NET_BASE_SSL_CLIENT_SOCKET_NSS_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <prio.h> | 10 #include <prio.h> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 scoped_ptr<ClientSocket> transport_; | 69 scoped_ptr<ClientSocket> transport_; |
70 std::string hostname_; | 70 std::string hostname_; |
71 SSLConfig ssl_config_; | 71 SSLConfig ssl_config_; |
72 | 72 |
73 CompletionCallback* user_callback_; | 73 CompletionCallback* user_callback_; |
74 | 74 |
75 // Used by both Read and Write functions. | 75 // Used by both Read and Write functions. |
76 char* user_buf_; | 76 char* user_buf_; |
77 int user_buf_len_; | 77 int user_buf_len_; |
78 | 78 |
| 79 int server_cert_status_; |
| 80 |
79 bool completed_handshake_; | 81 bool completed_handshake_; |
80 | 82 |
81 enum State { | 83 enum State { |
82 STATE_NONE, | 84 STATE_NONE, |
83 STATE_CONNECT, | 85 STATE_CONNECT, |
84 STATE_CONNECT_COMPLETE, | 86 STATE_CONNECT_COMPLETE, |
85 STATE_HANDSHAKE_READ, | 87 STATE_HANDSHAKE_READ, |
86 // No STATE_HANDSHAKE_READ_COMPLETE needed, go to STATE_NONE instead. | 88 // No STATE_HANDSHAKE_READ_COMPLETE needed, go to STATE_NONE instead. |
87 STATE_PAYLOAD_WRITE, | 89 STATE_PAYLOAD_WRITE, |
88 STATE_PAYLOAD_READ, | 90 STATE_PAYLOAD_READ, |
89 }; | 91 }; |
90 State next_state_; | 92 State next_state_; |
91 | 93 |
92 /* The NSS SSL state machine */ | 94 /* The NSS SSL state machine */ |
93 PRFileDesc* nss_fd_; | 95 PRFileDesc* nss_fd_; |
94 | 96 |
95 /* Buffers for the network end of the SSL state machine */ | 97 /* Buffers for the network end of the SSL state machine */ |
96 memio_Private* nss_bufs_; | 98 memio_Private* nss_bufs_; |
97 | 99 |
98 static bool nss_options_initialized_; | 100 static bool nss_options_initialized_; |
99 }; | 101 }; |
100 | 102 |
101 } // namespace net | 103 } // namespace net |
102 | 104 |
103 #endif // NET_BASE_SSL_CLIENT_SOCKET_NSS_H_ | 105 #endif // NET_BASE_SSL_CLIENT_SOCKET_NSS_H_ |
104 | 106 |
OLD | NEW |