[Curl] implement CertificateInfo::summaryInfo
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Aug 2019 07:34:23 +0000 (07:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Aug 2019 07:34:23 +0000 (07:34 +0000)
commit71532720ba2b42956efbfe1334d2ef51ff16543e
tree2dfea3aa97175f3faeb3de5f14820f77ed056748
parent7ccde1516c14e04d3fbe4196ff1264786e91d425
[Curl] implement CertificateInfo::summaryInfo
https://bugs.webkit.org/show_bug.cgi?id=191498

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-08-05
Reviewed by Alex Christensen.

Source/WebCore:

Implement CertificaeInfo::SummaryInfo.
This patch makes WebInspector show summary of certificates.

Tests: http/tests/inspector/network/resource-security-certificate.html
       http/tests/inspector/network/getSerializedCertificate.html

* platform/Curl.cmake:
* platform/network/curl/CertificateInfo.h:
(WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
(WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
(WebCore::CertificateInfo::summaryInfo const): Deleted.
* platform/network/curl/CertificateInfoCurl.cpp:
(WebCore::CertificateInfo::summaryInfo const):
* platform/network/curl/CurlSSLVerifier.cpp:
(WebCore::CurlSSLVerifier::collectInfo):
(WebCore::CurlSSLVerifier::verifyCallback):
(WebCore::StackOfX509::StackOfX509): Deleted.
(WebCore::StackOfX509::~StackOfX509): Deleted.
(WebCore::StackOfX509::count): Deleted.
(WebCore::StackOfX509::item): Deleted.
(): Deleted.
(WebCore::BIOHolder::BIOHolder): Deleted.
(WebCore::BIOHolder::~BIOHolder): Deleted.
(WebCore::BIOHolder::write): Deleted.
(WebCore::BIOHolder::asCertificate): Deleted.
(WebCore::pemDataFromCtx): Deleted.
* platform/network/curl/CurlSSLVerifier.h:
* platform/network/curl/OpenSSLHelper.cpp: Added.
(OpenSSL::deleter<X509>::operator()):
(OpenSSL::StackOfGeneralName::StackOfGeneralName):
(OpenSSL::StackOfGeneralName::~StackOfGeneralName):
(OpenSSL::StackOfGeneralName::operator bool):
(OpenSSL::StackOfGeneralName::count):
(OpenSSL::StackOfGeneralName::item):
(OpenSSL::StackOfX509::StackOfX509):
(OpenSSL::StackOfX509::~StackOfX509):
(OpenSSL::StackOfX509::count):
(OpenSSL::StackOfX509::item):
(OpenSSL::BIO::BIO):
(OpenSSL::BIO::~BIO):
(OpenSSL::BIO::getDataAsVector const):
(OpenSSL::BIO::getDataAsString const):
(OpenSSL::BIO::readX509):
(OpenSSL::BIO::get):
(OpenSSL::pemDataFromCtx):
(OpenSSL::createCertificateInfo):
(OpenSSL::toString):
(OpenSSL::getCommonName):
(OpenSSL::getSubjectName):
(OpenSSL::convertASN1TimeToSeconds):
(OpenSSL::getSubjectAltName):
(OpenSSL::createSummaryInfo):
* platform/network/curl/OpenSSLHelper.h: Copied from Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp.

Source/WTF:

Fixed function template for encoding vector.

* wtf/persistence/PersistentCoders.h:

LayoutTests:

* platform/wincairo-wk1/TestExpectations:
* platform/wincairo/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/wincairo-wk1/TestExpectations
LayoutTests/platform/wincairo/TestExpectations
Source/WTF/ChangeLog
Source/WTF/wtf/persistence/PersistentCoders.h
Source/WebCore/ChangeLog
Source/WebCore/platform/Curl.cmake
Source/WebCore/platform/network/curl/CertificateInfo.h
Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp
Source/WebCore/platform/network/curl/CurlSSLVerifier.cpp
Source/WebCore/platform/network/curl/CurlSSLVerifier.h
Source/WebCore/platform/network/curl/OpenSSLHelper.cpp [new file with mode: 0644]
Source/WebCore/platform/network/curl/OpenSSLHelper.h [new file with mode: 0644]