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

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

Issue 2350483002: Improve error pages on client certificate failures. (Closed)
Patch Set: curly quotes 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 | « components/error_page_strings.grdp ('k') | net/socket/ssl_client_socket_impl.cc » ('j') | 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 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_
7 7
8 #include <openssl/base.h> 8 #include <openssl/base.h>
9 #include <openssl/ssl.h> 9 #include <openssl/ssl.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 19 matching lines...) Expand all
30 #include "net/ssl/openssl_ssl_util.h" 30 #include "net/ssl/openssl_ssl_util.h"
31 #include "net/ssl/scoped_openssl_types.h" 31 #include "net/ssl/scoped_openssl_types.h"
32 #include "net/ssl/ssl_client_cert_type.h" 32 #include "net/ssl/ssl_client_cert_type.h"
33 #include "net/ssl/ssl_config_service.h" 33 #include "net/ssl/ssl_config_service.h"
34 34
35 namespace base { 35 namespace base {
36 class FilePath; 36 class FilePath;
37 class SequencedTaskRunner; 37 class SequencedTaskRunner;
38 } 38 }
39 39
40 namespace crypto {
41 class OpenSSLErrStackTracer;
42 }
43
40 namespace net { 44 namespace net {
41 45
42 class CertVerifier; 46 class CertVerifier;
43 class CTVerifier; 47 class CTVerifier;
44 class SSLCertRequestInfo; 48 class SSLCertRequestInfo;
45 class SSLInfo; 49 class SSLInfo;
46 50
47 using TokenBindingSignatureMap = 51 using TokenBindingSignatureMap =
48 base::MRUCache<std::pair<TokenBindingType, std::string>, 52 base::MRUCache<std::pair<TokenBindingType, std::string>,
49 std::vector<uint8_t>>; 53 std::vector<uint8_t>>;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // in a UMA histogram. 245 // in a UMA histogram.
242 void RecordNegotiatedProtocol() const; 246 void RecordNegotiatedProtocol() const;
243 247
244 // Records histograms for channel id support during full handshakes - resumed 248 // Records histograms for channel id support during full handshakes - resumed
245 // handshakes are ignored. 249 // handshakes are ignored.
246 void RecordChannelIDSupport() const; 250 void RecordChannelIDSupport() const;
247 251
248 // Returns whether TLS channel ID is enabled. 252 // Returns whether TLS channel ID is enabled.
249 bool IsChannelIDEnabled() const; 253 bool IsChannelIDEnabled() const;
250 254
255 // Returns the net error corresponding to the most recent OpenSSL
256 // error. ssl_error is the output of SSL_get_error.
257 int MapLastOpenSSLError(int ssl_error,
258 const crypto::OpenSSLErrStackTracer& tracer,
259 OpenSSLErrorInfo* info);
260
251 bool transport_send_busy_; 261 bool transport_send_busy_;
252 bool transport_recv_busy_; 262 bool transport_recv_busy_;
253 263
254 // Buffers which are shared by BoringSSL and SSLClientSocketImpl. 264 // Buffers which are shared by BoringSSL and SSLClientSocketImpl.
255 // GrowableIOBuffer is used to keep ownership and setting offset. 265 // GrowableIOBuffer is used to keep ownership and setting offset.
256 scoped_refptr<GrowableIOBuffer> send_buffer_; 266 scoped_refptr<GrowableIOBuffer> send_buffer_;
257 scoped_refptr<GrowableIOBuffer> recv_buffer_; 267 scoped_refptr<GrowableIOBuffer> recv_buffer_;
258 268
259 CompletionCallback user_connect_callback_; 269 CompletionCallback user_connect_callback_;
260 CompletionCallback user_read_callback_; 270 CompletionCallback user_read_callback_;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 NextProto negotiated_protocol_; 363 NextProto negotiated_protocol_;
354 // Written by the |channel_id_service_|. 364 // Written by the |channel_id_service_|.
355 std::unique_ptr<crypto::ECPrivateKey> channel_id_key_; 365 std::unique_ptr<crypto::ECPrivateKey> channel_id_key_;
356 // True if a channel ID was sent. 366 // True if a channel ID was sent.
357 bool channel_id_sent_; 367 bool channel_id_sent_;
358 // If non-null, the newly-established to be inserted into the session cache 368 // If non-null, the newly-established to be inserted into the session cache
359 // once certificate verification is done. 369 // once certificate verification is done.
360 ScopedSSL_SESSION pending_session_; 370 ScopedSSL_SESSION pending_session_;
361 // True if the initial handshake's certificate has been verified. 371 // True if the initial handshake's certificate has been verified.
362 bool certificate_verified_; 372 bool certificate_verified_;
373 // Set to true if a CertificateRequest was received.
374 bool certificate_requested_;
363 // The request handle for |channel_id_service_|. 375 // The request handle for |channel_id_service_|.
364 ChannelIDService::Request channel_id_request_; 376 ChannelIDService::Request channel_id_request_;
365 377
366 int signature_result_; 378 int signature_result_;
367 std::vector<uint8_t> signature_; 379 std::vector<uint8_t> signature_;
368 380
369 TransportSecurityState* transport_security_state_; 381 TransportSecurityState* transport_security_state_;
370 382
371 CTPolicyEnforcer* const policy_enforcer_; 383 CTPolicyEnforcer* const policy_enforcer_;
372 384
373 // pinning_failure_log contains a message produced by 385 // pinning_failure_log contains a message produced by
374 // TransportSecurityState::CheckPublicKeyPins in the event of a 386 // TransportSecurityState::CheckPublicKeyPins in the event of a
375 // pinning failure. It is a (somewhat) human-readable string. 387 // pinning failure. It is a (somewhat) human-readable string.
376 std::string pinning_failure_log_; 388 std::string pinning_failure_log_;
377 389
378 // True if PKP is bypassed due to a local trust anchor. 390 // True if PKP is bypassed due to a local trust anchor.
379 bool pkp_bypassed_; 391 bool pkp_bypassed_;
380 392
381 NetLogWithSource net_log_; 393 NetLogWithSource net_log_;
382 base::WeakPtrFactory<SSLClientSocketImpl> weak_factory_; 394 base::WeakPtrFactory<SSLClientSocketImpl> weak_factory_;
383 }; 395 };
384 396
385 } // namespace net 397 } // namespace net
386 398
387 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ 399 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_
OLDNEW
« no previous file with comments | « components/error_page_strings.grdp ('k') | net/socket/ssl_client_socket_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698