Changeset 172389 in webkit


Ignore:
Timestamp:
Aug 11, 2014 1:59:15 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Adds stubs for all subtle crypto algorithm implemntations
https://bugs.webkit.org/show_bug.cgi?id=133316

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2014-08-11
Reviewed by Philippe Normand.

.:

  • Source/cmake/OptionsGTK.cmake: Add ENABLE_SUBTLE_CRYPTO option
  • Source/cmake/WebKitFeatures.cmake: Add ENABLE_SUBTLE_CRYPTO option
  • Source/cmakeconfig.h.cmake: Define ENABLE_SUBTLE_CRYPTO

Source/WebCore:

No new tests since no new functionality has been added.

  • CMakeLists.txt: Add subtle crypto 'algorithms' and 'parameters' dirs to WebCore incuded dirs
  • PlatformGTK.cmake: Add subtle crypto sources to WebCore target
  • crypto/gtk/CryptoAlgorithmAES_CBCGtk.cpp: Added.

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/gtk/CryptoAlgorithmAES_KWGtk.cpp: Added.

(WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
(WebCore::CryptoAlgorithmAES_KW::platformDecrypt):

  • crypto/gtk/CryptoAlgorithmHMACGtk.cpp: Added.

(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):

  • crypto/gtk/CryptoAlgorithmRSAES_PKCS1_v1_5Gtk.cpp: Added.

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/gtk/CryptoAlgorithmRSASSA_PKCS1_v1_5Gtk.cpp: Added.

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):

  • crypto/gtk/CryptoAlgorithmRSA_OAEPGtk.cpp: Added.

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/gtk/CryptoAlgorithmRegistryGtk.cpp: Added.

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

  • crypto/gtk/CryptoDigestGtk.cpp: Added.

(WebCore::CryptoDigest::CryptoDigest):
(WebCore::CryptoDigest::~CryptoDigest):
(WebCore::CryptoDigest::create):
(WebCore::CryptoDigest::addBytes):
(WebCore::CryptoDigest::computeHash):

  • crypto/gtk/CryptoKeyRSAGtk.cpp: Added.

(WebCore::CryptoKeyRSA::CryptoKeyRSA):
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::~CryptoKeyRSA):
(WebCore::CryptoKeyRSA::restrictToHash):
(WebCore::CryptoKeyRSA::isRestrictedToHash):
(WebCore::CryptoKeyRSA::keySizeInBits):
(WebCore::CryptoKeyRSA::buildAlgorithmDescription):
(WebCore::CryptoKeyRSA::exportData):
(WebCore::CryptoKeyRSA::generatePair):

  • crypto/gtk/SerializedCryptoKeyWrapGtk.cpp: Added.

(WebCore::getDefaultWebCryptoMasterKey):
(WebCore::wrapSerializedCryptoKey):
(WebCore::unwrapSerializedCryptoKey):

  • crypto/keys/CryptoKeyRSA.h:
Location:
trunk
Files:
11 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r172387 r172389  
     12014-08-11  Eduardo Lima Mitev  <elima@igalia.com>
     2
     3        [GTK] Adds stubs for all subtle crypto algorithm implemntations
     4        https://bugs.webkit.org/show_bug.cgi?id=133316
     5
     6        Reviewed by Philippe Normand.
     7
     8        * Source/cmake/OptionsGTK.cmake: Add ENABLE_SUBTLE_CRYPTO option
     9        * Source/cmake/WebKitFeatures.cmake: Add ENABLE_SUBTLE_CRYPTO option
     10        * Source/cmakeconfig.h.cmake: Define ENABLE_SUBTLE_CRYPTO
     11
    1122014-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/Source/WebCore/CMakeLists.txt

    r172346 r172389  
    3131    "${WEBCORE_DIR}/bridge/jsc"
    3232    "${WEBCORE_DIR}/crypto"
     33    "${WEBCORE_DIR}/crypto/algorithms"
    3334    "${WEBCORE_DIR}/crypto/keys"
    3435    "${WEBCORE_DIR}/crypto/parameters"
  • trunk/Source/WebCore/ChangeLog

    r172384 r172389  
     12014-08-11  Eduardo Lima Mitev  <elima@igalia.com>
     2
     3        [GTK] Adds stubs for all subtle crypto algorithm implemntations
     4        https://bugs.webkit.org/show_bug.cgi?id=133316
     5
     6        Reviewed by Philippe Normand.
     7
     8        No new tests since no new functionality has been added.
     9
     10        * CMakeLists.txt: Add subtle crypto 'algorithms' and 'parameters' dirs to WebCore incuded dirs
     11        * PlatformGTK.cmake:  Add subtle crypto sources to WebCore target
     12        * crypto/gtk/CryptoAlgorithmAES_CBCGtk.cpp: Added.
     13        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
     14        (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
     15        * crypto/gtk/CryptoAlgorithmAES_KWGtk.cpp: Added.
     16        (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
     17        (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
     18        * crypto/gtk/CryptoAlgorithmHMACGtk.cpp: Added.
     19        (WebCore::CryptoAlgorithmHMAC::platformSign):
     20        (WebCore::CryptoAlgorithmHMAC::platformVerify):
     21        * crypto/gtk/CryptoAlgorithmRSAES_PKCS1_v1_5Gtk.cpp: Added.
     22        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
     23        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
     24        * crypto/gtk/CryptoAlgorithmRSASSA_PKCS1_v1_5Gtk.cpp: Added.
     25        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
     26        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
     27        * crypto/gtk/CryptoAlgorithmRSA_OAEPGtk.cpp: Added.
     28        (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
     29        (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
     30        * crypto/gtk/CryptoAlgorithmRegistryGtk.cpp: Added.
     31        (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
     32        * crypto/gtk/CryptoDigestGtk.cpp: Added.
     33        (WebCore::CryptoDigest::CryptoDigest):
     34        (WebCore::CryptoDigest::~CryptoDigest):
     35        (WebCore::CryptoDigest::create):
     36        (WebCore::CryptoDigest::addBytes):
     37        (WebCore::CryptoDigest::computeHash):
     38        * crypto/gtk/CryptoKeyRSAGtk.cpp: Added.
     39        (WebCore::CryptoKeyRSA::CryptoKeyRSA):
     40        (WebCore::CryptoKeyRSA::create):
     41        (WebCore::CryptoKeyRSA::~CryptoKeyRSA):
     42        (WebCore::CryptoKeyRSA::restrictToHash):
     43        (WebCore::CryptoKeyRSA::isRestrictedToHash):
     44        (WebCore::CryptoKeyRSA::keySizeInBits):
     45        (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
     46        (WebCore::CryptoKeyRSA::exportData):
     47        (WebCore::CryptoKeyRSA::generatePair):
     48        * crypto/gtk/SerializedCryptoKeyWrapGtk.cpp: Added.
     49        (WebCore::getDefaultWebCryptoMasterKey):
     50        (WebCore::wrapSerializedCryptoKey):
     51        (WebCore::unwrapSerializedCryptoKey):
     52        * crypto/keys/CryptoKeyRSA.h:
     53
    1542014-08-10  Benjamin Poulain  <bpoulain@apple.com>
    255
  • trunk/Source/WebCore/PlatformGTK.cmake

    r172346 r172389  
    786786# Propagate this variable to the parent scope, so that it can be used in other parts of the build.
    787787set(GObjectDOMBindings_GIR_HEADERS ${GObjectDOMBindings_GIR_HEADERS} PARENT_SCOPE)
     788
     789if (ENABLE_SUBTLE_CRYPTO)
     790    list(APPEND WebCore_SOURCES
     791        crypto/CryptoAlgorithm.cpp
     792        crypto/CryptoAlgorithmDescriptionBuilder.cpp
     793        crypto/CryptoAlgorithmRegistry.cpp
     794        crypto/CryptoKey.cpp
     795        crypto/CryptoKeyPair.cpp
     796        crypto/SubtleCrypto.cpp
     797        crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
     798        crypto/algorithms/CryptoAlgorithmAES_KW.cpp
     799        crypto/algorithms/CryptoAlgorithmHMAC.cpp
     800        crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
     801        crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
     802        crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
     803        crypto/algorithms/CryptoAlgorithmSHA1.cpp
     804        crypto/algorithms/CryptoAlgorithmSHA224.cpp
     805        crypto/algorithms/CryptoAlgorithmSHA256.cpp
     806        crypto/algorithms/CryptoAlgorithmSHA384.cpp
     807        crypto/algorithms/CryptoAlgorithmSHA512.cpp
     808        crypto/keys/CryptoKeyAES.cpp
     809        crypto/keys/CryptoKeyDataOctetSequence.cpp
     810        crypto/keys/CryptoKeyDataRSAComponents.cpp
     811        crypto/keys/CryptoKeyHMAC.cpp
     812        crypto/keys/CryptoKeySerializationRaw.cpp
     813
     814        crypto/gtk/CryptoAlgorithmRegistryGtk.cpp
     815        crypto/gtk/CryptoAlgorithmAES_CBCGtk.cpp
     816        crypto/gtk/CryptoAlgorithmAES_KWGtk.cpp
     817        crypto/gtk/CryptoAlgorithmHMACGtk.cpp
     818        crypto/gtk/CryptoAlgorithmRSAES_PKCS1_v1_5Gtk.cpp
     819        crypto/gtk/CryptoAlgorithmRSA_OAEPGtk.cpp
     820        crypto/gtk/CryptoAlgorithmRSASSA_PKCS1_v1_5Gtk.cpp
     821        crypto/gtk/CryptoDigestGtk.cpp
     822        crypto/gtk/CryptoKeyRSAGtk.cpp
     823        crypto/gtk/SerializedCryptoKeyWrapGtk.cpp
     824    )
     825endif ()
  • trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h

    r163725 r172389  
    3535typedef struct _CCRSACryptor *CCRSACryptorRef;
    3636typedef CCRSACryptorRef PlatformRSAKey;
     37#endif
     38
     39#if PLATFORM(GTK)
     40typedef struct _PlatformRSAKeyGtk PlatformRSAKeyGtk;
     41typedef PlatformRSAKeyGtk *PlatformRSAKey;
    3742#endif
    3843
  • trunk/Source/cmake/OptionsGTK.cmake

    r172387 r172389  
    139139WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SPELLCHECK ON)
    140140WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SUBPIXEL_LAYOUT ON)
     141WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SUBTLE_CRYPTO ON)
    141142WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TEMPLATE_ELEMENT ON)
    142143WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS ON)
Note: See TracChangeset for help on using the changeset viewer.