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

Side by Side Diff: remoting/protocol/ssl_hmac_channel_authenticator.h

Issue 1197853003: Add P2PDatagramSocket and P2PStreamSocket interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months 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
OLDNEW
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 REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_ 5 #ifndef REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_
6 #define REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_ 6 #define REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const std::string& auth_key); 50 const std::string& auth_key);
51 51
52 static scoped_ptr<SslHmacChannelAuthenticator> CreateForHost( 52 static scoped_ptr<SslHmacChannelAuthenticator> CreateForHost(
53 const std::string& local_cert, 53 const std::string& local_cert,
54 scoped_refptr<RsaKeyPair> key_pair, 54 scoped_refptr<RsaKeyPair> key_pair,
55 const std::string& auth_key); 55 const std::string& auth_key);
56 56
57 ~SslHmacChannelAuthenticator() override; 57 ~SslHmacChannelAuthenticator() override;
58 58
59 // ChannelAuthenticator interface. 59 // ChannelAuthenticator interface.
60 void SecureAndAuthenticate(scoped_ptr<net::StreamSocket> socket, 60 void SecureAndAuthenticate(scoped_ptr<P2PStreamSocket> socket,
61 const DoneCallback& done_callback) override; 61 const DoneCallback& done_callback) override;
62 62
63 private: 63 private:
64 SslHmacChannelAuthenticator(const std::string& auth_key); 64 SslHmacChannelAuthenticator(const std::string& auth_key);
65 65
66 bool is_ssl_server(); 66 bool is_ssl_server();
67 67
68 void OnConnected(int result); 68 void OnConnected(int result);
69 69
70 void WriteAuthenticationBytes(bool* callback_called); 70 void WriteAuthenticationBytes(bool* callback_called);
(...skipping 26 matching lines...) Expand all
97 scoped_refptr<net::DrainableIOBuffer> auth_write_buf_; 97 scoped_refptr<net::DrainableIOBuffer> auth_write_buf_;
98 scoped_refptr<net::GrowableIOBuffer> auth_read_buf_; 98 scoped_refptr<net::GrowableIOBuffer> auth_read_buf_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(SslHmacChannelAuthenticator); 100 DISALLOW_COPY_AND_ASSIGN(SslHmacChannelAuthenticator);
101 }; 101 };
102 102
103 } // namespace protocol 103 } // namespace protocol
104 } // namespace remoting 104 } // namespace remoting
105 105
106 #endif // REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_ 106 #endif // REMOTING_PROTOCOL_SSL_HMAC_CHANNEL_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « remoting/protocol/secure_channel_factory.cc ('k') | remoting/protocol/ssl_hmac_channel_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698