Commit 13a73330 authored by ap@apple.com's avatar ap@apple.com

Enable WebCrypto on Mac

https://bugs.webkit.org/show_bug.cgi?id=123587

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig: Do it.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig: Enable it.

* bindings/js/JSCryptoAlgorithmDictionary.cpp: Build fix.

* crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
Special case empty keys to avoid upsetting HashMap.

* crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::create):
Build fix. Can't use make_unique, because constructor is private.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig: Do it.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig: Do it.

LayoutTests:

* TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
Only skipping on specific platforms now.

* crypto: Added.
* crypto/crypto-gc-expected.txt: Copied from LayoutTests/security/crypto-gc-expected.txt.
* crypto/crypto-gc.html: Copied from LayoutTests/security/crypto-gc.html.
* crypto/crypto-random-values-expected.txt: Copied from LayoutTests/security/crypto-random-values-expected.txt.
* crypto/crypto-random-values-limits-expected.txt: Copied from LayoutTests/security/crypto-random-values-limits-expected.txt.
* crypto/crypto-random-values-limits.html: Copied from LayoutTests/security/crypto-random-values-limits.html.
* crypto/crypto-random-values-types-expected.txt: Copied from LayoutTests/security/crypto-random-values-types-expected.txt.
* crypto/crypto-random-values-types.html: Copied from LayoutTests/security/crypto-random-values-types.html.
* crypto/crypto-random-values.html: Copied from LayoutTests/security/crypto-random-values.html.
* crypto/subtle: Added.
* crypto/subtle/argument-conversion-expected.txt: Copied from LayoutTests/security/crypto-subtle-arguments-expected.txt.
* crypto/subtle/argument-conversion.html: Copied from LayoutTests/security/crypto-subtle-arguments.html.
* crypto/subtle/gc-2-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-2-expected.txt.
* crypto/subtle/gc-2.html: Copied from LayoutTests/security/crypto-subtle-gc-2.html.
* crypto/subtle/gc-3-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-3-expected.txt.
* crypto/subtle/gc-3.html: Copied from LayoutTests/security/crypto-subtle-gc-3.html.
* crypto/subtle/gc-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-expected.txt.
* crypto/subtle/gc.html: Copied from LayoutTests/security/crypto-subtle-gc.html.
* crypto/subtle/resources: Added.
* crypto/subtle/resources/common.js: Copied from LayoutTests/security/resources/common.js.
* crypto/subtle/sha-1-expected.txt: Copied from LayoutTests/security/crypto-subtle-sha1-expected.txt.
* crypto/subtle/sha-1.html: Copied from LayoutTests/security/crypto-subtle-sha1.html.
* security/crypto-gc-expected.txt: Removed.
* security/crypto-gc.html: Removed.
* security/crypto-random-values-expected.txt: Removed.
* security/crypto-random-values-limits-expected.txt: Removed.
* security/crypto-random-values-limits.html: Removed.
* security/crypto-random-values-types-expected.txt: Removed.
* security/crypto-random-values-types.html: Removed.
* security/crypto-random-values.html: Removed.
* security/crypto-subtle-arguments-expected.txt: Removed.
* security/crypto-subtle-arguments.html: Removed.
* security/crypto-subtle-gc-2-expected.txt: Removed.
* security/crypto-subtle-gc-2.html: Removed.
* security/crypto-subtle-gc-3-expected.txt: Removed.
* security/crypto-subtle-gc-3.html: Removed.
* security/crypto-subtle-gc-expected.txt: Removed.
* security/crypto-subtle-gc.html: Removed.
* security/crypto-subtle-sha1-expected.txt: Removed.
* security/crypto-subtle-sha1.html: Removed.
* security/resources/common.js: Removed.
Moved tests from security/ to crypto/.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3c4928f1
2013-10-31 Alexey Proskuryakov <ap@apple.com>
Enable WebCrypto on Mac
https://bugs.webkit.org/show_bug.cgi?id=123587
Reviewed by Anders Carlsson.
* TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
Only skipping on specific platforms now.
* crypto: Added.
* crypto/crypto-gc-expected.txt: Copied from LayoutTests/security/crypto-gc-expected.txt.
* crypto/crypto-gc.html: Copied from LayoutTests/security/crypto-gc.html.
* crypto/crypto-random-values-expected.txt: Copied from LayoutTests/security/crypto-random-values-expected.txt.
* crypto/crypto-random-values-limits-expected.txt: Copied from LayoutTests/security/crypto-random-values-limits-expected.txt.
* crypto/crypto-random-values-limits.html: Copied from LayoutTests/security/crypto-random-values-limits.html.
* crypto/crypto-random-values-types-expected.txt: Copied from LayoutTests/security/crypto-random-values-types-expected.txt.
* crypto/crypto-random-values-types.html: Copied from LayoutTests/security/crypto-random-values-types.html.
* crypto/crypto-random-values.html: Copied from LayoutTests/security/crypto-random-values.html.
* crypto/subtle: Added.
* crypto/subtle/argument-conversion-expected.txt: Copied from LayoutTests/security/crypto-subtle-arguments-expected.txt.
* crypto/subtle/argument-conversion.html: Copied from LayoutTests/security/crypto-subtle-arguments.html.
* crypto/subtle/gc-2-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-2-expected.txt.
* crypto/subtle/gc-2.html: Copied from LayoutTests/security/crypto-subtle-gc-2.html.
* crypto/subtle/gc-3-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-3-expected.txt.
* crypto/subtle/gc-3.html: Copied from LayoutTests/security/crypto-subtle-gc-3.html.
* crypto/subtle/gc-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-expected.txt.
* crypto/subtle/gc.html: Copied from LayoutTests/security/crypto-subtle-gc.html.
* crypto/subtle/resources: Added.
* crypto/subtle/resources/common.js: Copied from LayoutTests/security/resources/common.js.
* crypto/subtle/sha-1-expected.txt: Copied from LayoutTests/security/crypto-subtle-sha1-expected.txt.
* crypto/subtle/sha-1.html: Copied from LayoutTests/security/crypto-subtle-sha1.html.
* security/crypto-gc-expected.txt: Removed.
* security/crypto-gc.html: Removed.
* security/crypto-random-values-expected.txt: Removed.
* security/crypto-random-values-limits-expected.txt: Removed.
* security/crypto-random-values-limits.html: Removed.
* security/crypto-random-values-types-expected.txt: Removed.
* security/crypto-random-values-types.html: Removed.
* security/crypto-random-values.html: Removed.
* security/crypto-subtle-arguments-expected.txt: Removed.
* security/crypto-subtle-arguments.html: Removed.
* security/crypto-subtle-gc-2-expected.txt: Removed.
* security/crypto-subtle-gc-2.html: Removed.
* security/crypto-subtle-gc-3-expected.txt: Removed.
* security/crypto-subtle-gc-3.html: Removed.
* security/crypto-subtle-gc-expected.txt: Removed.
* security/crypto-subtle-gc.html: Removed.
* security/crypto-subtle-sha1-expected.txt: Removed.
* security/crypto-subtle-sha1.html: Removed.
* security/resources/common.js: Removed.
Moved tests from security/ to crypto/.
2013-10-31 Myles C. Maxfield <mmaxfield@apple.com> 2013-10-31 Myles C. Maxfield <mmaxfield@apple.com>
Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION) Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION)
......
...@@ -71,12 +71,5 @@ fast/mediastream/MediaStream-clone.html [ Skip ] ...@@ -71,12 +71,5 @@ fast/mediastream/MediaStream-clone.html [ Skip ]
# Skipping it for now, then put it again when the spec decides it # Skipping it for now, then put it again when the spec decides it
fast/mediastream/MediaStream-onended.html [ Skip ] fast/mediastream/MediaStream-onended.html [ Skip ]
# crypto.subtle is not yet enabled on any ports
webkit.org/b/122679 security/crypto-subtle-gc.html [ Skip ]
webkit.org/b/122679 security/crypto-subtle-gc-2.html [ Skip ]
webkit.org/b/122679 security/crypto-subtle-gc-3.html [ Skip ]
webkit.org/b/122679 security/crypto-subtle-sha1.html [ Skip ]
webkit.org/b/122679 security/crypto-subtle-arguments.html [ Skip ]
webkit.org/b/123555 [ Debug ] media/media-fragments/TC0054.html [ Crash ] webkit.org/b/123555 [ Debug ] media/media-fragments/TC0054.html [ Crash ]
webkit.org/b/123555 [ Debug ] media/media-fragments/TC0061.html [ Crash ] webkit.org/b/123555 [ Debug ] media/media-fragments/TC0061.html [ Crash ]
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<script src="../resources/js-test-pre.js"></script> <script src="../../resources/js-test-pre.js"></script>
<script src="resources/common.js"></script> <script src="resources/common.js"></script>
</head> </head>
<body> <body>
...@@ -60,6 +60,6 @@ Promise.fulfill(null).then(function() { ...@@ -60,6 +60,6 @@ Promise.fulfill(null).then(function() {
</script> </script>
<script src="../resources/js-test-post.js"></script> <script src="../../resources/js-test-post.js"></script>
</body> </body>
</html> </html>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<script src="../resources/js-test-pre.js"></script> <script src="../../resources/js-test-pre.js"></script>
</head> </head>
<body> <body>
<script> <script>
...@@ -41,6 +41,6 @@ window.onload = startTest; ...@@ -41,6 +41,6 @@ window.onload = startTest;
</script> </script>
<iframe src="about:blank"></iframe> <iframe src="about:blank"></iframe>
<script src="../resources/js-test-post.js"></script> <script src="../../resources/js-test-post.js"></script>
</body> </body>
</html> </html>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<script src="../resources/js-test-pre.js"></script> <script src="../../resources/js-test-pre.js"></script>
</head> </head>
<body> <body>
<script> <script>
...@@ -38,6 +38,6 @@ window.onload = startTest; ...@@ -38,6 +38,6 @@ window.onload = startTest;
</script> </script>
<iframe src="about:blank"></iframe> <iframe src="about:blank"></iframe>
<script src="../resources/js-test-post.js"></script> <script src="../../resources/js-test-post.js"></script>
</body> </body>
</html> </html>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<script src="../resources/js-test-pre.js"></script> <script src="../../resources/js-test-pre.js"></script>
</head> </head>
<body> <body>
<script> <script>
...@@ -33,6 +33,6 @@ function finishTest() ...@@ -33,6 +33,6 @@ function finishTest()
window.onload = startTest; window.onload = startTest;
</script> </script>
<script src="../resources/js-test-post.js"></script> <script src="../../resources/js-test-post.js"></script>
</body> </body>
</html> </html>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<script src="../resources/js-test-pre.js"></script> <script src="../../resources/js-test-pre.js"></script>
<script src="resources/common.js"></script> <script src="resources/common.js"></script>
</head> </head>
<body> <body>
...@@ -43,6 +43,6 @@ Promise.fulfill(null).then(function() { ...@@ -43,6 +43,6 @@ Promise.fulfill(null).then(function() {
}); });
</script> </script>
<script src="../resources/js-test-post.js"></script> <script src="../../resources/js-test-post.js"></script>
</body> </body>
</html> </html>
...@@ -1588,3 +1588,6 @@ webkit.org/b/123561 printing/setPrinting.html [ Missing ] ...@@ -1588,3 +1588,6 @@ webkit.org/b/123561 printing/setPrinting.html [ Missing ]
webkit.org/b/123561 printing/simultaneous-position-float-change.html [ Missing ] webkit.org/b/123561 printing/simultaneous-position-float-change.html [ Missing ]
webkit.org/b/123561 printing/single-line-must-not-be-split-into-two-pages.html [ Missing ] webkit.org/b/123561 printing/single-line-must-not-be-split-into-two-pages.html [ Missing ]
webkit.org/b/123561 printing/width-overflow.html [ Missing ] webkit.org/b/123561 printing/width-overflow.html [ Missing ]
# crypto.subtle is not yet enabled
crypto/subtle [ Skip ]
...@@ -456,6 +456,9 @@ webkit.org/b/107194 http/tests/security/no-indexeddb-from-sandbox.html [ Skip ] ...@@ -456,6 +456,9 @@ webkit.org/b/107194 http/tests/security/no-indexeddb-from-sandbox.html [ Skip ]
# Needs to update the gtk databaseQuotaExceeded() test function to handle quota expansion requests. # Needs to update the gtk databaseQuotaExceeded() test function to handle quota expansion requests.
storage/websql/open-database-expand-quota.html [ Failure ] storage/websql/open-database-expand-quota.html [ Failure ]
# crypto.subtle is not yet enabled
crypto/subtle [ Skip ]
#//////////////////////////////////////////////////////////////////////////////////////// #////////////////////////////////////////////////////////////////////////////////////////
# End of Expected failures # End of Expected failures
#//////////////////////////////////////////////////////////////////////////////////////// #////////////////////////////////////////////////////////////////////////////////////////
......
...@@ -2875,4 +2875,5 @@ printing/print-close-crash.html ...@@ -2875,4 +2875,5 @@ printing/print-close-crash.html
# Test introduced in r157133 fails. State of colorspace management on Windows is unclear. # Test introduced in r157133 fails. State of colorspace management on Windows is unclear.
media/video-canvas-drawing-output.html media/video-canvas-drawing-output.html
# crypto.subtle is not yet enabled
crypto/subtle [ Skip ]
...@@ -2850,3 +2850,6 @@ webkit.org/b/?????? http/tests/loading/promote-img-preload-priority.html [ Failu ...@@ -2850,3 +2850,6 @@ webkit.org/b/?????? http/tests/loading/promote-img-preload-priority.html [ Failu
# No concept of secure text input # No concept of secure text input
editing/secure-input [ Failure ] editing/secure-input [ Failure ]
# crypto.subtle is not yet enabled
crypto/subtle [ Skip ]
2013-10-31 Alexey Proskuryakov <ap@apple.com>
Enable WebCrypto on Mac
https://bugs.webkit.org/show_bug.cgi?id=123587
Reviewed by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig: Do it.
2013-10-31 Filip Pizlo <fpizlo@apple.com> 2013-10-31 Filip Pizlo <fpizlo@apple.com>
Unreviewed, really remove CachedTranscendentalFunction.h. Unreviewed, really remove CachedTranscendentalFunction.h.
......
...@@ -155,7 +155,7 @@ ENABLE_SPEECH_SYNTHESIS = $(ENABLE_SPEECH_SYNTHESIS_$(PLATFORM_NAME)); ...@@ -155,7 +155,7 @@ ENABLE_SPEECH_SYNTHESIS = $(ENABLE_SPEECH_SYNTHESIS_$(PLATFORM_NAME));
ENABLE_SPEECH_SYNTHESIS_macosx = ENABLE_SPEECH_SYNTHESIS; ENABLE_SPEECH_SYNTHESIS_macosx = ENABLE_SPEECH_SYNTHESIS;
ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE; ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE;
ENABLE_SUBPIXEL_LAYOUT = ; ENABLE_SUBPIXEL_LAYOUT = ;
ENABLE_SUBTLE_CRYPTO = ; ENABLE_SUBTLE_CRYPTO = ENABLE_SUBTLE_CRYPTO;
ENABLE_SVG = ENABLE_SVG; ENABLE_SVG = ENABLE_SVG;
ENABLE_SVG_FONTS = ENABLE_SVG_FONTS; ENABLE_SVG_FONTS = ENABLE_SVG_FONTS;
ENABLE_TEMPLATE_ELEMENT = ; ENABLE_TEMPLATE_ELEMENT = ;
......
2013-10-31 Alexey Proskuryakov <ap@apple.com>
Enable WebCrypto on Mac
https://bugs.webkit.org/show_bug.cgi?id=123587
Reviewed by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig: Enable it.
* bindings/js/JSCryptoAlgorithmDictionary.cpp: Build fix.
* crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
Special case empty keys to avoid upsetting HashMap.
* crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::create):
Build fix. Can't use make_unique, because constructor is private.
2013-10-31 Myles C. Maxfield <mmaxfield@apple.com> 2013-10-31 Myles C. Maxfield <mmaxfield@apple.com>
Underline bounds cannot be queried before underline itself is drawn Underline bounds cannot be queried before underline itself is drawn
......
...@@ -155,7 +155,7 @@ ENABLE_SPEECH_SYNTHESIS = $(ENABLE_SPEECH_SYNTHESIS_$(PLATFORM_NAME)); ...@@ -155,7 +155,7 @@ ENABLE_SPEECH_SYNTHESIS = $(ENABLE_SPEECH_SYNTHESIS_$(PLATFORM_NAME));
ENABLE_SPEECH_SYNTHESIS_macosx = ENABLE_SPEECH_SYNTHESIS; ENABLE_SPEECH_SYNTHESIS_macosx = ENABLE_SPEECH_SYNTHESIS;
ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE; ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE;
ENABLE_SUBPIXEL_LAYOUT = ; ENABLE_SUBPIXEL_LAYOUT = ;
ENABLE_SUBTLE_CRYPTO = ; ENABLE_SUBTLE_CRYPTO = ENABLE_SUBTLE_CRYPTO;
ENABLE_SVG = ENABLE_SVG; ENABLE_SVG = ENABLE_SVG;
ENABLE_SVG_FONTS = ENABLE_SVG_FONTS; ENABLE_SVG_FONTS = ENABLE_SVG_FONTS;
ENABLE_TEMPLATE_ELEMENT = ; ENABLE_TEMPLATE_ELEMENT = ;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#if ENABLE(SUBTLE_CRYPTO) #if ENABLE(SUBTLE_CRYPTO)
#include <runtime/ObjectConstructor.h> #include <runtime/ObjectConstructor.h>
#include <runtime/Operations.h>
using namespace JSC; using namespace JSC;
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#if ENABLE(SUBTLE_CRYPTO) #if ENABLE(SUBTLE_CRYPTO)
#include "CryptoAlgorithmHMAC.h"
#include "CryptoAlgorithmHmacKeyParams.h" #include "CryptoAlgorithmHmacKeyParams.h"
#include "CryptoAlgorithmHmacParams.h" #include "CryptoAlgorithmHmacParams.h"
#include "CryptoAlgorithmRegistry.h" #include "CryptoAlgorithmRegistry.h"
...@@ -149,7 +148,7 @@ static std::unique_ptr<CryptoAlgorithmParameters> createHmacKeyParams(JSC::ExecS ...@@ -149,7 +148,7 @@ static std::unique_ptr<CryptoAlgorithmParameters> createHmacKeyParams(JSC::ExecS
return std::move(result); return std::move(result);
} }
std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForEncrypt(JSC::ExecState* exec, CryptoAlgorithmIdentifier, JSC::JSValue) std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForEncrypt(JSC::ExecState* exec, CryptoAlgorithmIdentifier algorithm, JSC::JSValue)
{ {
switch (algorithm) { switch (algorithm) {
case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5: case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5:
...@@ -178,7 +177,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa ...@@ -178,7 +177,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa
} }
} }
std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForDecrypt(JSC::ExecState* exec, CryptoAlgorithmIdentifier, JSC::JSValue) std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForDecrypt(JSC::ExecState* exec, CryptoAlgorithmIdentifier algorithm, JSC::JSValue)
{ {
switch (algorithm) { switch (algorithm) {
case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5: case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5:
...@@ -303,7 +302,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa ...@@ -303,7 +302,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa
} }
} }
std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForGenerateKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier, JSC::JSValue) std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForGenerateKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier algorithm, JSC::JSValue)
{ {
switch (algorithm) { switch (algorithm) {
case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5: case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5:
...@@ -332,7 +331,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa ...@@ -332,7 +331,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa
} }
} }
std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForDeriveKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier, JSC::JSValue) std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForDeriveKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier algorithm, JSC::JSValue)
{ {
switch (algorithm) { switch (algorithm) {
case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5: case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5:
...@@ -361,7 +360,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa ...@@ -361,7 +360,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa
} }
} }
std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForDeriveBits(JSC::ExecState* exec, CryptoAlgorithmIdentifier, JSC::JSValue) std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForDeriveBits(JSC::ExecState* exec, CryptoAlgorithmIdentifier algorithm, JSC::JSValue)
{ {
switch (algorithm) { switch (algorithm) {
case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5: case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5:
...@@ -422,7 +421,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa ...@@ -422,7 +421,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa
} }
} }
std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForExportKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier, JSC::JSValue) std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForExportKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier algorithm, JSC::JSValue)
{ {
switch (algorithm) { switch (algorithm) {
case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5: case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5:
...@@ -451,7 +450,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa ...@@ -451,7 +450,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa
} }
} }
std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForWrapKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier, JSC::JSValue) std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForWrapKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier algorithm, JSC::JSValue)
{ {
switch (algorithm) { switch (algorithm) {
case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5: case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5:
...@@ -480,7 +479,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa ...@@ -480,7 +479,7 @@ std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createPa
} }
} }
std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForUnwrapKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier, JSC::JSValue) std::unique_ptr<CryptoAlgorithmParameters> JSCryptoAlgorithmDictionary::createParametersForUnwrapKey(JSC::ExecState* exec, CryptoAlgorithmIdentifier algorithm, JSC::JSValue)
{ {
switch (algorithm) { switch (algorithm) {
case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5: case CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5:
......
...@@ -47,6 +47,9 @@ CryptoAlgorithmRegistry::CryptoAlgorithmRegistry() ...@@ -47,6 +47,9 @@ CryptoAlgorithmRegistry::CryptoAlgorithmRegistry()
bool CryptoAlgorithmRegistry::getIdentifierForName(const String& name, CryptoAlgorithmIdentifier& result) bool CryptoAlgorithmRegistry::getIdentifierForName(const String& name, CryptoAlgorithmIdentifier& result)
{ {
if (name.isEmpty())
return false;
auto iter = m_nameToIdentifierMap.find(name.lower()); auto iter = m_nameToIdentifierMap.find(name.lower());
if (iter == m_nameToIdentifierMap.end()) if (iter == m_nameToIdentifierMap.end())
return false; return false;
......
...@@ -42,7 +42,7 @@ CryptoAlgorithmSHA1::~CryptoAlgorithmSHA1() ...@@ -42,7 +42,7 @@ CryptoAlgorithmSHA1::~CryptoAlgorithmSHA1()
std::unique_ptr<CryptoAlgorithm> CryptoAlgorithmSHA1::create() std::unique_ptr<CryptoAlgorithm> CryptoAlgorithmSHA1::create()
{ {
return std::make_unique<CryptoAlgorithmSHA1>(); return std::unique_ptr<CryptoAlgorithm>(new CryptoAlgorithmSHA1);
} }
CryptoAlgorithmIdentifier CryptoAlgorithmSHA1::identifier() const CryptoAlgorithmIdentifier CryptoAlgorithmSHA1::identifier() const
......
2013-10-31 Alexey Proskuryakov <ap@apple.com>
Enable WebCrypto on Mac
https://bugs.webkit.org/show_bug.cgi?id=123587
Reviewed by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig: Do it.
2013-10-30 Ryosuke Niwa <rniwa@webkit.org> 2013-10-30 Ryosuke Niwa <rniwa@webkit.org>
Remove code for Mac Lion Remove code for Mac Lion
......
...@@ -155,7 +155,7 @@ ENABLE_SPEECH_SYNTHESIS = $(ENABLE_SPEECH_SYNTHESIS_$(PLATFORM_NAME)); ...@@ -155,7 +155,7 @@ ENABLE_SPEECH_SYNTHESIS = $(ENABLE_SPEECH_SYNTHESIS_$(PLATFORM_NAME));
ENABLE_SPEECH_SYNTHESIS_macosx = ENABLE_SPEECH_SYNTHESIS; ENABLE_SPEECH_SYNTHESIS_macosx = ENABLE_SPEECH_SYNTHESIS;
ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE; ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE;
ENABLE_SUBPIXEL_LAYOUT = ; ENABLE_SUBPIXEL_LAYOUT = ;
ENABLE_SUBTLE_CRYPTO = ; ENABLE_SUBTLE_CRYPTO = ENABLE_SUBTLE_CRYPTO;
ENABLE_SVG = ENABLE_SVG; ENABLE_SVG = ENABLE_SVG;
ENABLE_SVG_FONTS = ENABLE_SVG_FONTS; ENABLE_SVG_FONTS = ENABLE_SVG_FONTS;
ENABLE_TEMPLATE_ELEMENT = ; ENABLE_TEMPLATE_ELEMENT = ;
......
2013-10-31 Alexey Proskuryakov <ap@apple.com>
Enable WebCrypto on Mac
https://bugs.webkit.org/show_bug.cgi?id=123587
Reviewed by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig: Do it.
2013-10-31 Sergio Correia <sergio.correia@openbossa.org> 2013-10-31 Sergio Correia <sergio.correia@openbossa.org>
[WK2] Convert SeccompFilters to using unique_ptr instead of OwnPtr/PassOwnPtr [WK2] Convert SeccompFilters to using unique_ptr instead of OwnPtr/PassOwnPtr
......
...@@ -155,7 +155,7 @@ ENABLE_SPEECH_SYNTHESIS = $(ENABLE_SPEECH_SYNTHESIS_$(PLATFORM_NAME)); ...@@ -155,7 +155,7 @@ ENABLE_SPEECH_SYNTHESIS = $(ENABLE_SPEECH_SYNTHESIS_$(PLATFORM_NAME));
ENABLE_SPEECH_SYNTHESIS_macosx = ENABLE_SPEECH_SYNTHESIS; ENABLE_SPEECH_SYNTHESIS_macosx = ENABLE_SPEECH_SYNTHESIS;
ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE; ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE;
ENABLE_SUBPIXEL_LAYOUT = ; ENABLE_SUBPIXEL_LAYOUT = ;
ENABLE_SUBTLE_CRYPTO = ; ENABLE_SUBTLE_CRYPTO = ENABLE_SUBTLE_CRYPTO;
ENABLE_SVG = ENABLE_SVG; ENABLE_SVG = ENABLE_SVG;
ENABLE_SVG_FONTS = ENABLE_SVG_FONTS; ENABLE_SVG_FONTS = ENABLE_SVG_FONTS;
ENABLE_TEMPLATE_ELEMENT = ; ENABLE_TEMPLATE_ELEMENT = ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment