Skip to content
  • ap@apple.com's avatar
    Add support for RSAES-PKCS1-v1_5 · d79ec0a0
    ap@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=125647
    
    Reviewed by Anders Carlsson.
    
    Source/WebCore: 
    
    Tests: crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html
           crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html
    
    * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
    * crypto/algorithms/CryptoAlgorithmAES_KW.h:
    Removed meaningless parameters arguments from private functions. The base arguments
    class is always empty.
    
    * WebCore.xcodeproj/project.pbxproj:
    * bindings/js/JSCryptoAlgorithmDictionary.cpp:
    (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
    (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
    * bindings/js/JSCryptoKeySerializationJWK.cpp:
    (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
    (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid):
    (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
    * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: Added.
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::CryptoAlgorithmRSAES_PKCS1_v1_5):
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::~CryptoAlgorithmRSAES_PKCS1_v1_5):
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::create):
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::identifier):
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches):
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
    * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h: Added.
    * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp: Added.
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
    (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
    * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
    (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
    Added support for this algorithm.
    
    LayoutTests: 
    
    * crypto/subtle/rsaes-pkcs1-v1_5-decrypt-expected.txt: Added.
    * crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html: Added.
    * crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt: Added.
    * crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d79ec0a0