Unreviewed, rolling out r159160, r159161, and r159164.

http://trac.webkit.org/changeset/159160
http://trac.webkit.org/changeset/159161
http://trac.webkit.org/changeset/159164
https://bugs.webkit.org/show_bug.cgi?id=124253

Too many errors (make fewer) (Requested by ap on #webkit).

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
* bindings/js/JSCryptoAlgorithmBuilder.h:
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesCbcParams):
(WebCore::createAesKeyGenParams):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey):
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
(WebCore::JSCryptoKeySerializationJWK::keyData):
* bindings/js/JSCryptoKeySerializationJWK.h:
* crypto/CryptoAlgorithmDescriptionBuilder.h:
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Removed.
* crypto/CryptoKey.h:
(WebCore::ENUM_CLASS):
* crypto/CryptoKeyData.h:
(WebCore::CryptoKeyData::ENUM_CLASS):
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Removed.
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Removed.
* crypto/keys/CryptoKeyAES.h:
(WebCore::asCryptoKeyAES):
* crypto/keys/CryptoKeyDataOctetSequence.h:
(WebCore::asCryptoKeyDataOctetSequence):
* crypto/keys/CryptoKeyDataRSAComponents.cpp: Removed.
* crypto/keys/CryptoKeyDataRSAComponents.h: Removed.
* crypto/keys/CryptoKeyHMAC.h:
(WebCore::asCryptoKeyHMAC):
* crypto/keys/CryptoKeyRSA.h: Removed.
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
* crypto/mac/CryptoKeyRSAMac.cpp: Removed.
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Removed.
* crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed.
* crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Removed.

LayoutTests:

