crypto.getRandomValues should throw an exception when given a big array
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2012 03:53:53 +0000 (03:53 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2012 03:53:53 +0000 (03:53 +0000)
commit00db6868338670fed71b7fbfab1ddf81a7f58a7c
tree6e72477a33a13a93a16777ee00d9603b40e9695d
parent166ee6f5021f5c4a5cab19f959c0132492eeaa11
crypto.getRandomValues should throw an exception when given a big array
https://bugs.webkit.org/show_bug.cgi?id=95269

Reviewed by Eric Seidel.

Source/WebCore:

The W3C Web Cryptography Working Group has taken up specifying
window.crypto. The latest draft calls for getRandomValues to throw an
exception when given an array that's large.

Test: security/crypto-random-values-limits.html

* page/Crypto.cpp:
(WebCore::Crypto::getRandomValues):

LayoutTests:

* security/crypto-random-values-limits-expected.txt: Added.
* security/crypto-random-values-limits.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/security/crypto-random-values-limits-expected.txt [new file with mode: 0644]
LayoutTests/security/crypto-random-values-limits.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/Crypto.cpp