Replace CryptoOperationData with BufferSource for WebKitSubtleCrypto
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 May 2017 20:09:47 +0000 (20:09 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 May 2017 20:09:47 +0000 (20:09 +0000)
commit2255c488ed800499e084536a24fac02a265e87eb
treebe9c3837ea3a031f464a909fcab6f3e9b2478bed
parent2a30f00506d66d079665a7d0f987dbcd9f0e7790
Replace CryptoOperationData with BufferSource for WebKitSubtleCrypto
https://bugs.webkit.org/show_bug.cgi?id=172146
<rdar://problem/32122256>

Reviewed by Brent Fulgham.

Source/WebCore:

In this patch, we replaces CryptoOperationData with BufferSource for WebKitSubtleCrypto in
the custom binding codes.

Test: crypto/webkitSubtle/import-export-raw-key-leak.html

* bindings/js/JSWebKitSubtleCryptoCustom.cpp:
(WebCore::JSWebKitSubtleCrypto::encrypt):
(WebCore::JSWebKitSubtleCrypto::decrypt):
(WebCore::JSWebKitSubtleCrypto::sign):
(WebCore::JSWebKitSubtleCrypto::verify):
(WebCore::JSWebKitSubtleCrypto::digest):
(WebCore::JSWebKitSubtleCrypto::importKey):
(WebCore::JSWebKitSubtleCrypto::unwrapKey):
* crypto/WebKitSubtleCrypto.idl:

LayoutTests:

* crypto/webkitSubtle/argument-conversion-expected.txt:
* crypto/webkitSubtle/import-export-raw-key-leak-expected.txt: Added.
* crypto/webkitSubtle/import-export-raw-key-leak.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/crypto/webkitSubtle/argument-conversion-expected.txt
LayoutTests/crypto/webkitSubtle/import-export-raw-key-leak-expected.txt [new file with mode: 0644]
LayoutTests/crypto/webkitSubtle/import-export-raw-key-leak.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSWebKitSubtleCryptoCustom.cpp
Source/WebCore/crypto/WebKitSubtleCrypto.idl