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

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

Issue 2400183002: Cleanup: More accurate output parameter type for CTVerifier (Closed)
Patch Set: IWYU, review comments Created 4 years, 2 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
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "remoting/protocol/ssl_hmac_channel_authenticator.h" 5 #include "remoting/protocol/ssl_hmac_channel_authenticator.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/callback_helpers.h" 13 #include "base/callback_helpers.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "crypto/secure_util.h" 17 #include "crypto/secure_util.h"
18 #include "net/base/host_port_pair.h" 18 #include "net/base/host_port_pair.h"
19 #include "net/base/io_buffer.h" 19 #include "net/base/io_buffer.h"
20 #include "net/base/ip_address.h" 20 #include "net/base/ip_address.h"
21 #include "net/base/net_errors.h" 21 #include "net/base/net_errors.h"
22 #include "net/cert/cert_status_flags.h" 22 #include "net/cert/cert_status_flags.h"
23 #include "net/cert/cert_verifier.h" 23 #include "net/cert/cert_verifier.h"
24 #include "net/cert/cert_verify_result.h" 24 #include "net/cert/cert_verify_result.h"
25 #include "net/cert/ct_policy_enforcer.h" 25 #include "net/cert/ct_policy_enforcer.h"
26 #include "net/cert/ct_policy_status.h" 26 #include "net/cert/ct_policy_status.h"
27 #include "net/cert/ct_verifier.h" 27 #include "net/cert/ct_verifier.h"
28 #include "net/cert/signed_certificate_timestamp_and_status.h"
28 #include "net/cert/x509_certificate.h" 29 #include "net/cert/x509_certificate.h"
29 #include "net/http/transport_security_state.h" 30 #include "net/http/transport_security_state.h"
30 #include "net/log/net_log_with_source.h" 31 #include "net/log/net_log_with_source.h"
31 #include "net/socket/client_socket_handle.h" 32 #include "net/socket/client_socket_handle.h"
32 #include "net/socket/ssl_client_socket.h" 33 #include "net/socket/ssl_client_socket.h"
33 #include "net/socket/ssl_server_socket.h" 34 #include "net/socket/ssl_server_socket.h"
34 #include "net/ssl/ssl_config_service.h" 35 #include "net/ssl/ssl_config_service.h"
35 #include "net/ssl/ssl_server_config.h" 36 #include "net/ssl/ssl_server_config.h"
36 #include "remoting/base/rsa_key_pair.h" 37 #include "remoting/base/rsa_key_pair.h"
37 #include "remoting/protocol/auth_util.h" 38 #include "remoting/protocol/auth_util.h"
(...skipping 30 matching lines...) Expand all
68 69
69 // A CTVerifier which ignores Certificate Transparency information. 70 // A CTVerifier which ignores Certificate Transparency information.
70 class IgnoresCTVerifier : public net::CTVerifier { 71 class IgnoresCTVerifier : public net::CTVerifier {
71 public: 72 public:
72 IgnoresCTVerifier() = default; 73 IgnoresCTVerifier() = default;
73 ~IgnoresCTVerifier() override = default; 74 ~IgnoresCTVerifier() override = default;
74 75
75 int Verify(net::X509Certificate* cert, 76 int Verify(net::X509Certificate* cert,
76 const std::string& stapled_ocsp_response, 77 const std::string& stapled_ocsp_response,
77 const std::string& sct_list_from_tls_extension, 78 const std::string& sct_list_from_tls_extension,
78 net::ct::CTVerifyResult* result, 79 net::SignedCertificateTimestampAndStatusList* output_scts,
79 const net::NetLogWithSource& net_log) override { 80 const net::NetLogWithSource& net_log) override {
80 return net::OK; 81 return net::OK;
81 } 82 }
82 83
83 void SetObserver(Observer* observer) override {} 84 void SetObserver(Observer* observer) override {}
84 }; 85 };
85 86
86 // A CTPolicyEnforcer that accepts all certificates. 87 // A CTPolicyEnforcer that accepts all certificates.
87 class IgnoresCTPolicyEnforcer : public net::CTPolicyEnforcer { 88 class IgnoresCTPolicyEnforcer : public net::CTPolicyEnforcer {
88 public: 89 public:
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 std::move(socket_), std::move(server_context_))); 489 std::move(socket_), std::move(server_context_)));
489 } 490 }
490 } 491 }
491 492
492 void SslHmacChannelAuthenticator::NotifyError(int error) { 493 void SslHmacChannelAuthenticator::NotifyError(int error) {
493 base::ResetAndReturn(&done_callback_).Run(error, nullptr); 494 base::ResetAndReturn(&done_callback_).Run(error, nullptr);
494 } 495 }
495 496
496 } // namespace protocol 497 } // namespace protocol
497 } // namespace remoting 498 } // namespace remoting
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698