Remove kCCNotVerified
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Nov 2018 00:26:09 +0000 (00:26 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Nov 2018 00:26:09 +0000 (00:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192034
<rdar://problem/46235863>

Reviewed by Alexey Proskuryakov.

No change of behaviours.

* crypto/CommonCryptoUtilities.h:
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::verifyRSASSA_PKCS1_v1_5):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238588 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/crypto/CommonCryptoUtilities.h
Source/WebCore/crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp

index ad2c0b5..9a00e4d 100644 (file)
@@ -1,3 +1,17 @@
+2018-11-27  Jiewen Tan  <jiewen_tan@apple.com>
+
+        Remove kCCNotVerified
+        https://bugs.webkit.org/show_bug.cgi?id=192034
+        <rdar://problem/46235863>
+
+        Reviewed by Alexey Proskuryakov.
+
+        No change of behaviours.
+
+        * crypto/CommonCryptoUtilities.h:
+        * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
+        (WebCore::verifyRSASSA_PKCS1_v1_5):
+
 2018-11-27  Simon Fraser  <simon.fraser@apple.com>
 
         Avoid triggering compositing updates when only the root layer is composited
index 9285515..2d41f82 100644 (file)
@@ -71,10 +71,6 @@ enum {
     ccRSAPSSPadding = 1005
 };
 typedef uint32_t CCAsymmetricPadding;
-
-enum {
-    kCCNotVerified = -4306
-};
 #endif
 
 typedef struct _CCBigNumRef *CCBigNumRef;
index 6284c38..19b90ce 100644 (file)
@@ -77,7 +77,7 @@ static ExceptionOr<bool> verifyRSASSA_PKCS1_v1_5(CryptoAlgorithmIdentifier hash,
     auto status = CCRSACryptorVerify(key, ccPKCS1Padding, digestData.data(), digestData.size(), digestAlgorithm, 0, signature.data(), signature.size());
     if (!status)
         return true;
-    if (status == kCCNotVerified || status == kCCDecodeError) // <rdar://problem/15464982> CCRSACryptorVerify returns kCCDecodeError instead of kCCNotVerified sometimes
+    if (status == kCCDecodeError)
         return false;
 
     return Exception { OperationError };