Skip to content
Permalink
Browse files
Add SPI to allow creating a WKCertificateInfoRef from a SecTrustRef
https://bugs.webkit.org/show_bug.cgi?id=159025

Patch by Sam Weinig <sam@webkit.org> on 2016-06-22
Reviewed by Tim Horton.

* Shared/API/c/mac/WKCertificateInfoMac.h:
* Shared/API/c/mac/WKCertificateInfoMac.mm:
(WKCertificateInfoCreateWithServerTrust):

Canonical link: https://commits.webkit.org/177128@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Sam Weinig authored and webkit-commit-queue committed Jun 23, 2016
1 parent bd52dfc commit 51b1e17967d07d95f93ac36ebb14dcf0cf21cff1
Showing with 22 additions and 0 deletions.
  1. +11 −0 Source/WebKit2/ChangeLog
  2. +1 −0 Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.h
  3. +10 −0 Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm
@@ -1,3 +1,14 @@
2016-06-22 Sam Weinig <sam@webkit.org>

Add SPI to allow creating a WKCertificateInfoRef from a SecTrustRef
https://bugs.webkit.org/show_bug.cgi?id=159025

Reviewed by Tim Horton.

* Shared/API/c/mac/WKCertificateInfoMac.h:
* Shared/API/c/mac/WKCertificateInfoMac.mm:
(WKCertificateInfoCreateWithServerTrust):

2016-06-22 Brady Eidson <beidson@apple.com>

DatabaseProcess doesn't handle WebProcesses going away uncleanly.
@@ -34,6 +34,7 @@
extern "C" {
#endif

WK_EXPORT WKCertificateInfoRef WKCertificateInfoCreateWithServerTrust(SecTrustRef serverTrust);
WK_EXPORT WKCertificateInfoRef WKCertificateInfoCreateWithCertficateChain(CFArrayRef certificateChain);
WK_EXPORT SecTrustRef WKCertificateInfoGetServerTrust(WKCertificateInfoRef certificateInfo);

@@ -32,6 +32,16 @@
using namespace WebCore;
using namespace WebKit;

WKCertificateInfoRef WKCertificateInfoCreateWithServerTrust(SecTrustRef serverTrust)
{
#if HAVE(SEC_TRUST_SERIALIZATION)
RefPtr<WebCertificateInfo> certificateInfo = WebCertificateInfo::create(CertificateInfo(serverTrust));
return toAPI(certificateInfo.leakRef());
#else
return nullptr;
#endif
}

WKCertificateInfoRef WKCertificateInfoCreateWithCertficateChain(CFArrayRef certificateChain)
{
RefPtr<WebCertificateInfo> certificateInfo = WebCertificateInfo::create(CertificateInfo(certificateChain));

0 comments on commit 51b1e17

Please sign in to comment.