Title: [228882] trunk/Source/WebCore
Revision
228882
Author
[email protected]
Date
2018-02-21 10:19:03 -0800 (Wed, 21 Feb 2018)

Log Message

[GCrypt] Remove unsound assertion from CryptoKeyRSA::exportData().
https://bugs.webkit.org/show_bug.cgi?id=183001

Reviewed by Philippe Normand.

This function is called from structured cloning, in particular when storing
a key in IndexedDB. This would trip the assertion if the key in question is
non-exportable.

The assertion was copied from the macOS implementation in r172389; it was
subsequently removed there in r172898 to handle this case.

Test: crypto/subtle/rsa-indexeddb-non-exportable.html

* crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
(WebCore::CryptoKeyRSA::exportData const): remove assertion.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (228881 => 228882)


--- trunk/Source/WebCore/ChangeLog	2018-02-21 18:16:20 UTC (rev 228881)
+++ trunk/Source/WebCore/ChangeLog	2018-02-21 18:19:03 UTC (rev 228882)
@@ -1,3 +1,22 @@
+2018-02-21  Ms2ger  <[email protected]>
+
+        [GCrypt] Remove unsound assertion from CryptoKeyRSA::exportData().
+        https://bugs.webkit.org/show_bug.cgi?id=183001
+
+        Reviewed by Philippe Normand.
+
+        This function is called from structured cloning, in particular when storing
+        a key in IndexedDB. This would trip the assertion if the key in question is
+        non-exportable.
+
+        The assertion was copied from the macOS implementation in r172389; it was
+        subsequently removed there in r172898 to handle this case.
+
+        Test: crypto/subtle/rsa-indexeddb-non-exportable.html
+
+        * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
+        (WebCore::CryptoKeyRSA::exportData const): remove assertion.
+
 2018-02-21  Myles C. Maxfield  <[email protected]>
 
         [Cocoa] Make system-ui obey the user-installed-font policy

Modified: trunk/Source/WebCore/crypto/gcrypt/CryptoKeyRSAGCrypt.cpp (228881 => 228882)


--- trunk/Source/WebCore/crypto/gcrypt/CryptoKeyRSAGCrypt.cpp	2018-02-21 18:16:20 UTC (rev 228881)
+++ trunk/Source/WebCore/crypto/gcrypt/CryptoKeyRSAGCrypt.cpp	2018-02-21 18:19:03 UTC (rev 228882)
@@ -645,8 +645,6 @@
 
 std::unique_ptr<CryptoKeyRSAComponents> CryptoKeyRSA::exportData() const
 {
-    ASSERT(extractable());
-
     switch (type()) {
     case CryptoKeyType::Public:
         return CryptoKeyRSAComponents::createPublic(getRSAKeyParameter(m_platformKey, "n"), getRSAKeyParameter(m_platformKey, "e"));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to