#include "chrome/browser/devtools/protocol/security_handler.h"
#include <string>
#include <vector>
#include "base/base64.h"
#include "components/security_state/content/content_utils.h"
#include "components/security_state/content/security_state_tab_helper.h"
#include "content/public/browser/web_contents.h"
#include "net/base/net_errors.h"
#include "net/cert/x509_certificate.h"
#include "net/cert/x509_util.h"
#include "net/ssl/ssl_cipher_suite_names.h"
#include "net/ssl/ssl_connection_status_flags.h"
#include "services/network/public/cpp/is_potentially_trustworthy.h"
#include "third_party/boringssl/src/include/openssl/ssl.h"
namespace {
const char kInsecureOriginSecurityStateIssueId[] = …;
const char kSchemeIsNotCryptographicSecurityStateIssueId[] = …;
const char kMalicousContentSecurityStateIssueId[] = …;
const char kDisplayedMixedContentSecurityStateIssueId[] = …;
const char kContainedMixedFormSecurityStateIssueId[] = …;
const char kRanMixedContentSecurityStateIssueId[] = …;
const char kDisplayedContentWithCertErrorsSecurityStateIssueId[] = …;
const char kRanContentWithCertErrorSecurityStateIssueId[] = …;
const char kPkpBypassedSecurityStateIssueId[] = …;
const char kIsErrorPageSecurityStateIssueId[] = …;
const char kCertMissingSubjectAltName[] = …;
std::string SecurityLevelToProtocolSecurityState(
security_state::SecurityLevel security_level) { … }
std::unique_ptr<protocol::Security::CertificateSecurityState>
CreateCertificateSecurityState(
const security_state::VisibleSecurityState& state) { … }
std::unique_ptr<protocol::Security::SafetyTipInfo> CreateSafetyTipInfo(
const security_state::SafetyTipInfo& safety_tip_info) { … }
std::unique_ptr<protocol::Security::VisibleSecurityState>
CreateVisibleSecurityState(content::WebContents* web_contents) { … }
}
SecurityHandler::SecurityHandler(content::WebContents* web_contents,
protocol::UberDispatcher* dispatcher)
: … { … }
SecurityHandler::~SecurityHandler() { … }
protocol::Response SecurityHandler::Enable() { … }
protocol::Response SecurityHandler::Disable() { … }
void SecurityHandler::DidChangeVisibleSecurityState() { … }