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
3 // found in the LICENSE file.
5 #include "net/ssl/ssl_info.h"
7 #include "base/pickle.h"
8 #include "net/cert/cert_status_flags.h"
9 #include "net/cert/signed_certificate_timestamp.h"
10 #include "net/cert/x509_certificate.h"
18 SSLInfo::SSLInfo(const SSLInfo
& info
) {
25 SSLInfo
& SSLInfo::operator=(const SSLInfo
& info
) {
27 unverified_cert
= info
.unverified_cert
;
28 cert_status
= info
.cert_status
;
29 security_bits
= info
.security_bits
;
30 connection_status
= info
.connection_status
;
31 is_issued_by_known_root
= info
.is_issued_by_known_root
;
32 client_cert_sent
= info
.client_cert_sent
;
33 channel_id_sent
= info
.channel_id_sent
;
34 handshake_type
= info
.handshake_type
;
35 public_key_hashes
= info
.public_key_hashes
;
36 signed_certificate_timestamps
= info
.signed_certificate_timestamps
;
37 pinning_failure_log
= info
.pinning_failure_log
;
42 void SSLInfo::Reset() {
44 unverified_cert
= NULL
;
47 connection_status
= 0;
48 is_issued_by_known_root
= false;
49 client_cert_sent
= false;
50 channel_id_sent
= false;
51 handshake_type
= HANDSHAKE_UNKNOWN
;
52 public_key_hashes
.clear();
53 signed_certificate_timestamps
.clear();
54 pinning_failure_log
.clear();
57 void SSLInfo::SetCertError(int error
) {
58 cert_status
|= MapNetErrorToCertStatus(error
);