WebCrypto wrapKey operation doesn't check key usage
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Dec 2013 08:56:06 +0000 (08:56 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Dec 2013 08:56:06 +0000 (08:56 +0000)
commitf93ddee4bc0b3795cb2ab6c4c8219433e0f1f27a
tree9a9e453ab52d10e27bb7ea6e463209819c98521e
parenta0a27f46c77612d1a89a49116f78f86581817c54
WebCrypto wrapKey operation doesn't check key usage
https://bugs.webkit.org/show_bug.cgi?id=125675

Reviewed by Darin Adler.

Source/WebCore:

Tests: crypto/subtle/unwrapKey-check-usage.html
       crypto/subtle/wrapKey-check-usage.html

* bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::wrapKey):
Added accidentally omitted code. Other operations are fine.

LayoutTests:

* crypto/subtle/unwrapKey-check-usage-expected.txt: Added.
* crypto/subtle/unwrapKey-check-usage.html: Added.
* crypto/subtle/wrapKey-check-usage-expected.txt: Added.
* crypto/subtle/wrapKey-check-usage.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/crypto/subtle/unwrapKey-check-usage-expected.txt [new file with mode: 0644]
LayoutTests/crypto/subtle/unwrapKey-check-usage.html [new file with mode: 0644]
LayoutTests/crypto/subtle/wrapKey-check-usage-expected.txt [new file with mode: 0644]
LayoutTests/crypto/subtle/wrapKey-check-usage.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp