1. 31 Oct, 2013 1 commit
    • ap@apple.com's avatar
      Enable WebCrypto on Mac · 13a73330
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123587
      
      Reviewed by Anders Carlsson.
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig: Do it.
      
      Source/WebCore:
      
      * Configurations/FeatureDefines.xcconfig: Enable it.
      
      * bindings/js/JSCryptoAlgorithmDictionary.cpp: Build fix.
      
      * crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
      Special case empty keys to avoid upsetting HashMap.
      
      * crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::create):
      Build fix. Can't use make_unique, because constructor is private.
      
      Source/WebKit/mac:
      
      * Configurations/FeatureDefines.xcconfig: Do it.
      
      Source/WebKit2:
      
      * Configurations/FeatureDefines.xcconfig: Do it.
      
      LayoutTests:
      
      * TestExpectations:
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/win/TestExpectations:
      * platform/wincairo/TestExpectations:
      Only skipping on specific platforms now.
      
      * crypto: Added.
      * crypto/crypto-gc-expected.txt: Copied from LayoutTests/security/crypto-gc-expected.txt.
      * crypto/crypto-gc.html: Copied from LayoutTests/security/crypto-gc.html.
      * crypto/crypto-random-values-expected.txt: Copied from LayoutTests/security/crypto-random-values-expected.txt.
      * crypto/crypto-random-values-limits-expected.txt: Copied from LayoutTests/security/crypto-random-values-limits-expected.txt.
      * crypto/crypto-random-values-limits.html: Copied from LayoutTests/security/crypto-random-values-limits.html.
      * crypto/crypto-random-values-types-expected.txt: Copied from LayoutTests/security/crypto-random-values-types-expected.txt.
      * crypto/crypto-random-values-types.html: Copied from LayoutTests/security/crypto-random-values-types.html.
      * crypto/crypto-random-values.html: Copied from LayoutTests/security/crypto-random-values.html.
      * crypto/subtle: Added.
      * crypto/subtle/argument-conversion-expected.txt: Copied from LayoutTests/security/crypto-subtle-arguments-expected.txt.
      * crypto/subtle/argument-conversion.html: Copied from LayoutTests/security/crypto-subtle-arguments.html.
      * crypto/subtle/gc-2-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-2-expected.txt.
      * crypto/subtle/gc-2.html: Copied from LayoutTests/security/crypto-subtle-gc-2.html.
      * crypto/subtle/gc-3-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-3-expected.txt.
      * crypto/subtle/gc-3.html: Copied from LayoutTests/security/crypto-subtle-gc-3.html.
      * crypto/subtle/gc-expected.txt: Copied from LayoutTests/security/crypto-subtle-gc-expected.txt.
      * crypto/subtle/gc.html: Copied from LayoutTests/security/crypto-subtle-gc.html.
      * crypto/subtle/resources: Added.
      * crypto/subtle/resources/common.js: Copied from LayoutTests/security/resources/common.js.
      * crypto/subtle/sha-1-expected.txt: Copied from LayoutTests/security/crypto-subtle-sha1-expected.txt.
      * crypto/subtle/sha-1.html: Copied from LayoutTests/security/crypto-subtle-sha1.html.
      * security/crypto-gc-expected.txt: Removed.
      * security/crypto-gc.html: Removed.
      * security/crypto-random-values-expected.txt: Removed.
      * security/crypto-random-values-limits-expected.txt: Removed.
      * security/crypto-random-values-limits.html: Removed.
      * security/crypto-random-values-types-expected.txt: Removed.
      * security/crypto-random-values-types.html: Removed.
      * security/crypto-random-values.html: Removed.
      * security/crypto-subtle-arguments-expected.txt: Removed.
      * security/crypto-subtle-arguments.html: Removed.
      * security/crypto-subtle-gc-2-expected.txt: Removed.
      * security/crypto-subtle-gc-2.html: Removed.
      * security/crypto-subtle-gc-3-expected.txt: Removed.
      * security/crypto-subtle-gc-3.html: Removed.
      * security/crypto-subtle-gc-expected.txt: Removed.
      * security/crypto-subtle-gc.html: Removed.
      * security/crypto-subtle-sha1-expected.txt: Removed.
      * security/crypto-subtle-sha1.html: Removed.
      * security/resources/common.js: Removed.
      Moved tests from security/ to crypto/.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13a73330
  2. 14 Oct, 2013 1 commit
    • ap@apple.com's avatar
      Add an empty window.crypto.webkitSubtle · be84a7a3
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122778
      
      Reviewed by Mark Hahnenberg.
      
      Source/WebCore:
      
      Tests: security/crypto-subtle-gc-2.html
             security/crypto-subtle-gc-3.html
             security/crypto-subtle-gc.html
      
      * DerivedSources.make: Process SubtleCrypto.idl.
      
      * crypto: Added.
      * WebCore.xcodeproj/project.pbxproj:
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      
      * bindings/js/JSSubtleCryptoCustom.cpp: Added. Empty for now, but we'll certainly
      need custom bindings code here.
      
      * crypto/SubtleCrypto.cpp: Added.
      (WebCore::SubtleCrypto::SubtleCrypto):
      (WebCore::SubtleCrypto::document):
      * crypto/SubtleCrypto.h: Added.
      * crypto/SubtleCrypto.idl: Added.
      * page/Crypto.cpp:
      (WebCore::Crypto::subtle):
      * page/Crypto.h:
      * page/Crypto.idl:
      
      LayoutTests:
      
      * TestExpectations: The feature isn't enabled anywhere yet, so skipping the new tests.
      
      * security/crypto-subtle-gc-2-expected.txt: Added.
      * security/crypto-subtle-gc-2.html: Added.
      * security/crypto-subtle-gc-3-expected.txt: Added.
      * security/crypto-subtle-gc-3.html: Added.
      * security/crypto-subtle-gc-expected.txt: Added.
      * security/crypto-subtle-gc.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be84a7a3