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

Side by Side Diff: net/socket/ssl_client_socket_openssl.h

Issue 5528003: Add support for OpenSSL Next Protocol Negotiation (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_OPENSSL_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
10
9 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
10 #include "net/base/cert_verify_result.h" 12 #include "net/base/cert_verify_result.h"
11 #include "net/base/completion_callback.h" 13 #include "net/base/completion_callback.h"
12 #include "net/base/io_buffer.h" 14 #include "net/base/io_buffer.h"
13 #include "net/base/ssl_config_service.h" 15 #include "net/base/ssl_config_service.h"
14 #include "net/socket/ssl_client_socket.h" 16 #include "net/socket/ssl_client_socket.h"
15 #include "net/socket/client_socket_handle.h" 17 #include "net/socket/client_socket_handle.h"
16 18
17 typedef struct bio_st BIO; 19 typedef struct bio_st BIO;
18 typedef struct evp_pkey_st EVP_PKEY; 20 typedef struct evp_pkey_st EVP_PKEY;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual void SetOmniboxSpeculation(); 62 virtual void SetOmniboxSpeculation();
61 virtual bool WasEverUsed() const; 63 virtual bool WasEverUsed() const;
62 virtual bool UsingTCPFastOpen() const; 64 virtual bool UsingTCPFastOpen() const;
63 65
64 // Socket methods: 66 // Socket methods:
65 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); 67 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
66 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); 68 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
67 virtual bool SetReceiveBufferSize(int32 size); 69 virtual bool SetReceiveBufferSize(int32 size);
68 virtual bool SetSendBufferSize(int32 size); 70 virtual bool SetSendBufferSize(int32 size);
69 71
72 void set_npn_status(NextProtoStatus status) { npn_status_ = status; }
joth 2010/12/02 17:46:55 could you put these up next to host_and_port(), as
Kristian_ 2010/12/03 14:58:56 Done, actually removed.
73 void set_npn_proto(const char* proto, int len) {
74 npn_proto_.assign(proto, len);
75 }
76
70 private: 77 private:
71 bool Init(); 78 bool Init();
72 void DoReadCallback(int result); 79 void DoReadCallback(int result);
73 void DoWriteCallback(int result); 80 void DoWriteCallback(int result);
74 81
75 bool DoTransportIO(); 82 bool DoTransportIO();
76 int DoHandshake(); 83 int DoHandshake();
77 int DoVerifyCert(int result); 84 int DoVerifyCert(int result);
78 int DoVerifyCertComplete(int result); 85 int DoVerifyCertComplete(int result);
79 void DoConnectCallback(int result); 86 void DoConnectCallback(int result);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Used for session cache diagnostics. 146 // Used for session cache diagnostics.
140 bool trying_cached_session_; 147 bool trying_cached_session_;
141 148
142 enum State { 149 enum State {
143 STATE_NONE, 150 STATE_NONE,
144 STATE_HANDSHAKE, 151 STATE_HANDSHAKE,
145 STATE_VERIFY_CERT, 152 STATE_VERIFY_CERT,
146 STATE_VERIFY_CERT_COMPLETE, 153 STATE_VERIFY_CERT_COMPLETE,
147 }; 154 };
148 State next_handshake_state_; 155 State next_handshake_state_;
156 NextProtoStatus npn_status_;
157 std::string npn_proto_;
149 BoundNetLog net_log_; 158 BoundNetLog net_log_;
150 }; 159 };
151 160
152 } // namespace net 161 } // namespace net
153 162
154 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 163 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
155 164
OLDNEW
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_openssl.cc » ('j') | net/socket/ssl_client_socket_openssl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698