-
ap@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=125641 Reviewed by Anders Carlsson. Source/WebCore: Currently, WebCrypto editor's draft stipulates that algorithm name is lowercased as part of normalization. But it makes little sense to register algorithms as mixed (mostly upper) case, yet return the name lowercased. Other implementations don't bother respecting this, and signs are that the spec will change. I'd like to match other implementations here, because sticking to the spec only makes us fail 3rd party test suites for no good reason. Updated many existing tests. * crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName): (WebCore::CryptoAlgorithmRegistry::registerAlgorithm): * crypto/CryptoAlgorithmRegistry.h: * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: * crypto/algorithms/CryptoAlgorithmHMAC.cpp: * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: * crypto/algorithms/CryptoAlgorithmSHA1.cpp: * crypto/algorithms/CryptoAlgorithmSHA224.cpp: * crypto/algorithms/CryptoAlgorithmSHA256.cpp: * crypto/algorithms/CryptoAlgorithmSHA384.cpp: * crypto/algorithms/CryptoAlgorithmSHA512.cpp: LayoutTests: * crypto/subtle/aes-cbc-192-encrypt-decrypt-expected.txt: * crypto/subtle/aes-cbc-192-encrypt-decrypt.html: * crypto/subtle/aes-cbc-256-encrypt-decrypt-expected.txt: * crypto/subtle/aes-cbc-256-encrypt-decrypt.html: * crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt: * crypto/subtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt: * crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html: * crypto/subtle/aes-cbc-encrypt-decrypt.html: * crypto/subtle/aes-cbc-generate-key-expected.txt: * crypto/subtle/aes-cbc-generate-key.html: * crypto/subtle/aes-cbc-import-jwk-expected.txt: * crypto/subtle/aes-cbc-import-jwk.html: * crypto/subtle/aes-cbc-invalid-length-expected.txt: * crypto/subtle/aes-cbc-invalid-length.html: * crypto/subtle/aes-cbc-unwrap-failure-expected.txt: * crypto/subtle/aes-cbc-unwrap-failure.html: * crypto/subtle/aes-cbc-unwrap-rsa-expected.txt: * crypto/subtle/aes-cbc-unwrap-rsa.html: * crypto/subtle/aes-cbc-wrap-rsa-expected.txt: * crypto/subtle/aes-cbc-wrap-rsa-non-extractable-expected.txt: * crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html: * crypto/subtle/aes-cbc-wrap-rsa.html: * crypto/subtle/aes-kw-key-manipulation-expected.txt: * crypto/subtle/aes-kw-key-manipulation.html: * crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt: * crypto/subtle/aes-kw-wrap-unwrap-aes.html: * crypto/subtle/aes-postMessage-expected.txt: * crypto/subtle/aes-postMessage.html: * crypto/subtle/hmac-generate-key-expected.txt: * crypto/subtle/hmac-generate-key.html: * crypto/subtle/hmac-import-jwk-expected.txt: * crypto/subtle/hmac-import-jwk.html: * crypto/subtle/hmac-postMessage-expected.txt: * crypto/subtle/hmac-postMessage.html: * crypto/subtle/hmac-sign-verify-empty-key-expected.txt: * crypto/subtle/hmac-sign-verify-empty-key.html: * crypto/subtle/hmac-sign-verify-expected.txt: * crypto/subtle/hmac-sign-verify.html: * crypto/subtle/postMessage-worker-expected.txt: * crypto/subtle/postMessage-worker.html: * crypto/subtle/resources/postMessage-worker.js: * crypto/subtle/rsa-oaep-key-manipulation-expected.txt: * crypto/subtle/rsa-oaep-key-manipulation.html: * crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt: * crypto/subtle/rsa-oaep-wrap-unwrap-aes.html: * crypto/subtle/rsa-postMessage-expected.txt: * crypto/subtle/rsa-postMessage.html: * crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt: * crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html: * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt: * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8199d8e9