Rename CryptoKeyUsage to CryptoKeyUsageBitmap and CryptoKey::Usage to CryptoKeyUsage
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Nov 2016 20:12:00 +0000 (20:12 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Nov 2016 20:12:00 +0000 (20:12 +0000)
commitea4665aefaf6bad4f246d85fe0f0be21ada40a5d
treec91483af21af3f94fe96cff7e8523aaf475f717f
parent4e9c75bbd745e75c0eb7011e9291859e289cedd4
Rename CryptoKeyUsage to CryptoKeyUsageBitmap and CryptoKey::Usage to CryptoKeyUsage
https://bugs.webkit.org/show_bug.cgi?id=164624
<rdar://problem/29210140>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch allows IDLType CryptoKeyUsage to be shared among different IDLs, i.e. CryptoKey.idl,
SubtleCrypto.idl and JsonWebKey.idl such that it can simplify the customized binding codes.

Covered by existing tests.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCryptoKeySerializationJWK.cpp:
* bindings/js/JSCryptoKeySerializationJWK.h:
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::toCryptoKeyUsageBitmap):
(WebCore::cryptoKeyUsageBitmapFromJSValue):
(WebCore::toKeyData):
(WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):
(WebCore::jsSubtleCryptoFunctionImportKeyPromise):
(WebCore::cryptoKeyUsageFromString): Deleted.
(WebCore::cryptoKeyUsagesFromJSValue): Deleted.
* bindings/js/JSWebKitSubtleCryptoCustom.cpp:
* bindings/js/SerializedScriptValue.cpp:
* crypto/CryptoAlgorithm.cpp:
* crypto/CryptoAlgorithm.h:
* crypto/CryptoKey.cpp:
* crypto/CryptoKey.h:
* crypto/CryptoKey.idl:
* crypto/CryptoKeySerialization.h:
* crypto/CryptoKeyUsage.h:
* crypto/CryptoKeyUsage.idl: Added.
* crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
* crypto/JsonWebKey.h:
* crypto/JsonWebKey.idl:
* crypto/SubtleCrypto.idl:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
* crypto/algorithms/CryptoAlgorithmAES_CBC.h:
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
* crypto/algorithms/CryptoAlgorithmAES_KW.h:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
* crypto/algorithms/CryptoAlgorithmHMAC.h:
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
* crypto/keys/CryptoKeyAES.cpp:
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyHMAC.cpp:
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.cpp:
* crypto/keys/CryptoKeyRSA.h:
* crypto/keys/CryptoKeySerializationRaw.cpp:
* crypto/keys/CryptoKeySerializationRaw.h:
* crypto/mac/CryptoKeyRSAMac.cpp:

LayoutTests:

* crypto/subtle/generate-key-malformed-parameters-expected.txt:
* crypto/subtle/import-key-malformed-parameters-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
45 files changed:
LayoutTests/ChangeLog
LayoutTests/crypto/subtle/generate-key-malformed-parameters-expected.txt
LayoutTests/crypto/subtle/import-key-malformed-parameters-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.h
Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp
Source/WebCore/bindings/js/JSWebKitSubtleCryptoCustom.cpp
Source/WebCore/bindings/js/SerializedScriptValue.cpp
Source/WebCore/crypto/CryptoAlgorithm.cpp
Source/WebCore/crypto/CryptoAlgorithm.h
Source/WebCore/crypto/CryptoKey.cpp
Source/WebCore/crypto/CryptoKey.h
Source/WebCore/crypto/CryptoKey.idl
Source/WebCore/crypto/CryptoKeySerialization.h
Source/WebCore/crypto/CryptoKeyUsage.h
Source/WebCore/crypto/CryptoKeyUsage.idl [new file with mode: 0644]
Source/WebCore/crypto/JsonWebKey.h
Source/WebCore/crypto/JsonWebKey.idl
Source/WebCore/crypto/SubtleCrypto.idl
Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.h
Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.h
Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.h
Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h
Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h
Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.h
Source/WebCore/crypto/gnutls/CryptoKeyRSAGnuTLS.cpp
Source/WebCore/crypto/keys/CryptoKeyAES.cpp
Source/WebCore/crypto/keys/CryptoKeyAES.h
Source/WebCore/crypto/keys/CryptoKeyHMAC.cpp
Source/WebCore/crypto/keys/CryptoKeyHMAC.h
Source/WebCore/crypto/keys/CryptoKeyRSA.cpp
Source/WebCore/crypto/keys/CryptoKeyRSA.h
Source/WebCore/crypto/keys/CryptoKeySerializationRaw.cpp
Source/WebCore/crypto/keys/CryptoKeySerializationRaw.h
Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp