[Cocoa] Adopt CCRSAGetCRTComponents and stop using CCBigNum
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Apr 2018 16:14:37 +0000 (16:14 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Apr 2018 16:14:37 +0000 (16:14 +0000)
commit445425afa765c692c7e7a8b33f7dca6577afa569
treeb2a89d54a168a70480f965a3f606c742d55515a8
parent2f0f4bcaf3239bd2b179b0656c6c819786e83368
[Cocoa] Adopt CCRSAGetCRTComponents and stop using CCBigNum
https://bugs.webkit.org/show_bug.cgi?id=184637

Reviewed by Alexey Proskuryakov.

* crypto/CommonCryptoUtilities.cpp: Compile out WebCore::CCBigNum class if
HAVE(CCRSAGetCRTComponents) is true.

* crypto/CommonCryptoUtilities.h: Define HAVE(CCRSAGetCRTComponents) on new
enough versions of iOS and macOS that have it and add declarations of the
function for the non-Apple-internal-SDK case. Also don't define the
WebCore::CCBigNum class if HAVE(CCRSAGetCRTComponents) is true.

* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::getPrivateKeyComponents): Use CCRSAGetCRTComponents if present.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/crypto/CommonCryptoUtilities.cpp
Source/WebCore/crypto/CommonCryptoUtilities.h
Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp