2011-02-10 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Feb 2011 08:37:36 +0000 (08:37 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Feb 2011 08:37:36 +0000 (08:37 +0000)
commitce3f0bac1b8b6151bc575c13335b8726562c7087
treece1adb8b045cc8e6efe7b619d122ee52cc685575
parentd29ee25d8d2a02bb436f44558880b8156faec052
2011-02-10  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        WebKit should have a cryptographic RNG
        https://bugs.webkit.org/show_bug.cgi?id=22049

        Test crypto.getRandomValues API.  It's pretty hard to write a
        deterministic API for a randomized API, but this test should catch some
        regressions.

        * security/crypto-random-values-expected.txt: Added.
        * security/crypto-random-values.html: Added.
2011-02-10  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        WebKit should have a cryptographic RNG
        https://bugs.webkit.org/show_bug.cgi?id=22049

        Teach JavaScriptCore how to export this function.

        * JavaScriptCore.exp:
        * JavaScriptCore.xcodeproj/project.pbxproj:
2011-02-10  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        WebKit should have a cryptographic RNG
        https://bugs.webkit.org/show_bug.cgi?id=22049

        Add crypto.getRandomValues.  Yes, all these diffs are required to
        expose a single function to the DOM.

        Test: security/crypto-random-values.html

        * Android.mk:
        * CMakeLists.txt:
        * DerivedSources.cpp:
        * DerivedSources.make:
        * ForwardingHeaders/wtf/CryptographicallyRandomNumber.h: Added.
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pri:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMWindowCustom.cpp:
        * bindings/v8/custom/V8DOMWindowCustom.cpp:
        * config.h:
        * page/Crypto.cpp: Added.
        (WebCore::Crypto::Crypto):
        (WebCore::Crypto::getRandomValues):
        * page/Crypto.h: Added.
        (WebCore::Crypto::create):
        * page/Crypto.idl: Added.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::clear):
        (WebCore::DOMWindow::crypto):
        * page/DOMWindow.h:
        (WebCore::DOMWindow::optionalCrypto):
        * page/DOMWindow.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/security/crypto-random-values-expected.txt [new file with mode: 0644]
LayoutTests/security/crypto-random-values.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.exp
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/WebCore/Android.mk
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/ForwardingHeaders/wtf/CryptographicallyRandomNumber.h [new file with mode: 0644]
Source/WebCore/GNUmakefile.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pri
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
Source/WebCore/config.h
Source/WebCore/page/Crypto.cpp [new file with mode: 0644]
Source/WebCore/page/Crypto.h [new file with mode: 0644]
Source/WebCore/page/Crypto.idl [new file with mode: 0644]
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DOMWindow.h
Source/WebCore/page/DOMWindow.idl