Title: [276167] trunk/Source/WebCore
Revision
276167
Author
[email protected]
Date
2021-04-16 14:07:29 -0700 (Fri, 16 Apr 2021)

Log Message

[PlayStation][OpenSSL] Remove warnings.
https://bugs.webkit.org/show_bug.cgi?id=224630

Reviewed by Don Olmstead.

There're two kinds of warnings in curl and openssl layer in our platform.

a) Unused param

b) '__WORDSIZE' is not defined.
warning: '__WORDSIZE' is not defined, evaluates to 0 [-Wundef]
#if __WORDSIZE >= 64
^

No new tests because it's only for compilation issue.

* crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):
* crypto/openssl/CryptoKeyECOpenSSL.cpp:
(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformImportPkcs8):
* crypto/openssl/CryptoKeyRSAOpenSSL.cpp:
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (276166 => 276167)


--- trunk/Source/WebCore/ChangeLog	2021-04-16 20:55:48 UTC (rev 276166)
+++ trunk/Source/WebCore/ChangeLog	2021-04-16 21:07:29 UTC (rev 276167)
@@ -1,3 +1,37 @@
+2021-04-16  Basuke Suzuki  <[email protected]>
+
+        [PlayStation][OpenSSL] Remove warnings.
+        https://bugs.webkit.org/show_bug.cgi?id=224630
+
+        Reviewed by Don Olmstead.
+
+        There're two kinds of warnings in curl and openssl layer in our platform.
+
+        a) Unused param
+
+        b) '__WORDSIZE' is not defined. 
+        warning: '__WORDSIZE' is not defined, evaluates to 0 [-Wundef]
+        #if __WORDSIZE >= 64
+        ^
+
+        No new tests because it's only for compilation issue.
+
+        * crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
+        (WebCore::CryptoAlgorithmAES_GCM::encrypt):
+        (WebCore::CryptoAlgorithmAES_GCM::decrypt):
+        * crypto/openssl/CryptoKeyECOpenSSL.cpp:
+        (WebCore::CryptoKeyEC::platformGeneratePair):
+        (WebCore::CryptoKeyEC::platformImportRaw):
+        (WebCore::CryptoKeyEC::platformImportJWKPublic):
+        (WebCore::CryptoKeyEC::platformImportJWKPrivate):
+        (WebCore::CryptoKeyEC::platformImportSpki):
+        (WebCore::CryptoKeyEC::platformImportPkcs8):
+        * crypto/openssl/CryptoKeyRSAOpenSSL.cpp:
+        (WebCore::CryptoKeyRSA::create):
+        (WebCore::CryptoKeyRSA::generatePair):
+        (WebCore::CryptoKeyRSA::importSpki):
+        (WebCore::CryptoKeyRSA::importPkcs8):
+
 2021-04-16  Alex Christensen  <[email protected]>
 
         Disable ApplicationCache with linkedOnOrAfter check

Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp (276166 => 276167)


--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp	2021-04-16 20:55:48 UTC (rev 276166)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp	2021-04-16 21:07:29 UTC (rev 276167)
@@ -39,7 +39,7 @@
 static const char* const ALG128 = "A128GCM";
 static const char* const ALG192 = "A192GCM";
 static const char* const ALG256 = "A256GCM";
-#if __WORDSIZE >= 64
+#if CPU(ADDRESS64)
 static const uint64_t PlainTextMaxLength = 549755813632ULL; // 2^39 - 256
 #endif
 static const uint8_t DefaultTagLength = 128;
@@ -77,7 +77,7 @@
 
     auto& aesParameters = downcast<CryptoAlgorithmAesGcmParams>(parameters);
 
-#if __WORDSIZE >= 64
+#if CPU(ADDRESS64)
     if (plainText.size() > PlainTextMaxLength) {
         exceptionCallback(OperationError);
         return;
@@ -120,7 +120,7 @@
         return;
     }
 
