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

Side by Side Diff: blimp/net/ssl_client_transport.h

Issue 1696563002: Blimp: add support for SSL connections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address remaining rsleevi feedback items Created 4 years, 10 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BLIMP_NET_SSL_CLIENT_TRANSPORT_H_
6 #define BLIMP_NET_SSL_CLIENT_TRANSPORT_H_
7
8 #include <string>
9
10 #include "base/callback_forward.h"
11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "blimp/net/blimp_net_export.h"
14 #include "blimp/net/blimp_transport.h"
15 #include "blimp/net/exact_match_cert_verifier.h"
16 #include "blimp/net/tcp_client_transport.h"
17 #include "net/base/address_list.h"
18 #include "net/base/net_errors.h"
19 #include "net/http/transport_security_state.h"
20
21 namespace net {
22 class ClientSocketFactory;
23 class NetLog;
24 class StreamSocket;
25 class TCPClientSocket;
26 class TransportSecurityState;
27 } // namespace net
28
29 namespace blimp {
30
31 class BlimpConnection;
32
33 // Creates and connects SSL socket connections to an Engine.
34 class BLIMP_NET_EXPORT SSLClientTransport : public TCPClientTransport {
35 public:
36 // |ip_endpoint|: the address to connect to.
37 // |cert|: the certificate required from the remote peer.
38 // SSL connections that use different certificates are rejected.
39 // |net_log|: the socket event log (optional).
40 SSLClientTransport(const net::IPEndPoint& ip_endpoint,
41 const scoped_refptr<net::X509Certificate>& cert,
42 net::NetLog* net_log);
43
44 ~SSLClientTransport() override;
45
46 // BlimpTransport implementation.
47 const std::string GetName() const override;
48
49 private:
50 // Method called after TCPClientSocket::Connect finishes.
51 void OnTCPConnectComplete(int result) override;
52
53 // Method called after SSLClientSocket::Connect finishes.
54 void OnSSLConnectComplete(int result);
55
56 net::IPEndPoint ip_endpoint_;
57 ExactMatchCertVerifier cert_verifier_;
58 net::TransportSecurityState transport_security_state_;
59
60 DISALLOW_COPY_AND_ASSIGN(SSLClientTransport);
61 };
62
63 } // namespace blimp
64
65 #endif // BLIMP_NET_SSL_CLIENT_TRANSPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698