• ap@apple.com's avatar
    Update WebCrypto JWK mapping to newer proposal · e6074e79
    ap@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=124218
    
    Reviewed by Anders Carlsson.
    
    Source/WebCore: 
    
    Tests: crypto/subtle/jwk-export-use-values.html
           crypto/subtle/jwk-import-use-values.html
    
    1. "extractable" renamed to "ext" in JWK.
    2. New values for "use" mapping, which can now be combined into comma separated lists,
    and cover all possible WebCrypto usages.
    
    * bindings/js/JSCryptoKeySerializationJWK.cpp:
    (WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
    (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable):
    (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
    (WebCore::processUseValue):
    (WebCore::JSCryptoKeySerializationJWK::addJWKUseToJSON):
    (WebCore::JSCryptoKeySerializationJWK::serialize):
    
    LayoutTests: 
    
    * crypto/subtle/jwk-export-use-values-expected.txt: Added.
    * crypto/subtle/jwk-export-use-values.html: Added.
    * crypto/subtle/jwk-import-use-values-expected.txt: Added.
    * crypto/subtle/jwk-import-use-values.html: Added.
    New tests for "use" mapping.
    
    * crypto/subtle/aes-cbc-import-jwk.html:
    * crypto/subtle/aes-cbc-unwrap-rsa.html:
    * crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html:
    * crypto/subtle/aes-cbc-wrap-rsa.html:
    * crypto/subtle/aes-export-key-expected.txt:
    * crypto/subtle/aes-export-key.html:
    * crypto/subtle/hmac-export-key-expected.txt:
    * crypto/subtle/hmac-export-key.html:
    * crypto/subtle/hmac-import-jwk.html:
    * crypto/subtle/import-jwk-expected.txt:
    * crypto/subtle/import-jwk.html:
    * crypto/subtle/rsa-export-key-expected.txt:
    * crypto/subtle/rsa-export-key.html:
    * crypto/subtle/rsa-export-private-key-expected.txt:
    * crypto/subtle/rsa-export-private-key.html:
    * crypto/subtle/rsa-oaep-key-manipulation-expected.txt:
    * crypto/subtle/rsa-oaep-key-manipulation.html:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e6074e79
aes-cbc-wrap-rsa-non-extractable.html 1.78 KB