2015-02-11 19:15:04 +01:00
|
|
|
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/libcef/browser/ssl_info_impl.h"
|
2015-02-11 19:15:04 +01:00
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/libcef/browser/x509_certificate_impl.h"
|
2015-12-18 19:03:03 +01:00
|
|
|
#include "net/cert/cert_status_flags.h"
|
|
|
|
|
2024-01-20 23:48:57 +01:00
|
|
|
CefSSLInfoImpl::CefSSLInfoImpl(const net::SSLInfo& value) {
|
2016-09-02 12:01:33 +02:00
|
|
|
cert_status_ = static_cast<cef_cert_status_t>(value.cert_status);
|
2015-02-11 19:15:04 +01:00
|
|
|
if (value.cert.get()) {
|
2016-10-27 19:57:12 +02:00
|
|
|
cert_ = new CefX509CertificateImpl(value.cert);
|
2015-02-11 19:15:04 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-18 19:03:03 +01:00
|
|
|
cef_cert_status_t CefSSLInfoImpl::GetCertStatus() {
|
2016-09-02 12:01:33 +02:00
|
|
|
return cert_status_;
|
2015-02-11 19:15:04 +01:00
|
|
|
}
|
2015-12-18 19:03:03 +01:00
|
|
|
|
2016-09-02 12:01:33 +02:00
|
|
|
CefRefPtr<CefX509Certificate> CefSSLInfoImpl::GetX509Certificate() {
|
|
|
|
return cert_;
|
2015-12-18 19:03:03 +01:00
|
|
|
}
|
|
|
|
|
2016-09-02 12:01:33 +02:00
|
|
|
bool CefIsCertStatusError(cef_cert_status_t status) {
|
|
|
|
return net::IsCertStatusError(status);
|
2015-12-18 19:03:03 +01:00
|
|
|
}
|