Changeset 209191 in webkit
- Timestamp:
- Dec 1, 2016 11:42:30 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r209190 r209191 1 2016-12-01 Jiewen Tan <jiewen_tan@apple.com> 2 3 SubtleCrypto::deriveBits always return NOT_SUPPORTED_ERR for now 4 https://bugs.webkit.org/show_bug.cgi?id=164745 5 <rdar://problem/29258118> 6 7 Reviewed by Darin Adler. 8 9 * crypto/subtle/deriveBits-malformed-parameters-expected.txt: Added. 10 * crypto/subtle/deriveBits-malformed-parameters.html: Added. 11 1 12 2016-12-01 Ryan Haddad <ryanhaddad@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/ChangeLog
r209184 r209191 1 2016-12-01 Jiewen Tan <jiewen_tan@apple.com> 2 3 SubtleCrypto::deriveBits always return NOT_SUPPORTED_ERR for now 4 https://bugs.webkit.org/show_bug.cgi?id=164745 5 <rdar://problem/29258118> 6 7 Reviewed by Darin Adler. 8 9 * WebCryptoAPI/idlharness-expected.txt: 10 1 11 2016-11-30 Sam Weinig <sam@webkit.org> 2 12 -
trunk/LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt
r209166 r209191 58 58 PASS SubtleCrypto interface: crypto.subtle must inherit property "deriveKey" with the proper type (6) 59 59 PASS SubtleCrypto interface: calling deriveKey(AlgorithmIdentifier,CryptoKey,AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError 60 FAIL SubtleCrypto interface: crypto.subtle must inherit property "deriveBits" with the proper type (7) assert_inherits: property "deriveBits" not found in prototype chain 61 FAIL SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "deriveBits" not found in prototype chain 60 PASS SubtleCrypto interface: crypto.subtle must inherit property "deriveBits" with the proper type (7) 61 PASS SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long) on crypto.subtle with too few arguments must throw TypeError 62 62 PASS SubtleCrypto interface: crypto.subtle must inherit property "importKey" with the proper type (8) 63 63 PASS SubtleCrypto interface: calling importKey(KeyFormat,[object Object],[object Object],AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError -
trunk/Source/WebCore/ChangeLog
r209188 r209191 1 2016-12-01 Jiewen Tan <jiewen_tan@apple.com> 2 3 SubtleCrypto::deriveBits always return NOT_SUPPORTED_ERR for now 4 https://bugs.webkit.org/show_bug.cgi?id=164745 5 <rdar://problem/29258118> 6 7 Reviewed by Darin Adler. 8 9 Since we don't support any cryptography algorithms that has deriveBits operations, 10 SubtleCrypto::deriveBits will always return NOT_SUPPORTED_ERR for now. 11 12 Test: crypto/subtle/deriveBits-malformed-parameters.html 13 14 * bindings/js/JSSubtleCryptoCustom.cpp: 15 (WebCore::normalizeCryptoAlgorithmParameters): 16 (WebCore::jsSubtleCryptoFunctionDeriveBitsPromise): 17 (WebCore::JSSubtleCrypto::deriveBits): 18 * crypto/SubtleCrypto.idl: 19 1 20 2016-12-01 Eric Carlson <eric.carlson@apple.com> 2 21 -
trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp
r209166 r209191 60 60 Digest, 61 61 DeriveKey, 62 DeriveBits, 62 63 GenerateKey, 63 64 ImportKey, … … 150 151 break; 151 152 case Operations::DeriveKey: 153 case Operations::DeriveBits: 152 154 setDOMException(&state, NOT_SUPPORTED_ERR); 153 155 return nullptr; … … 699 701 } 700 702 703 static void jsSubtleCryptoFunctionDeriveBitsPromise(ExecState& state, Ref<DeferredPromise>&& promise) 704 { 705 VM& vm = state.vm(); 706 auto scope = DECLARE_THROW_SCOPE(vm); 707 708 if (UNLIKELY(state.argumentCount() < 3)) { 709 promise->reject<JSValue>(createNotEnoughArgumentsError(&state)); 710 return; 711 } 712 713 auto params = normalizeCryptoAlgorithmParameters(state, state.uncheckedArgument(0), Operations::DeriveBits); 714 RETURN_IF_EXCEPTION(scope, void()); 715 716 // We should always return a NOT_SUPPORTED_ERR since we currently don't support any algorithms that has deriveBits operation. 717 ASSERT_NOT_REACHED(); 718 } 719 701 720 static void jsSubtleCryptoFunctionGenerateKeyPromise(ExecState& state, Ref<DeferredPromise>&& promise) 702 721 { … … 974 993 } 975 994 995 JSValue JSSubtleCrypto::deriveBits(ExecState& state) 996 { 997 return callPromiseFunction<jsSubtleCryptoFunctionDeriveBitsPromise, PromiseExecutionScope::WindowOrWorker>(state); 998 } 999 976 1000 JSValue JSSubtleCrypto::generateKey(ExecState& state) 977 1001 { -
trunk/Source/WebCore/crypto/SubtleCrypto.idl
r209166 r209191 38 38 [Custom] Promise<any> digest(AlgorithmIdentifier algorithm, BufferSource data); 39 39 [Custom] Promise<any> deriveKey(AlgorithmIdentifier algorithm, CryptoKey baseKey, AlgorithmIdentifier derivedKeyType, boolean extractable, sequence<KeyUsage> keyUsages); 40 [Custom] Promise<ArrayBuffer> deriveBits(AlgorithmIdentifier algorithm, CryptoKey baseKey, unsigned long length); 40 41 // FIXME: Should this return a Promise<(CryptoKey or CryptoKeyPair)>? 41 42 [Custom] Promise<any> generateKey(AlgorithmIdentifier algorithm, boolean extractable, sequence<CryptoKeyUsage> keyUsages);
Note: See TracChangeset
for help on using the changeset viewer.