-#if __WORDSIZE >= 64
+#if CPU(ADDRESS64)
     if (aesParameters.ivVector().size() > UINT64_MAX) {
         exceptionCallback(OperationError);
         return;

Modified: trunk/Source/WebCore/crypto/openssl/CryptoKeyECOpenSSL.cpp (276166 => 276167)


--- trunk/Source/WebCore/crypto/openssl/CryptoKeyECOpenSSL.cpp	2021-04-16 20:55:48 UTC (rev 276166)
+++ trunk/Source/WebCore/crypto/openssl/CryptoKeyECOpenSSL.cpp	2021-04-16 21:07:29 UTC (rev 276167)
@@ -46,6 +46,7 @@
 
 Optional<CryptoKeyPair> CryptoKeyEC::platformGeneratePair(CryptoAlgorithmIdentifier, NamedCurve, bool extractable, CryptoKeyUsageBitmap)
 {
+    UNUSED_PARAM(extractable);
     notImplemented();
     return { };
 }
@@ -52,6 +53,8 @@
 
 RefPtr<CryptoKeyEC> CryptoKeyEC::platformImportRaw(CryptoAlgorithmIdentifier, NamedCurve, Vector<uint8_t>&& keyData, bool extractable, CryptoKeyUsageBitmap)
 {
+    UNUSED_PARAM(keyData);
+    UNUSED_PARAM(extractable);
     notImplemented();
     return nullptr;
 }
@@ -58,6 +61,9 @@
 
 RefPtr<CryptoKeyEC> CryptoKeyEC::platformImportJWKPublic(CryptoAlgorithmIdentifier, NamedCurve, Vector<uint8_t>&& x, Vector<uint8_t>&& y, bool extractable, CryptoKeyUsageBitmap)
 {
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(extractable);
     notImplemented();
     return nullptr;
 }
@@ -64,6 +70,10 @@
 
 RefPtr<CryptoKeyEC> CryptoKeyEC::platformImportJWKPrivate(CryptoAlgorithmIdentifier, NamedCurve, Vector<uint8_t>&& x, Vector<uint8_t>&& y, Vector<uint8_t>&& d, bool extractable, CryptoKeyUsageBitmap)
 {
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(d);
+    UNUSED_PARAM(extractable);
     notImplemented();
     return nullptr;
 }
@@ -70,6 +80,8 @@
 
 RefPtr<CryptoKeyEC> CryptoKeyEC::platformImportSpki(CryptoAlgorithmIdentifier, NamedCurve, Vector<uint8_t>&& keyData, bool extractable, CryptoKeyUsageBitmap)
 {
+    UNUSED_PARAM(keyData);
+    UNUSED_PARAM(extractable);
     notImplemented();
     return nullptr;
 }
@@ -76,6 +88,8 @@
 
 RefPtr<CryptoKeyEC> CryptoKeyEC::platformImportPkcs8(CryptoAlgorithmIdentifier, NamedCurve, Vector<uint8_t>&& keyData, bool extractable, CryptoKeyUsageBitmap)
 {
+    UNUSED_PARAM(keyData);
+    UNUSED_PARAM(extractable);
     notImplemented();
     return nullptr;
 }

Modified: trunk/Source/WebCore/crypto/openssl/CryptoKeyRSAOpenSSL.cpp (276166 => 276167)


--- trunk/Source/WebCore/crypto/openssl/CryptoKeyRSAOpenSSL.cpp	2021-04-16 20:55:48 UTC (rev 276166)
+++ trunk/Source/WebCore/crypto/openssl/CryptoKeyRSAOpenSSL.cpp	2021-04-16 21:07:29 UTC (rev 276167)
@@ -33,8 +33,10 @@
 
 namespace WebCore {
 
-RefPtr<CryptoKeyRSA> CryptoKeyRSA::create(CryptoAlgorithmIdentifier, CryptoAlgorithmIdentifier hash, bool hasHash, const CryptoKeyRSAComponents&, bool extractable, CryptoKeyUsageBitmap)
+RefPtr<CryptoKeyRSA> CryptoKeyRSA::create(CryptoAlgorithmIdentifier, CryptoAlgorithmIdentifier, bool hasHash, const CryptoKeyRSAComponents&, bool extractable, CryptoKeyUsageBitmap)
 {
+    UNUSED_PARAM(hasHash);
+    UNUSED_PARAM(extractable);
     notImplemented();
     return nullptr;
 }
@@ -51,19 +53,26 @@
     return 0;
 }
 
-void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier, CryptoAlgorithmIdentifier hash, bool hasHash, unsigned modulusLength, const Vector<uint8_t>& publicExponent, bool extractable, CryptoKeyUsageBitmap, KeyPairCallback&&, VoidCallback&& failureCallback, ScriptExecutionContext*)
+void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier, CryptoAlgorithmIdentifier, bool hasHash, unsigned modulusLength, const Vector<uint8_t>& publicExponent, bool extractable, CryptoKeyUsageBitmap, KeyPairCallback&&, VoidCallback&& failureCallback, ScriptExecutionContext*)
 {
+    UNUSED_PARAM(hasHash);
+    UNUSED_PARAM(modulusLength);
+    UNUSED_PARAM(publicExponent);
+    UNUSED_PARAM(extractable);
+    UNUSED_PARAM(failureCallback);
     notImplemented();
 }
 
-RefPtr<CryptoKeyRSA> CryptoKeyRSA::importSpki(CryptoAlgorithmIdentifier, Optional<CryptoAlgorithmIdentifier> hash, Vector<uint8_t>&&, bool extractable, CryptoKeyUsageBitmap)
+RefPtr<CryptoKeyRSA> CryptoKeyRSA::importSpki(CryptoAlgorithmIdentifier, Optional<CryptoAlgorithmIdentifier>, Vector<uint8_t>&&, bool extractable, CryptoKeyUsageBitmap)
 {
+    UNUSED_PARAM(extractable);
     notImplemented();
     return nullptr;
 }
 
-RefPtr<CryptoKeyRSA> CryptoKeyRSA::importPkcs8(CryptoAlgorithmIdentifier, Optional<CryptoAlgorithmIdentifier> hash, Vector<uint8_t>&&, bool extractable, CryptoKeyUsageBitmap)
+RefPtr<CryptoKeyRSA> CryptoKeyRSA::importPkcs8(CryptoAlgorithmIdentifier, Optional<CryptoAlgorithmIdentifier>, Vector<uint8_t>&&, bool extractable, CryptoKeyUsageBitmap)
 {
+    UNUSED_PARAM(extractable);
     notImplemented();
     return nullptr;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to