* crypto/subtle/resources/common.js:
(hexToArrayBuffer):
* crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt: Removed.
* crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html: Removed.
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt: Removed.
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html: Removed.
* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 102fef8c
2013-11-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r159160, r159161, and r159164.
http://trac.webkit.org/changeset/159160
http://trac.webkit.org/changeset/159161
http://trac.webkit.org/changeset/159164
https://bugs.webkit.org/show_bug.cgi?id=124253
Too many errors (make fewer) (Requested by ap on #webkit).
* crypto/subtle/resources/common.js:
(hexToArrayBuffer):
* crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt: Removed.
* crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html: Removed.
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt: Removed.
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html: Removed.
* platform/mac/TestExpectations:
2013-11-12 Alexey Proskuryakov <ap@apple.com>
Implement key generation and JWK import for RSASSA-PKCS1-v1_5
......
......@@ -48,24 +48,13 @@ function asciiToArrayBuffer(str)
function hexToArrayBuffer(str)
{
if (str.length % 2)
throw "Hex string length must be even";
throw "Hex string lenght must be even";
var chars = [];
for (var i = 0; i < str.length; i += 2)
chars.push(parseInt(str.substr(i, 2), 16));
return new Uint8Array(chars);
}
var Base64URL = {
stringify: function (a) {
var base64string = btoa(String.fromCharCode.apply(0, a));
return base64string.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
},
parse: function (s) {
s = s.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, '');
return new Uint8Array(Array.prototype.map.call(atob(s), function (c) { return c.charCodeAt(0) }));
}
};
function printRejectedResult(value)
{
debug(" rejected with value of " + value);
......
Test generating an RSA key pair for RSASSA-PKCS1-v1_5.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Generating a key pair...
PASS keyPair.toString() is '[object KeyPair]'
PASS keyPair.publicKey.type is 'public'
PASS keyPair.publicKey.algorithm.name is 'rsassa-pkcs1-v1_5'
PASS keyPair.publicKey.algorithm.modulusLength is 2048
PASS byteArrayToHexString(keyPair.publicKey.algorithm.publicExponent) is '[01 00 01]'
PASS keyPair.publicKey.algorithm.hash is undefined.
PASS keyPair.privateKey.type is 'private'
PASS keyPair.privateKey.algorithm.name is 'rsassa-pkcs1-v1_5'
PASS keyPair.privateKey.algorithm.modulusLength is 2048
PASS byteArrayToHexString(keyPair.privateKey.algorithm.publicExponent) is '[01 00 01]'
PASS keyPair.privateKey.algorithm.hash is undefined.
Testing that custom attributes on keys survive garbage collection...
PASS keyPair.publicKey.foo is 'bar'
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/common.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("Test generating an RSA key pair for RSASSA-PKCS1-v1_5.");
jsTestIsAsync = true;
if (!window.subtle)
window.crypto.subtle = window.crypto.webkitSubtle;
var algorithmKeyGen = {
name: "RSASSA-PKCS1-v1_5",
// RsaKeyGenParams
modulusLength: 2048,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // Equivalent to 65537
};
var extractable = true;
debug("Generating a key pair...");
crypto.subtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) {
keyPair = result;
shouldBe("keyPair.toString()", "'[object KeyPair]'");
shouldBe("keyPair.publicKey.type", "'public'");
shouldBe("keyPair.publicKey.algorithm.name", "'rsassa-pkcs1-v1_5'");
shouldBe("keyPair.publicKey.algorithm.modulusLength", "2048");
shouldBe("byteArrayToHexString(keyPair.publicKey.algorithm.publicExponent)", "'[01 00 01]'");
shouldBeUndefined("keyPair.publicKey.algorithm.hash");
shouldBe("keyPair.privateKey.type", "'private'");
shouldBe("keyPair.privateKey.algorithm.name", "'rsassa-pkcs1-v1_5'");
shouldBe("keyPair.privateKey.algorithm.modulusLength", "2048");
shouldBe("byteArrayToHexString(keyPair.privateKey.algorithm.publicExponent)", "'[01 00 01]'");
shouldBeUndefined("keyPair.privateKey.algorithm.hash");
debug("\nTesting that custom attributes on keys survive garbage collection...");
keyPair.publicKey.foo = "bar";
gc();
setTimeout(function() {
gc();
setTimeout(function() {
shouldBe("keyPair.publicKey.foo", "'bar'");
finishJSTest();
}, 0);
}, 0);
});
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
Test importing an RSA key for RSASSA-PKCS1-v1_5.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Importing a public key...
PASS publicKey.toString() is '[object Key]'
PASS publicKey.type is 'public'
PASS publicKey.usages is ['sign','verify']
PASS publicKey.algorithm.name is 'rsassa-pkcs1-v1_5'
PASS publicKey.algorithm.modulusLength is 2048
PASS byteArrayToHexString(publicKey.algorithm.publicExponent) is '[01 00 01]'
PASS publicKey.algorithm.hash.name is 'sha-256'
Importing a private key...
PASS privateKey.toString() is '[object Key]'
PASS privateKey.type is 'private'
PASS privateKey.usages is ['sign','verify']
PASS privateKey.algorithm.name is 'rsassa-pkcs1-v1_5'
PASS privateKey.algorithm.modulusLength is 2048
PASS byteArrayToHexString(privateKey.algorithm.publicExponent) is '[01 00 01]'
PASS privateKey.algorithm.hash.name is 'sha-256'
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/common.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("Test importing an RSA key for RSASSA-PKCS1-v1_5.");
jsTestIsAsync = true;
if (!window.subtle)
window.crypto.subtle = window.crypto.webkitSubtle;
var extractable = true;
var publicKeyJSON = {
kty: "RSA",
alg: "RS256",
n: "rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw",
e: "AQAB"
};
var privateKeyJSON = {
kty: "RSA",
alg: "RS256",
n: "rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw",
e: "AQAB",
d: "eNLS37aCz7RXSNPD_DtLBJ6j5T8cSxdzRBCjPaI6WcGqJp16lq3UTwuoDLAqlA9oGYm238dsIWpuucP_lQtbWe-7SpxoI6_vmYGf7YVUHv1-DF9qiOmSrMmdxMnVOzYXY8RaT6thPjn_J5cfLV2xI_LwsrMtmpdSyNlgX0zTUhwtuahgAKMEChYjH2EnjHdHw6sY2-wApdcQI7ULE0oo5RzbQZpmuhcN9hiBc0L3hhF0qo50mbl02_65_GQ7DpVkXBxNgRBLzlPabmzzG2oAhfefLgYmSC1opaCkXE6vRWQNWNL45RZNZFYM3uoJghOMqGeocM0BpjdChHrPOlFvSQ",
p: "4miTuAjKMeH5uJ5KB397QUwhbkYEgSbcA2mifmSkvE2018gb55qkBHK1eVryf1_m43LNlc6O_ak6gfzdZIZvS5NCGjPl0q09plUpu8qFOSspBwA67qGH76lFlZLn_d4yglS7wfLru4_5Ys8qLLs-DqVLviwposOnyyWqwM5AXp0",
q: "xHYrzkivtmnz_sGchnWGc0q-pDOkKicptRpv2pMFIIXxnFX5aMeEXIZjVujXtwUy1UlFIN2GZJSvy5KJ79mu_XyNnFHMzedH-A3ee3u8h1UUrZF-vUu1_e4U_x67NN1dedzUSKynN7pFl3OkuShMBWGV-cwzOPdcVAfVuZlxUMc",
dp: "fBzDzYDUBmBQGop7Hn0dvf_T27V6RqpctWo074CQZcFbP2atFVtKSj3viWT3xid2VHzcgiDHdfpM3nEVlEO1wwIonGCSvdjGEOZiiFVOjrZAOVxA8guOjyyFvqbXke06VwPIIVvfKeSU2zuhbP__1tt6F_fxow4Kb2xonGT0GGk",
dq: "jmE2DiIPdhwDgLXAQpIaBqQ81bO3XfVT_LRULAwwwwlPuQV148H04zlh9TJ6Y2GZHYokV1U0eOBpJxfkb7dLYtpJpuiBjRf4yIUEoGlkkI_QlJnFSFr-YjGRdfNHqWBkxlSMZL770R9mIATndGkH7z5x-r9KwBZFC4FCG2hg_zE",
qi: "YCX_pLwbMBA1ThVH0WcwmnytqNcrMCEwTm7ByA2eU6nWbQrULvf7m9_kzfLUcjsnpAVlBQG5JMXMy0Sq4ptwbywsa5-G8KAOOOR2L3v4hC-Eys9ftgFM_3i0o40eeQH4b3haPbntrIeMg8IzlOuVYKf9-2QuKDoWeRdd7NsdxTk"
};
debug("Importing a public key...");
crypto.subtle.importKey("jwk", asciiToArrayBuffer(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) {
publicKey = result;
shouldBe("publicKey.toString()", "'[object Key]'");
shouldBe("publicKey.type", "'public'");
shouldBe("publicKey.usages", "['sign','verify']");
shouldBe("publicKey.algorithm.name", "'rsassa-pkcs1-v1_5'");
shouldBe("publicKey.algorithm.modulusLength", "2048");
shouldBe("byteArrayToHexString(publicKey.algorithm.publicExponent)", "'[01 00 01]'");
shouldBe("publicKey.algorithm.hash.name", "'sha-256'");
debug("\nImporting a private key...");
return crypto.subtle.importKey("jwk", asciiToArrayBuffer(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"]);
}).then(function(result) {
privateKey = result;
shouldBe("privateKey.toString()", "'[object Key]'");
shouldBe("privateKey.type", "'private'");
shouldBe("privateKey.usages", "['sign','verify']");
shouldBe("privateKey.algorithm.name", "'rsassa-pkcs1-v1_5'");
shouldBe("privateKey.algorithm.modulusLength", "2048");
shouldBe("byteArrayToHexString(privateKey.algorithm.publicExponent)", "'[01 00 01]'");
shouldBe("privateKey.algorithm.hash.name", "'sha-256'");
finishJSTest();
}, function(result) {
debug("FAIL");
finishJSTest();
});
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
......@@ -1297,10 +1297,6 @@ webkit.org/b/123498 [ Mavericks ] media/track/track-in-band-cues-added-once.html
webkit.org/b/123522 [ Mavericks ] media/track/track-in-band-legacy-api.html [ Pass Failure ]
# These tests are failing for multiple reasons, one of these being <webkit.org/b/124249>.
[ MountainLion ] crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html [ Skip ]
[ MountainLion ] crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html [ Failure ]
# Audio and video tracks aren't supported on mac
media/track/audio
media/track/video
2013-11-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r159160, r159161, and r159164.
http://trac.webkit.org/changeset/159160
http://trac.webkit.org/changeset/159161
http://trac.webkit.org/changeset/159164
https://bugs.webkit.org/show_bug.cgi?id=124253
Too many errors (make fewer) (Requested by ap on #webkit).
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
* bindings/js/JSCryptoAlgorithmBuilder.h:
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesCbcParams):
(WebCore::createAesKeyGenParams):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey):
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
(WebCore::JSCryptoKeySerializationJWK::keyData):
* bindings/js/JSCryptoKeySerializationJWK.h:
* crypto/CryptoAlgorithmDescriptionBuilder.h:
* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Removed.
* crypto/CryptoKey.h:
(WebCore::ENUM_CLASS):
* crypto/CryptoKeyData.h:
(WebCore::CryptoKeyData::ENUM_CLASS):
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Removed.
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Removed.
* crypto/keys/CryptoKeyAES.h:
(WebCore::asCryptoKeyAES):
* crypto/keys/CryptoKeyDataOctetSequence.h:
(WebCore::asCryptoKeyDataOctetSequence):
* crypto/keys/CryptoKeyDataRSAComponents.cpp: Removed.
* crypto/keys/CryptoKeyDataRSAComponents.h: Removed.
* crypto/keys/CryptoKeyHMAC.h:
(WebCore::asCryptoKeyHMAC):
* crypto/keys/CryptoKeyRSA.h: Removed.
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
* crypto/mac/CryptoKeyRSAMac.cpp: Removed.
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Removed.
* crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed.
* crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Removed.
2013-11-12 Bem Jones-Bey <bjonesbe@adobe.com>
Make the placed floats tree use LayoutUnit instead of int
......
......@@ -5595,8 +5595,6 @@
E157A8F118185425009F821D /* JSCryptoAlgorithmBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = E157A8EF18185425009F821D /* JSCryptoAlgorithmBuilder.h */; };
E15A36D71104572000B7B639 /* XMLNSNames.h in Headers */ = {isa = PBXBuildFile; fileRef = E15A36D61104572000B7B639 /* XMLNSNames.h */; };
E15A36D91104572700B7B639 /* XMLNSNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E15A36D81104572700B7B639 /* XMLNSNames.cpp */; };
E164FAA318315BF400DB4E61 /* CryptoKeyRSA.h in Headers */ = {isa = PBXBuildFile; fileRef = E164FAA218315BF400DB4E61 /* CryptoKeyRSA.h */; };
E164FAA518315E1A00DB4E61 /* CryptoKeyRSAMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E164FAA418315E1A00DB4E61 /* CryptoKeyRSAMac.cpp */; };
E169803D1133542D00894115 /* CRuntimeObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E169803C1133542D00894115 /* CRuntimeObject.h */; };
E16980491133644700894115 /* CRuntimeObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E16980481133644700894115 /* CRuntimeObject.cpp */; };
E16982551134629D00894115 /* ObjCRuntimeObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E16982541134629D00894115 /* ObjCRuntimeObject.h */; };
......@@ -5671,16 +5669,8 @@
E1BA67181742BEE600C20251 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2869402846DCD018635CA /* Carbon.framework */; };
E1BA671A1742BEF400C20251 /* WebCoreTestShimLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1BA67191742BEF400C20251 /* WebCoreTestShimLibrary.cpp */; };
E1BB84AD1822CA7400525043 /* CryptoAlgorithmRegistryMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1BB84AC1822CA7400525043 /* CryptoAlgorithmRegistryMac.cpp */; };
E1BD3319182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1BD3317182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp */; };
E1BD331A182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BD3318182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.h */; };
E1BD331C182D8EE900C05D9F /* CryptoAlgorithmRsaSsaParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BD331B182D8EE900C05D9F /* CryptoAlgorithmRsaSsaParams.h */; };
E1BD331E182D8F4200C05D9F /* CryptoAlgorithmRsaKeyGenParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BD331D182D8F4200C05D9F /* CryptoAlgorithmRsaKeyGenParams.h */; };
E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1BE512B0CF6C512002EA959 /* XSLTUnicodeSort.cpp */; };
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BE512C0CF6C512002EA959 /* XSLTUnicodeSort.h */; };
E1C266D818317AB4003F8B33 /* CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1C266D618317AB4003F8B33 /* CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp */; };
E1C266DB18319935003F8B33 /* CryptoAlgorithmRsaSsaKeyParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C266DA18319935003F8B33 /* CryptoAlgorithmRsaSsaKeyParams.h */; };
E1C266DE18319F31003F8B33 /* CryptoKeyDataRSAComponents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1C266DC18319F31003F8B33 /* CryptoKeyDataRSAComponents.cpp */; };
E1C266DF18319F31003F8B33 /* CryptoKeyDataRSAComponents.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C266DD18319F31003F8B33 /* CryptoKeyDataRSAComponents.h */; };
E1C2F24A1533A2120083F974 /* SettingsMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1C2F2481533A2120083F974 /* SettingsMac.mm */; };
E1C362EF0EAF2AA9007410BC /* JSWorkerLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = E1C362ED0EAF2AA9007410BC /* JSWorkerLocation.h */; };
E1C362F00EAF2AA9007410BC /* JSWorkerLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1C362EE0EAF2AA9007410BC /* JSWorkerLocation.cpp */; };
......@@ -12687,8 +12677,6 @@
E157A8EF18185425009F821D /* JSCryptoAlgorithmBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCryptoAlgorithmBuilder.h; sourceTree = "<group>"; };
E15A36D61104572000B7B639 /* XMLNSNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLNSNames.h; sourceTree = "<group>"; };
E15A36D81104572700B7B639 /* XMLNSNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLNSNames.cpp; sourceTree = "<group>"; };
E164FAA218315BF400DB4E61 /* CryptoKeyRSA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CryptoKeyRSA.h; path = keys/CryptoKeyRSA.h; sourceTree = "<group>"; };
E164FAA418315E1A00DB4E61 /* CryptoKeyRSAMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CryptoKeyRSAMac.cpp; path = mac/CryptoKeyRSAMac.cpp; sourceTree = "<group>"; };
E169803C1133542D00894115 /* CRuntimeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRuntimeObject.h; sourceTree = "<group>"; };
E16980481133644700894115 /* CRuntimeObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CRuntimeObject.cpp; sourceTree = "<group>"; };
E16982541134629D00894115 /* ObjCRuntimeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjCRuntimeObject.h; sourceTree = "<group>"; };
......@@ -12772,16 +12760,8 @@
E1BA67161742BDE000C20251 /* libWebCoreTestShim.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libWebCoreTestShim.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
E1BA67191742BEF400C20251 /* WebCoreTestShimLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreTestShimLibrary.cpp; sourceTree = "<group>"; };
E1BB84AC1822CA7400525043 /* CryptoAlgorithmRegistryMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CryptoAlgorithmRegistryMac.cpp; path = mac/CryptoAlgorithmRegistryMac.cpp; sourceTree = "<group>"; };
E1BD3317182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp; sourceTree = "<group>"; };
E1BD3318182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmRSASSA_PKCS1_v1_5.h; sourceTree = "<group>"; };
E1BD331B182D8EE900C05D9F /* CryptoAlgorithmRsaSsaParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CryptoAlgorithmRsaSsaParams.h; path = parameters/CryptoAlgorithmRsaSsaParams.h; sourceTree = "<group>"; };
E1BD331D182D8F4200C05D9F /* CryptoAlgorithmRsaKeyGenParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CryptoAlgorithmRsaKeyGenParams.h; path = parameters/CryptoAlgorithmRsaKeyGenParams.h; sourceTree = "<group>"; };
E1BE512B0CF6C512002EA959 /* XSLTUnicodeSort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSLTUnicodeSort.cpp; sourceTree = "<group>"; };
E1BE512C0CF6C512002EA959 /* XSLTUnicodeSort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSLTUnicodeSort.h; sourceTree = "<group>"; };
E1C266D618317AB4003F8B33 /* CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp; sourceTree = "<group>"; };
E1C266DA18319935003F8B33 /* CryptoAlgorithmRsaSsaKeyParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CryptoAlgorithmRsaSsaKeyParams.h; path = parameters/CryptoAlgorithmRsaSsaKeyParams.h; sourceTree = "<group>"; };
E1C266DC18319F31003F8B33 /* CryptoKeyDataRSAComponents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CryptoKeyDataRSAComponents.cpp; path = keys/CryptoKeyDataRSAComponents.cpp; sourceTree = "<group>"; };
E1C266DD18319F31003F8B33 /* CryptoKeyDataRSAComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CryptoKeyDataRSAComponents.h; path = keys/CryptoKeyDataRSAComponents.h; sourceTree = "<group>"; };
E1C2F2481533A2120083F974 /* SettingsMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SettingsMac.mm; sourceTree = "<group>"; };
E1C362ED0EAF2AA9007410BC /* JSWorkerLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWorkerLocation.h; sourceTree = "<group>"; };
E1C362EE0EAF2AA9007410BC /* JSWorkerLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerLocation.cpp; sourceTree = "<group>"; };
......@@ -20348,13 +20328,11 @@
E125F8371822F1EB00D84CD9 /* CryptoAlgorithmHMACMac.cpp */,
E1BB84AC1822CA7400525043 /* CryptoAlgorithmRegistryMac.cpp */,
E125F82D1822CFFF00D84CD9 /* CryptoAlgorithmSHA1Mac.cpp */,
E1C266D618317AB4003F8B33 /* CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp */,
E19AC3DE1824DC6900349426 /* CryptoAlgorithmSHA224Mac.cpp */,
E19AC3DF1824DC6900349426 /* CryptoAlgorithmSHA256Mac.cpp */,
E19AC3E01824DC6900349426 /* CryptoAlgorithmSHA384Mac.cpp */,
E19AC3E11824DC6900349426 /* CryptoAlgorithmSHA512Mac.cpp */,
E19AC3F8182566F700349426 /* CryptoKeyMac.cpp */,
E164FAA418315E1A00DB4E61 /* CryptoKeyRSAMac.cpp */,
);
name = mac;
sourceTree = "<group>";
......@@ -20366,8 +20344,6 @@
E125F8401824253A00D84CD9 /* CryptoAlgorithmAES_CBC.h */,
E125F82F1822F11B00D84CD9 /* CryptoAlgorithmHMAC.cpp */,
E125F8301822F11B00D84CD9 /* CryptoAlgorithmHMAC.h */,
E1BD3317182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp */,
E1BD3318182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.h */,
E125F8291822CFEC00D84CD9 /* CryptoAlgorithmSHA1.cpp */,
E125F82A1822CFEC00D84CD9 /* CryptoAlgorithmSHA1.h */,
E19AC3E61824DC7900349426 /* CryptoAlgorithmSHA224.cpp */,
......@@ -20389,11 +20365,8 @@
E125F84C1824289D00D84CD9 /* CryptoKeyAES.h */,
E125F861182C303A00D84CD9 /* CryptoKeyDataOctetSequence.cpp */,
E125F862182C303A00D84CD9 /* CryptoKeyDataOctetSequence.h */,
E1C266DC18319F31003F8B33 /* CryptoKeyDataRSAComponents.cpp */,
E1C266DD18319F31003F8B33 /* CryptoKeyDataRSAComponents.h */,
E125F8331822F18A00D84CD9 /* CryptoKeyHMAC.cpp */,
E125F8341822F18A00D84CD9 /* CryptoKeyHMAC.h */,
E164FAA218315BF400DB4E61 /* CryptoKeyRSA.h */,
E125F857182C1AA600D84CD9 /* CryptoKeySerializationRaw.cpp */,
E125F858182C1AA600D84CD9 /* CryptoKeySerializationRaw.h */,
);
......@@ -20407,9 +20380,6 @@
E19AC3F61824E5D100349426 /* CryptoAlgorithmAesKeyGenParams.h */,
E19DA29B18189ADD00088BC8 /* CryptoAlgorithmHmacKeyParams.h */,
E1C6571E1816E50300256CDD /* CryptoAlgorithmHmacParams.h */,
E1BD331D182D8F4200C05D9F /* CryptoAlgorithmRsaKeyGenParams.h */,
E1C266DA18319935003F8B33 /* CryptoAlgorithmRsaSsaKeyParams.h */,
E1BD331B182D8EE900C05D9F /* CryptoAlgorithmRsaSsaParams.h */,
);
name = parameters;
sourceTree = "<group>";
......@@ -22140,7 +22110,6 @@
FD31600212B0267600C1A359 /* ChannelSplitterNode.h in Headers */,
6550B6A0099DF0270090D781 /* CharacterData.h in Headers */,
97B8FFD116AE7F960038388D /* CharacterReferenceParserInlines.h in Headers */,
E164FAA318315BF400DB4E61 /* CryptoKeyRSA.h in Headers */,
B2C3DA2A0D006C1D00EF6F26 /* CharsetData.h in Headers */,
F55B3DB21251F12D003EF269 /* CheckboxInputType.h in Headers */,
93F925430F7EF5B8007E37C9 /* CheckedRadioButtons.h in Headers */,
......@@ -22342,7 +22311,6 @@
F55B3DB61251F12D003EF269 /* DateInputType.h in Headers */,
453EB637159C570400001BB7 /* DateTimeFormat.h in Headers */,
0705850317FA10D0005F2BCB /* JSAllVideoCapabilities.h in Headers */,
E1BD331A182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.h in Headers */,
F55B3DB81251F12D003EF269 /* DateTimeInputType.h in Headers */,
F55B3DBA1251F12D003EF269 /* DateTimeLocalInputType.h in Headers */,
45FEA5D0156DDE8C00654101 /* Decimal.h in Headers */,
......@@ -22902,7 +22870,6 @@
B275356B0B053814002CE64F /* FloatRect.h in Headers */,
B275356D0B053814002CE64F /* FloatSize.h in Headers */,
D72F6D7A153159A3001EE44E /* FlowThreadController.h in Headers */,
E1BD331E182D8F4200C05D9F /* CryptoAlgorithmRsaKeyGenParams.h in Headers */,
14993BE60B2F2B1C0050497F /* FocusController.h in Headers */,
062287840B4DB322000C34DF /* FocusDirection.h in Headers */,
B6D9D23514EABD260090D75E /* FocusEvent.h in Headers */,
......@@ -23478,7 +23445,6 @@
A80E7B0C0A19D606007FB8C5 /* JSHTMLTitleElement.h in Headers */,
070756D414239A4F00414161 /* JSHTMLTrackElement.h in Headers */,
1A85B2110A1B258700D8C87C /* JSHTMLUListElement.h in Headers */,
E1C266DF18319F31003F8B33 /* CryptoKeyDataRSAComponents.h in Headers */,
6E4ABCD5138EA0B70071D291 /* JSHTMLUnknownElement.h in Headers */,
078E092717D14D1C00420AA1 /* RTCSessionDescriptionCallback.h in Headers */,
E44614170CD6826900FADA75 /* JSHTMLVideoElement.h in Headers */,
......@@ -23707,7 +23673,6 @@
B2FA3DDD0AB75A6F000E5AC4 /* JSSVGPathSegMovetoAbs.h in Headers */,
B2FA3DDF0AB75A6F000E5AC4 /* JSSVGPathSegMovetoRel.h in Headers */,
0705852117FDC140005F2BCB /* MediaTrackConstraint.h in Headers */,
E1C266DB18319935003F8B33 /* CryptoAlgorithmRsaSsaKeyParams.h in Headers */,
CD8B5A46180DFF4E008B8E65 /* VideoTrackMediaSource.h in Headers */,
B2FA3DE10AB75A6F000E5AC4 /* JSSVGPatternElement.h in Headers */,
8542A7950AE5C94100DF58DF /* JSSVGPoint.h in Headers */,
......@@ -24020,7 +23985,6 @@
078E091B17D14D1C00420AA1 /* NavigatorUserMediaError.h in Headers */,
BC5EB5DD0E81B8DD00B25965 /* OutlineValue.h in Headers */,
1A0D57370A5C77FE007EDD4C /* OverflowEvent.h in Headers */,
E1BD331C182D8EE900C05D9F /* CryptoAlgorithmRsaSsaParams.h in Headers */,
3774ABA50FA21EB400AD7DE9 /* OverlapTestRequestClient.h in Headers */,
65A21468097A329100B9050A /* Page.h in Headers */,
9B50B1DE17CD4C0F0087F63C /* FormNamedItem.h in Headers */,
......@@ -25790,7 +25754,6 @@
50D40611147D49DE00D30BB5 /* CustomFilterCompiledProgram.cpp in Sources */,
50987C26157D676D00BDA835 /* CustomFilterGlobalContext.cpp in Sources */,
50D405F9147D31F300D30BB5 /* CustomFilterMesh.cpp in Sources */,
E1C266DE18319F31003F8B33 /* CryptoKeyDataRSAComponents.cpp in Sources */,
7E12E91015FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp in Sources */,
50CC0A3914C6F5B10017AB51 /* CustomFilterOperation.cpp in Sources */,
5093334F163B0E4300099A60 /* CustomFilterParameterList.cpp in Sources */,
......@@ -26392,7 +26355,6 @@
E125F8381822F1EB00D84CD9 /* CryptoAlgorithmHMACMac.cpp in Sources */,
BCCD74E50A4C8DDF005FDA6D /* HTMLViewSourceDocument.cpp in Sources */,
977B3879122883E900B81FF8 /* HTMLViewSourceParser.cpp in Sources */,
E1C266D818317AB4003F8B33 /* CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp in Sources */,
0B8C56D40F28627F000502E1 /* HTTPHeaderMap.cpp in Sources */,
514C76720CE923A1007EF3CD /* HTTPParsers.cpp in Sources */,
371A67CB11C6C7DB00047B8B /* HyphenationCF.cpp in Sources */,
......@@ -26807,7 +26769,6 @@
C6F420A216B7164E0052A9F2 /* JSMutationCallback.cpp in Sources */,
65DF31FB09D1CC60000BE325 /* JSMutationEvent.cpp in Sources */,
C6F0902C14327D4F00685849 /* JSMutationObserver.cpp in Sources */,
E164FAA518315E1A00DB4E61 /* CryptoKeyRSAMac.cpp in Sources */,
C6F0917F143A2BB900685849 /* JSMutationObserverCustom.cpp in Sources */,
C6F08FC91431000D00685849 /* JSMutationRecord.cpp in Sources */,
078E090117D14CEE00420AA1 /* MediaStreamRegistry.cpp in Sources */,
......@@ -27098,7 +27059,6 @@
93F1D5C012D5335600832BEC /* JSWebGLLoseContext.cpp in Sources */,
49C7B99B1042D2D30009D447 /* JSWebGLProgram.cpp in Sources */,
49C7B99D1042D2D30009D447 /* JSWebGLRenderbuffer.cpp in Sources */,
E1BD3319182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp in Sources */,
49EED1461051969400099FAB /* JSWebGLRenderingContext.cpp in Sources */,
49EED14F1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp in Sources */,
49C7B9A21042D2D30009D447 /* JSWebGLShader.cpp in Sources */,
......@@ -30,8 +30,6 @@
#include <runtime/ObjectConstructor.h>
#include <runtime/Operations.h>
#include <runtime/TypedArrays.h>
#include <runtime/TypedArrayInlines.h>
using namespace JSC;
......@@ -66,14 +64,6 @@ void JSCryptoAlgorithmBuilder::add(const char* key, const String& value)
m_dictionary->putDirect(vm, identifier, jsString(m_exec, value));
}
void JSCryptoAlgorithmBuilder::add(const char* key, const Vector<uint8_t>& buffer)
{
VM& vm = m_exec->vm();
Identifier identifier(&vm, key);
RefPtr<Uint8Array> arrayView = Uint8Array::create(buffer.data(), buffer.size());
m_dictionary->putDirect(vm, identifier, arrayView->wrap(m_exec, vm.dynamicGlobalObject));
}
void JSCryptoAlgorithmBuilder::add(const char* key, const CryptoAlgorithmDescriptionBuilder& nestedBuilder)
{
VM& vm = m_exec->vm();
......
......@@ -48,7 +48,6 @@ public:
virtual void add(const char*, unsigned) OVERRIDE;
virtual void add(const char*, const String&) OVERRIDE;
virtual void add(const char*, const Vector<uint8_t>&) OVERRIDE;
virtual void add(const char*, const CryptoAlgorithmDescriptionBuilder&) OVERRIDE;
private:
......
......@@ -33,9 +33,6 @@
#include "CryptoAlgorithmHmacKeyParams.h"
#include "CryptoAlgorithmHmacParams.h"
#include "CryptoAlgorithmRegistry.h"
#include "CryptoAlgorithmRsaKeyGenParams.h"
#include "CryptoAlgorithmRsaSsaKeyParams.h"
#include "CryptoAlgorithmRsaSsaParams.h"
#include "ExceptionCode.h"
#include "JSCryptoOperationData.h"
#include "JSDOMBinding.h"
......@@ -119,7 +116,7 @@ static bool getHashAlgorithm(JSDictionary& dictionary, CryptoAlgorithmIdentifier
return JSCryptoAlgorithmDictionary::getAlgorithmIdentifier(exec, hash, result);
}
static std::unique_ptr<CryptoAlgorithmParameters> createAesCbcParams(ExecState* exec, JSValue value)
static std::unique_ptr<CryptoAlgorithmParameters> createAesCbcParams(JSC::ExecState* exec, JSC::JSValue value)
{
if (!value.isObject()) {
throwTypeError(exec);
......@@ -148,7 +145,7 @@ static std::unique_ptr<CryptoAlgorithmParameters> createAesCbcParams(ExecState*
return std::move(result);
}
static std::unique_ptr<CryptoAlgorithmParameters> createAesKeyGenParams(ExecState* exec, JSValue value)
static std::unique_ptr<CryptoAlgorithmParameters> createAesKeyGenParams(JSC::ExecState* exec, JSC::JSValue value)
{
if (!value.isObject()) {
throwTypeError(exec);
......@@ -166,7 +163,7 @@ static std::unique_ptr<CryptoAlgorithmParameters> createAesKeyGenParams(ExecStat
return std::move(result);
}
static std::unique_ptr<CryptoAlgorithmParameters> createHmacParams(ExecState* exec, JSValue value)
static std::unique_ptr<CryptoAlgorithmParameters> createHmacParams(JSC::ExecState* exec, JSC::JSValue value)
{
if (!value.isObject()) {
throwTypeError(exec);
......@@ -184,7 +181,7 @@ static std::unique_ptr<CryptoAlgorithmParameters> createHmacParams(ExecState* ex
return std::move(result);
}
static std::unique_ptr<CryptoAlgorithmParameters> createHmacKeyParams(ExecState* exec, JSValue value)
static std::unique_ptr<CryptoAlgorithmParameters> createHmacKeyParams(JSC::ExecState* exec, JSC::JSValue value)
{
if (!value.isObject()) {
throwTypeError(exec);
......@@ -206,63 +203,7 @@ static std::unique_ptr<CryptoAlgorithmParameters> createHmacKeyParams(ExecState*
return std::move(result);
}
static std::unique_ptr<CryptoAlgorithmParameters> createRsaKeyGenParams(ExecState* exec, JSValue value)
{
if (!value.isObject()) {
throwTypeError(exec);
return nullptr;
}
auto result = std::make_unique<CryptoAlgorithmRsaKeyGenParams>();
JSValue modulusLengthValue = getProperty(exec, value.getObject(), "modulusLength");
if (exec->hadException())
return nullptr;
// FIXME: Why no EnforceRange? Filed as <https://www.w3.org/Bugs/Public/show_bug.cgi?id=23779>.
result->modulusLength = toUInt32(exec, modulusLengthValue, NormalConversion);
if (exec->hadException())
return nullptr;
JSValue publicExponentValue = getProperty(exec, value.getObject(), "publicExponent");
if (exec->hadException())
return nullptr;
RefPtr<Uint8Array> publicExponentArray = toUint8Array(publicExponentValue);
if (publicExponentArray) {
throwTypeError(exec, "Expected a Uint8Array in publicExponent");
return nullptr;
}
result->publicExponent.append(publicExponentArray->data(), publicExponentArray->byteLength());
return std::move(result);
}
static std::unique_ptr<CryptoAlgorithmParameters> createRsaSsaKeyParams(ExecState*, JSValue)
{
// WebCrypto RSASSA-PKCS1-v1_5 algorithm currently does not take any parameters to importKey.
return std::make_unique<CryptoAlgorithmRsaSsaKeyParams>();
}
static std::unique_ptr<CryptoAlgorithmParameters> createRsaSsaParams(ExecState* exec, JSValue value)
{
if (!value.isObject()) {
throwTypeError(exec);
return nullptr;
}