Changeset 202361 in webkit


Ignore:
Timestamp:
Jun 22, 2016 5:19:53 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

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):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r202359 r202361  
     12016-06-22  Sam Weinig  <sam@webkit.org>
     2
     3        Add SPI to allow creating a WKCertificateInfoRef from a SecTrustRef
     4        https://bugs.webkit.org/show_bug.cgi?id=159025
     5
     6        Reviewed by Tim Horton.
     7
     8        * Shared/API/c/mac/WKCertificateInfoMac.h:
     9        * Shared/API/c/mac/WKCertificateInfoMac.mm:
     10        (WKCertificateInfoCreateWithServerTrust):
     11
    1122016-06-22  Brady Eidson  <beidson@apple.com>
    213
  • trunk/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.h

    r200463 r202361  
    3535#endif
    3636
     37WK_EXPORT WKCertificateInfoRef WKCertificateInfoCreateWithServerTrust(SecTrustRef serverTrust);
    3738WK_EXPORT WKCertificateInfoRef WKCertificateInfoCreateWithCertficateChain(CFArrayRef certificateChain);
    3839WK_EXPORT SecTrustRef WKCertificateInfoGetServerTrust(WKCertificateInfoRef certificateInfo);
  • trunk/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm

    r202242 r202361  
    3333using namespace WebKit;
    3434
     35WKCertificateInfoRef WKCertificateInfoCreateWithServerTrust(SecTrustRef serverTrust)
     36{
     37#if HAVE(SEC_TRUST_SERIALIZATION)
     38    RefPtr<WebCertificateInfo> certificateInfo = WebCertificateInfo::create(CertificateInfo(serverTrust));
     39    return toAPI(certificateInfo.leakRef());
     40#else
     41    return nullptr;
     42#endif
     43}
     44
    3545WKCertificateInfoRef WKCertificateInfoCreateWithCertficateChain(CFArrayRef certificateChain)
    3646{
Note: See TracChangeset for help on using the changeset viewer.