RSASSA-PKCS1-v1_5 JWK import doesn't check key size
https://bugs.webkit.org/show_bug.cgi?id=124472
Reviewed by Sam Weinig.
Source/WebCore:
Test: crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Added the checks.
(WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Check key size when
importing.
(WebCore::JSCryptoKeySerializationJWK::serialize): Updated a comment.
* crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize):
Updated a comment.
LayoutTests:
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key-expected.txt: Added.
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed