Changeset 220619 in webkit
- Timestamp:
- Aug 11, 2017 5:07:00 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 deleted
- 17 edited
- 11 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r220591 r220619 376 376 crypto/SubtleCrypto.idl 377 377 crypto/WebKitSubtleCrypto.idl 378 379 crypto/keys/CryptoAesKeyAlgorithm.idl 380 crypto/keys/CryptoEcKeyAlgorithm.idl 381 crypto/keys/CryptoHmacKeyAlgorithm.idl 382 crypto/keys/CryptoKeyAlgorithm.idl 383 crypto/keys/CryptoRsaHashedKeyAlgorithm.idl 384 crypto/keys/CryptoRsaKeyAlgorithm.idl 378 385 379 386 crypto/parameters/AesCbcCfbParams.idl … … 1182 1189 bindings/js/JSCallbackData.cpp 1183 1190 bindings/js/JSCanvasRenderingContext2DCustom.cpp 1184 bindings/js/JSCryptoAlgorithmBuilder.cpp1185 1191 bindings/js/JSCryptoAlgorithmDictionary.cpp 1186 bindings/js/JSCryptoKeyCustom.cpp1187 1192 bindings/js/JSCryptoKeySerializationJWK.cpp 1188 1193 bindings/js/JSCryptoOperationData.cpp -
trunk/Source/WebCore/ChangeLog
r220616 r220619 1 2017-08-11 Sam Weinig <sam@webkit.org> 2 3 [WebIDL] Replace JSCryptoKeyCustom and JSCryptoAlgorithmBuilder with generated code 4 https://bugs.webkit.org/show_bug.cgi?id=175457 5 6 Reviewed by Chris Dumez. 7 8 * CMakeLists.txt: 9 * DerivedSources.make: 10 * WebCore.xcodeproj/project.pbxproj: 11 * bindings/js/JSCryptoAlgorithmBuilder.cpp: Removed. 12 * bindings/js/JSCryptoAlgorithmBuilder.h: Removed. 13 * bindings/js/JSCryptoKeyCustom.cpp: Removed. 14 15 Remove JSCryptoAlgorithmBuilder and JSCryptoKeyCustom, add KeyAlgorithm 16 IDLs and headers. 17 18 * crypto/CryptoKey.cpp: 19 * crypto/CryptoKey.h: 20 * crypto/CryptoKey.idl: 21 22 Replace custom algorithm attribute with a union of the supported key algorithms. 23 24 * crypto/keys/CryptoAesKeyAlgorithm.h: Added. 25 * crypto/keys/CryptoAesKeyAlgorithm.idl: Added. 26 * crypto/keys/CryptoEcKeyAlgorithm.h: Added. 27 * crypto/keys/CryptoEcKeyAlgorithm.idl: Added. 28 * crypto/keys/CryptoHmacKeyAlgorithm.h: Added. 29 * crypto/keys/CryptoHmacKeyAlgorithm.idl: Added. 30 * crypto/keys/CryptoKeyAlgorithm.h: Added. 31 * crypto/keys/CryptoKeyAlgorithm.idl: Added. 32 * crypto/keys/CryptoRsaHashedKeyAlgorithm.h: Added. 33 * crypto/keys/CryptoRsaHashedKeyAlgorithm.idl: Added. 34 * crypto/keys/CryptoRsaKeyAlgorithm.h: Added. 35 * crypto/keys/CryptoRsaKeyAlgorithm.idl: Added. 36 37 Add IDLs and headers fo the supported key algorithms. 38 39 * crypto/keys/CryptoKeyAES.h: 40 * crypto/keys/CryptoKeyEC.h: 41 * crypto/keys/CryptoKeyHMAC.h: 42 * crypto/keys/CryptoKeyRSA.h: 43 * crypto/keys/CryptoKeyRaw.h: 44 45 Give each of the existing KeyAlgorithm subclasses a dictionary() function 46 that returns the populated corresponding spec'd dictionary. 47 1 48 2017-08-11 Simon Fraser <simon.fraser@apple.com> 2 49 -
trunk/Source/WebCore/DerivedSources.make
r220344 r220619 57 57 $(WebCore)/bindings/js \ 58 58 $(WebCore)/crypto \ 59 $(WebCore)/crypto/keys \ 59 60 $(WebCore)/crypto/parameters \ 60 61 $(WebCore)/css \ … … 306 307 $(WebCore)/crypto/SubtleCrypto.idl \ 307 308 $(WebCore)/crypto/WebKitSubtleCrypto.idl \ 309 $(WebCore)/crypto/keys/CryptoAesKeyAlgorithm.idl \ 310 $(WebCore)/crypto/keys/CryptoEcKeyAlgorithm.idl \ 311 $(WebCore)/crypto/keys/CryptoHmacKeyAlgorithm.idl \ 312 $(WebCore)/crypto/keys/CryptoKeyAlgorithm.idl \ 313 $(WebCore)/crypto/keys/CryptoRsaHashedKeyAlgorithm.idl \ 314 $(WebCore)/crypto/keys/CryptoRsaKeyAlgorithm.idl \ 308 315 $(WebCore)/crypto/parameters/AesCbcCfbParams.idl \ 309 316 $(WebCore)/crypto/parameters/AesCtrParams.idl \ -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r220539 r220619 3263 3263 7C93F34D1AA6BF0700A98BAB /* ContentExtensionCompiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C93F34B1AA6BF0700A98BAB /* ContentExtensionCompiler.cpp */; }; 3264 3264 7C93F34E1AA6BF0700A98BAB /* ContentExtensionCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C93F34C1AA6BF0700A98BAB /* ContentExtensionCompiler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3265 7C9ACA921F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACA8F1F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.h */; }; 3266 7C9ACA981F3CCDAD00F3AA09 /* CryptoAesKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACA961F3CCDAD00F3AA09 /* CryptoAesKeyAlgorithm.h */; }; 3267 7C9ACA9C1F3CCDF200F3AA09 /* CryptoEcKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACA9A1F3CCDF200F3AA09 /* CryptoEcKeyAlgorithm.h */; }; 3268 7C9ACAA01F3CCE3000F3AA09 /* CryptoHmacKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACA9E1F3CCE3000F3AA09 /* CryptoHmacKeyAlgorithm.h */; }; 3269 7C9ACAA41F3CCE6900F3AA09 /* CryptoRsaKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACAA21F3CCE6900F3AA09 /* CryptoRsaKeyAlgorithm.h */; }; 3270 7C9ACAA81F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACAA61F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.h */; }; 3271 7C9ACAB71F3CF1AE00F3AA09 /* JSCryptoAesKeyAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9ACAB61F3CDC4700F3AA09 /* JSCryptoAesKeyAlgorithm.cpp */; }; 3272 7C9ACAB81F3CF1AE00F3AA09 /* JSCryptoAesKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACAAA1F3CDB6300F3AA09 /* JSCryptoAesKeyAlgorithm.h */; }; 3273 7C9ACAB91F3CF1AE00F3AA09 /* JSCryptoEcKeyAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9ACAAD1F3CDB9E00F3AA09 /* JSCryptoEcKeyAlgorithm.cpp */; }; 3274 7C9ACABA1F3CF1AE00F3AA09 /* JSCryptoEcKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACAAC1F3CDB9D00F3AA09 /* JSCryptoEcKeyAlgorithm.h */; }; 3275 7C9ACABB1F3CF1AE00F3AA09 /* JSCryptoHmacKeyAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9ACAAE1F3CDB9F00F3AA09 /* JSCryptoHmacKeyAlgorithm.cpp */; }; 3276 7C9ACABC1F3CF1AE00F3AA09 /* JSCryptoHmacKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACAAF1F3CDB9F00F3AA09 /* JSCryptoHmacKeyAlgorithm.h */; }; 3277 7C9ACABD1F3CF1AE00F3AA09 /* JSCryptoKeyAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9ACAB01F3CDBA000F3AA09 /* JSCryptoKeyAlgorithm.cpp */; }; 3278 7C9ACABE1F3CF1AF00F3AA09 /* JSCryptoKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACAB11F3CDBA100F3AA09 /* JSCryptoKeyAlgorithm.h */; }; 3279 7C9ACABF1F3CF1AF00F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9ACAB41F3CDC0100F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.cpp */; }; 3280 7C9ACAC01F3CF1AF00F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACAB51F3CDC0200F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.h */; }; 3281 7C9ACAC11F3CF1AF00F3AA09 /* JSCryptoRsaKeyAlgorithm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9ACAB21F3CDC0000F3AA09 /* JSCryptoRsaKeyAlgorithm.cpp */; }; 3282 7C9ACAC21F3CF1AF00F3AA09 /* JSCryptoRsaKeyAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9ACAB31F3CDC0100F3AA09 /* JSCryptoRsaKeyAlgorithm.h */; }; 3265 3283 7C9DBFED1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9DBFEB1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp */; }; 3266 3284 7C9DBFEE1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9DBFEC1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h */; }; … … 6529 6547 E157A8E418173A3A009F821D /* CryptoKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E157A8E218173A3A009F821D /* CryptoKey.cpp */; }; 6530 6548 E157A8E518173A3A009F821D /* CryptoKey.h in Headers */ = {isa = PBXBuildFile; fileRef = E157A8E318173A3A009F821D /* CryptoKey.h */; }; 6531 E157A8E818184C67009F821D /* JSCryptoKeyCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E157A8E618184C67009F821D /* JSCryptoKeyCustom.cpp */; };6532 E157A8F018185425009F821D /* JSCryptoAlgorithmBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E157A8EE18185425009F821D /* JSCryptoAlgorithmBuilder.cpp */; };6533 E157A8F118185425009F821D /* JSCryptoAlgorithmBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = E157A8EF18185425009F821D /* JSCryptoAlgorithmBuilder.h */; };6534 6549 E15A36D71104572000B7B639 /* XMLNSNames.h in Headers */ = {isa = PBXBuildFile; fileRef = E15A36D61104572000B7B639 /* XMLNSNames.h */; }; 6535 6550 E15A36D91104572700B7B639 /* XMLNSNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E15A36D81104572700B7B639 /* XMLNSNames.cpp */; }; … … 11339 11354 7C93F34B1AA6BF0700A98BAB /* ContentExtensionCompiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentExtensionCompiler.cpp; sourceTree = "<group>"; }; 11340 11355 7C93F34C1AA6BF0700A98BAB /* ContentExtensionCompiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentExtensionCompiler.h; sourceTree = "<group>"; }; 11356 7C9ACA8F1F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CryptoKeyAlgorithm.h; sourceTree = "<group>"; }; 11357 7C9ACA911F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CryptoKeyAlgorithm.idl; sourceTree = "<group>"; }; 11358 7C9ACA961F3CCDAD00F3AA09 /* CryptoAesKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CryptoAesKeyAlgorithm.h; sourceTree = "<group>"; }; 11359 7C9ACA971F3CCDAD00F3AA09 /* CryptoAesKeyAlgorithm.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CryptoAesKeyAlgorithm.idl; sourceTree = "<group>"; }; 11360 7C9ACA9A1F3CCDF200F3AA09 /* CryptoEcKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CryptoEcKeyAlgorithm.h; sourceTree = "<group>"; }; 11361 7C9ACA9B1F3CCDF200F3AA09 /* CryptoEcKeyAlgorithm.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CryptoEcKeyAlgorithm.idl; sourceTree = "<group>"; }; 11362 7C9ACA9E1F3CCE3000F3AA09 /* CryptoHmacKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CryptoHmacKeyAlgorithm.h; sourceTree = "<group>"; }; 11363 7C9ACA9F1F3CCE3000F3AA09 /* CryptoHmacKeyAlgorithm.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CryptoHmacKeyAlgorithm.idl; sourceTree = "<group>"; }; 11364 7C9ACAA21F3CCE6900F3AA09 /* CryptoRsaKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CryptoRsaKeyAlgorithm.h; sourceTree = "<group>"; }; 11365 7C9ACAA31F3CCE6900F3AA09 /* CryptoRsaKeyAlgorithm.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CryptoRsaKeyAlgorithm.idl; sourceTree = "<group>"; }; 11366 7C9ACAA61F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CryptoRsaHashedKeyAlgorithm.h; sourceTree = "<group>"; }; 11367 7C9ACAA71F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CryptoRsaHashedKeyAlgorithm.idl; sourceTree = "<group>"; }; 11368 7C9ACAAA1F3CDB6300F3AA09 /* JSCryptoAesKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCryptoAesKeyAlgorithm.h; sourceTree = "<group>"; }; 11369 7C9ACAAC1F3CDB9D00F3AA09 /* JSCryptoEcKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCryptoEcKeyAlgorithm.h; sourceTree = "<group>"; }; 11370 7C9ACAAD1F3CDB9E00F3AA09 /* JSCryptoEcKeyAlgorithm.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoEcKeyAlgorithm.cpp; sourceTree = "<group>"; }; 11371 7C9ACAAE1F3CDB9F00F3AA09 /* JSCryptoHmacKeyAlgorithm.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoHmacKeyAlgorithm.cpp; sourceTree = "<group>"; }; 11372 7C9ACAAF1F3CDB9F00F3AA09 /* JSCryptoHmacKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCryptoHmacKeyAlgorithm.h; sourceTree = "<group>"; }; 11373 7C9ACAB01F3CDBA000F3AA09 /* JSCryptoKeyAlgorithm.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoKeyAlgorithm.cpp; sourceTree = "<group>"; }; 11374 7C9ACAB11F3CDBA100F3AA09 /* JSCryptoKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCryptoKeyAlgorithm.h; sourceTree = "<group>"; }; 11375 7C9ACAB21F3CDC0000F3AA09 /* JSCryptoRsaKeyAlgorithm.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoRsaKeyAlgorithm.cpp; sourceTree = "<group>"; }; 11376 7C9ACAB31F3CDC0100F3AA09 /* JSCryptoRsaKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCryptoRsaKeyAlgorithm.h; sourceTree = "<group>"; }; 11377 7C9ACAB41F3CDC0100F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoRsaHashedKeyAlgorithm.cpp; sourceTree = "<group>"; }; 11378 7C9ACAB51F3CDC0200F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCryptoRsaHashedKeyAlgorithm.h; sourceTree = "<group>"; }; 11379 7C9ACAB61F3CDC4700F3AA09 /* JSCryptoAesKeyAlgorithm.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoAesKeyAlgorithm.cpp; sourceTree = "<group>"; }; 11341 11380 7C9DBFEA1A9C489F000D6B25 /* HTMLAttachmentElement.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLAttachmentElement.idl; sourceTree = "<group>"; }; 11342 11381 7C9DBFEB1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAttachmentElement.cpp; sourceTree = "<group>"; }; … … 15118 15157 E157A8E218173A3A009F821D /* CryptoKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoKey.cpp; sourceTree = "<group>"; }; 15119 15158 E157A8E318173A3A009F821D /* CryptoKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoKey.h; sourceTree = "<group>"; }; 15120 E157A8E618184C67009F821D /* JSCryptoKeyCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoKeyCustom.cpp; sourceTree = "<group>"; };15121 E157A8EE18185425009F821D /* JSCryptoAlgorithmBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoAlgorithmBuilder.cpp; sourceTree = "<group>"; };15122 E157A8EF18185425009F821D /* JSCryptoAlgorithmBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCryptoAlgorithmBuilder.h; sourceTree = "<group>"; };15123 15159 E15A36D61104572000B7B639 /* XMLNSNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLNSNames.h; sourceTree = "<group>"; }; 15124 15160 E15A36D81104572700B7B639 /* XMLNSNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLNSNames.cpp; sourceTree = "<group>"; }; … … 18604 18640 5182C2511F3142500059BA7C /* JSServiceWorkerContainer.cpp */, 18605 18641 5182C2541F3142500059BA7C /* JSServiceWorkerContainer.h */, 18606 51F175001F358B3600C74950 /* JSServiceWorkerUpdateViaCache.cpp */,18607 51F175011F358B3600C74950 /* JSServiceWorkerUpdateViaCache.h */,18608 18642 5182C24E1F3142500059BA7C /* JSServiceWorkerGlobalScope.cpp */, 18609 18643 5182C24D1F3142500059BA7C /* JSServiceWorkerGlobalScope.h */, 18610 18644 5182C24F1F3142500059BA7C /* JSServiceWorkerRegistration.cpp */, 18611 18645 5182C2501F3142500059BA7C /* JSServiceWorkerRegistration.h */, 18646 51F175001F358B3600C74950 /* JSServiceWorkerUpdateViaCache.cpp */, 18647 51F175011F358B3600C74950 /* JSServiceWorkerUpdateViaCache.h */, 18612 18648 ); 18613 18649 name = ServiceWorkers; … … 23543 23579 C585A66011D4FAC5004C3E4B /* IDBBindingUtilities.cpp */, 23544 23580 C585A66111D4FAC5004C3E4B /* IDBBindingUtilities.h */, 23545 E157A8EE18185425009F821D /* JSCryptoAlgorithmBuilder.cpp */,23546 E157A8EF18185425009F821D /* JSCryptoAlgorithmBuilder.h */,23547 23581 E1C657101815F9DD00256CDD /* JSCryptoAlgorithmDictionary.cpp */, 23548 23582 E1C657111815F9DD00256CDD /* JSCryptoAlgorithmDictionary.h */, … … 23633 23667 7CD3441B1F32DE30000DCD49 /* Cached Attributes w/ Invalidation */, 23634 23668 7C3D8EE41E08BABE0023B084 /* GC / Wrapping Only */, 23635 E157A8E618184C67009F821D /* JSCryptoKeyCustom.cpp */,23636 23669 9BC5F9DF1D5AAF6A002B749D /* JSCustomElementRegistryCustom.cpp */, 23637 23670 BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */, … … 24570 24603 isa = PBXGroup; 24571 24604 children = ( 24605 7C9ACA961F3CCDAD00F3AA09 /* CryptoAesKeyAlgorithm.h */, 24606 7C9ACA971F3CCDAD00F3AA09 /* CryptoAesKeyAlgorithm.idl */, 24607 7C9ACA9A1F3CCDF200F3AA09 /* CryptoEcKeyAlgorithm.h */, 24608 7C9ACA9B1F3CCDF200F3AA09 /* CryptoEcKeyAlgorithm.idl */, 24609 7C9ACA9E1F3CCE3000F3AA09 /* CryptoHmacKeyAlgorithm.h */, 24610 7C9ACA9F1F3CCE3000F3AA09 /* CryptoHmacKeyAlgorithm.idl */, 24572 24611 E125F84B1824289D00D84CD9 /* CryptoKeyAES.cpp */, 24573 24612 E125F84C1824289D00D84CD9 /* CryptoKeyAES.h */, 24613 7C9ACA8F1F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.h */, 24614 7C9ACA911F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.idl */, 24574 24615 E125F861182C303A00D84CD9 /* CryptoKeyDataOctetSequence.cpp */, 24575 24616 E125F862182C303A00D84CD9 /* CryptoKeyDataOctetSequence.h */, … … 24586 24627 E125F857182C1AA600D84CD9 /* CryptoKeySerializationRaw.cpp */, 24587 24628 E125F858182C1AA600D84CD9 /* CryptoKeySerializationRaw.h */, 24629 7C9ACAA61F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.h */, 24630 7C9ACAA71F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.idl */, 24631 7C9ACAA21F3CCE6900F3AA09 /* CryptoRsaKeyAlgorithm.h */, 24632 7C9ACAA31F3CCE6900F3AA09 /* CryptoRsaKeyAlgorithm.idl */, 24588 24633 ); 24589 24634 path = keys; … … 24793 24838 576814421E70CB1000E77754 /* JSAesKeyParams.cpp */, 24794 24839 576814431E70CB1000E77754 /* JSAesKeyParams.h */, 24840 7C9ACAB61F3CDC4700F3AA09 /* JSCryptoAesKeyAlgorithm.cpp */, 24841 7C9ACAAA1F3CDB6300F3AA09 /* JSCryptoAesKeyAlgorithm.h */, 24795 24842 5739E1301DAC7FD100E14383 /* JSCryptoAlgorithmParameters.cpp */, 24796 24843 5739E12E1DAC7F7800E14383 /* JSCryptoAlgorithmParameters.h */, 24844 7C9ACAAD1F3CDB9E00F3AA09 /* JSCryptoEcKeyAlgorithm.cpp */, 24845 7C9ACAAC1F3CDB9D00F3AA09 /* JSCryptoEcKeyAlgorithm.h */, 24846 7C9ACAAE1F3CDB9F00F3AA09 /* JSCryptoHmacKeyAlgorithm.cpp */, 24847 7C9ACAAF1F3CDB9F00F3AA09 /* JSCryptoHmacKeyAlgorithm.h */, 24797 24848 E157A8DE1817331C009F821D /* JSCryptoKey.cpp */, 24798 24849 E157A8DF1817331C009F821D /* JSCryptoKey.h */, 24850 7C9ACAB01F3CDBA000F3AA09 /* JSCryptoKeyAlgorithm.cpp */, 24851 7C9ACAB11F3CDBA100F3AA09 /* JSCryptoKeyAlgorithm.h */, 24799 24852 E1F80B8B183172B5007885C3 /* JSCryptoKeyPair.cpp */, 24800 24853 E1F80B8C183172B5007885C3 /* JSCryptoKeyPair.h */, 24801 24854 57D0018E1DD5415300ED19D9 /* JSCryptoKeyUsage.cpp */, 24802 24855 57D0018C1DD5413200ED19D9 /* JSCryptoKeyUsage.h */, 24856 7C9ACAB41F3CDC0100F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.cpp */, 24857 7C9ACAB51F3CDC0200F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.h */, 24858 7C9ACAB21F3CDC0000F3AA09 /* JSCryptoRsaKeyAlgorithm.cpp */, 24859 7C9ACAB31F3CDC0100F3AA09 /* JSCryptoRsaKeyAlgorithm.h */, 24803 24860 5768143D1E709C3600E77754 /* JSEcdhKeyDeriveParams.cpp */, 24804 24861 5768143E1E709C3600E77754 /* JSEcdhKeyDeriveParams.h */, … … 26848 26905 E169803D1133542D00894115 /* CRuntimeObject.h in Headers */, 26849 26906 975CA28B130365F800E99AD9 /* Crypto.h in Headers */, 26907 7C9ACA981F3CCDAD00F3AA09 /* CryptoAesKeyAlgorithm.h in Headers */, 26850 26908 E172AF6E180F24C600FBADB9 /* CryptoAlgorithm.h in Headers */, 26851 26909 E125F8421824253A00D84CD9 /* CryptoAlgorithmAES_CBC.h in Headers */, … … 26895 26953 E19AC3F51824DC7900349426 /* CryptoAlgorithmSHA512.h in Headers */, 26896 26954 5721A9871ECE53B10081295A /* CryptoDigestAlgorithm.h in Headers */, 26955 7C9ACA9C1F3CCDF200F3AA09 /* CryptoEcKeyAlgorithm.h in Headers */, 26956 7C9ACAA01F3CCE3000F3AA09 /* CryptoHmacKeyAlgorithm.h in Headers */, 26897 26957 E157A8E518173A3A009F821D /* CryptoKey.h in Headers */, 26898 26958 E125F84E1824289D00D84CD9 /* CryptoKeyAES.h in Headers */, 26959 7C9ACA921F3CC0AA00F3AA09 /* CryptoKeyAlgorithm.h in Headers */, 26899 26960 E125F85E182C2DF600D84CD9 /* CryptoKeyData.h in Headers */, 26900 26961 E125F864182C303A00D84CD9 /* CryptoKeyDataOctetSequence.h in Headers */, … … 26909 26970 E19727161820549E00592D51 /* CryptoKeyType.h in Headers */, 26910 26971 E172AF70180F289500FBADB9 /* CryptoKeyUsage.h in Headers */, 26972 7C9ACAA81F3CCEB400F3AA09 /* CryptoRsaHashedKeyAlgorithm.h in Headers */, 26973 7C9ACAA41F3CCE6900F3AA09 /* CryptoRsaKeyAlgorithm.h in Headers */, 26911 26974 316FE1140E6E1DA700BF6088 /* CSSAnimationController.h in Headers */, 26912 26975 0F15DA8A0F3AAEE70000CE47 /* CSSAnimationControllerPrivate.h in Headers */, … … 27401 27464 316BDBF01E76292000DE0D5A /* GPUDepthStencilState.h in Headers */, 27402 27465 316BDB861E6E0A2700DE0D5A /* GPUDevice.h in Headers */, 27403 51F174FE1F35899200C74950 /* WorkerType.h in Headers */,27404 27466 316BDBCD1E75F18400DE0D5A /* GPUDrawable.h in Headers */, 27405 27467 316BDBFB1E762D0400DE0D5A /* GPUEnums.h in Headers */, … … 27490 27552 977B386A122883E900B81FF8 /* HTMLEntityParser.h in Headers */, 27491 27553 977B386C122883E900B81FF8 /* HTMLEntitySearch.h in Headers */, 27492 51F174FF1F35899700C74950 /* ServiceWorkerUpdateViaCache.h in Headers */,27493 27554 977B386D122883E900B81FF8 /* HTMLEntityTable.h in Headers */, 27494 27555 A81369D4097374F600D74463 /* HTMLFieldSetElement.h in Headers */, … … 27819 27880 77D510021ED4F71800DA4C87 /* JSCredentialUserData.h in Headers */, 27820 27881 975CA2A21303679D00E99AD9 /* JSCrypto.h in Headers */, 27821 E157A8F118185425009F821D /* JSCryptoAlgorithmBuilder.h in Headers */,27882 7C9ACAB81F3CF1AE00F3AA09 /* JSCryptoAesKeyAlgorithm.h in Headers */, 27822 27883 E1C657131815F9DD00256CDD /* JSCryptoAlgorithmDictionary.h in Headers */, 27823 27884 5739E12F1DAC7F7800E14383 /* JSCryptoAlgorithmParameters.h in Headers */, 27885 7C9ACABA1F3CF1AE00F3AA09 /* JSCryptoEcKeyAlgorithm.h in Headers */, 27886 7C9ACABC1F3CF1AE00F3AA09 /* JSCryptoHmacKeyAlgorithm.h in Headers */, 27824 27887 E157A8E11817331C009F821D /* JSCryptoKey.h in Headers */, 27888 7C9ACABE1F3CF1AF00F3AA09 /* JSCryptoKeyAlgorithm.h in Headers */, 27825 27889 E1F80B8E183172B5007885C3 /* JSCryptoKeyPair.h in Headers */, 27826 27890 E125F85218283A5600D84CD9 /* JSCryptoKeySerializationJWK.h in Headers */, 27827 27891 57D0018D1DD5413200ED19D9 /* JSCryptoKeyUsage.h in Headers */, 27828 27892 E125F83E182411E700D84CD9 /* JSCryptoOperationData.h in Headers */, 27893 7C9ACAC01F3CF1AF00F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.h in Headers */, 27894 7C9ACAC21F3CF1AF00F3AA09 /* JSCryptoRsaKeyAlgorithm.h in Headers */, 27829 27895 BC46C1FD0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h in Headers */, 27830 27896 BC46C1FF0C0DDC8F0020CFC3 /* JSCSSImportRule.h in Headers */, … … 28238 28304 5182C25A1F3143CD0059BA7C /* JSServiceWorkerGlobalScope.h in Headers */, 28239 28305 5182C25C1F3143CD0059BA7C /* JSServiceWorkerRegistration.h in Headers */, 28306 51F175031F358B3B00C74950 /* JSServiceWorkerUpdateViaCache.h in Headers */, 28240 28307 9BDA64D81B975CF2009C4387 /* JSShadowRoot.h in Headers */, 28241 28308 46DFF49C1DC2620B00B80B48 /* JSShadowRootMode.h in Headers */, … … 28437 28504 6EE8A77310F803F3005A4A24 /* JSWebGLContextAttributes.h in Headers */, 28438 28505 BC2CBF4E140F1ABD003879BE /* JSWebGLContextEvent.h in Headers */, 28439 51F175061F358BF700C74950 /* JSWorkerType.h in Headers */,28440 28506 6E3FAD3914733F4011E42307 /* JSWebGLDebugRendererInfo.h in Headers */, 28441 28507 6E3FAD3914733F4022E42307 /* JSWebGLDebugShaders.h in Headers */, … … 28495 28561 E1C362EF0EAF2AA9007410BC /* JSWorkerLocation.h in Headers */, 28496 28562 E1271A580EEECDE400F61213 /* JSWorkerNavigator.h in Headers */, 28563 51F175061F358BF700C74950 /* JSWorkerType.h in Headers */, 28497 28564 7C4C96DD1AD4483500365A60 /* JSWritableStream.h in Headers */, 28498 28565 8358CB701C53277500E0C2D8 /* JSXMLDocument.h in Headers */, … … 28716 28783 93309DFA099E64920056E581 /* MergeIdenticalElementsCommand.h in Headers */, 28717 28784 E1ADECCE0E76AD8B004A1A5E /* MessageChannel.h in Headers */, 28718 51F175031F358B3B00C74950 /* JSServiceWorkerUpdateViaCache.h in Headers */,28719 28785 75793E840D0CE0B3007FC0AC /* MessageEvent.h in Headers */, 28720 28786 E1ADECBF0E76ACF1004A1A5E /* MessagePort.h in Headers */, … … 29397 29463 5182C2431F313A090059BA7C /* ServiceWorkerGlobalScope.h in Headers */, 29398 29464 5182C2451F313A090059BA7C /* ServiceWorkerRegistration.h in Headers */, 29465 51F174FF1F35899700C74950 /* ServiceWorkerUpdateViaCache.h in Headers */, 29399 29466 756B2CE118B7101600FECFAA /* SessionID.h in Headers */, 29400 29467 93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */, … … 30203 30270 97AABD2D14FA09D5007457AE /* WorkerThreadableWebSocketChannel.h in Headers */, 30204 30271 A54A0C681DB807D90017A90B /* WorkerToPageFrontendChannel.h in Headers */, 30272 51F174FE1F35899200C74950 /* WorkerType.h in Headers */, 30205 30273 93309E24099E64920056E581 /* WrapContentsInDummySpanCommand.h in Headers */, 30206 30274 416E6FE91BBD12E5000A6053 /* WritableStreamBuiltins.h in Headers */, … … 31798 31866 77D510031ED4F71B00DA4C87 /* JSCredentialUserData.cpp in Sources */, 31799 31867 975CA2A11303679D00E99AD9 /* JSCrypto.cpp in Sources */, 31800 E157A8F018185425009F821D /* JSCryptoAlgorithmBuilder.cpp in Sources */,31868 7C9ACAB71F3CF1AE00F3AA09 /* JSCryptoAesKeyAlgorithm.cpp in Sources */, 31801 31869 E1C657121815F9DD00256CDD /* JSCryptoAlgorithmDictionary.cpp in Sources */, 31802 31870 5739E1311DAC7FD100E14383 /* JSCryptoAlgorithmParameters.cpp in Sources */, 31871 7C9ACAB91F3CF1AE00F3AA09 /* JSCryptoEcKeyAlgorithm.cpp in Sources */, 31872 7C9ACABB1F3CF1AE00F3AA09 /* JSCryptoHmacKeyAlgorithm.cpp in Sources */, 31803 31873 E157A8E01817331C009F821D /* JSCryptoKey.cpp in Sources */, 31804 E157A8E818184C67009F821D /* JSCryptoKeyCustom.cpp in Sources */,31874 7C9ACABD1F3CF1AE00F3AA09 /* JSCryptoKeyAlgorithm.cpp in Sources */, 31805 31875 E1F80B8D183172B5007885C3 /* JSCryptoKeyPair.cpp in Sources */, 31806 31876 E125F85118283A5600D84CD9 /* JSCryptoKeySerializationJWK.cpp in Sources */, 31807 31877 57D0018F1DD5415300ED19D9 /* JSCryptoKeyUsage.cpp in Sources */, 31808 31878 E125F83D182411E700D84CD9 /* JSCryptoOperationData.cpp in Sources */, 31879 7C9ACABF1F3CF1AF00F3AA09 /* JSCryptoRsaHashedKeyAlgorithm.cpp in Sources */, 31880 7C9ACAC11F3CF1AF00F3AA09 /* JSCryptoRsaKeyAlgorithm.cpp in Sources */, 31809 31881 BC46C1FC0C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp in Sources */, 31810 31882 BC46C1FE0C0DDC8F0020CFC3 /* JSCSSImportRule.cpp in Sources */, … … 32075 32147 935F45420F7C3B5F00D7C1FB /* JSLazyEventListener.cpp in Sources */, 32076 32148 BCE1C43B0D9830D3003B02F2 /* JSLocation.cpp in Sources */, 32077 51F175071F358BF900C74950 /* JSWorkerType.cpp in Sources */,32078 32149 BCE1C4400D9830F4003B02F2 /* JSLocationCustom.cpp in Sources */, 32079 32150 93A8061F1E03B585008A1F26 /* JSLongRange.cpp in Sources */, … … 32232 32303 5182C2591F3143CD0059BA7C /* JSServiceWorkerGlobalScope.cpp in Sources */, 32233 32304 5182C25B1F3143CD0059BA7C /* JSServiceWorkerRegistration.cpp in Sources */, 32305 51F175021F358B3B00C74950 /* JSServiceWorkerUpdateViaCache.cpp in Sources */, 32234 32306 9BDA64D71B975CE5009C4387 /* JSShadowRoot.cpp in Sources */, 32235 32307 46DFF49B1DC2620B00B80B48 /* JSShadowRootMode.cpp in Sources */, … … 32515 32587 E1C362F00EAF2AA9007410BC /* JSWorkerLocation.cpp in Sources */, 32516 32588 E1271A590EEECDE400F61213 /* JSWorkerNavigator.cpp in Sources */, 32589 51F175071F358BF900C74950 /* JSWorkerType.cpp in Sources */, 32517 32590 7C4C96DC1AD4483500365A60 /* JSWritableStream.cpp in Sources */, 32518 32591 8358CB6F1C53277200E0C2D8 /* JSXMLDocument.cpp in Sources */, … … 33713 33786 7AF9B20518CFB2DF00C64BEF /* VTTRegionList.cpp in Sources */, 33714 33787 7A93868518DCC14500B8263D /* VTTScanner.cpp in Sources */, 33715 51F175021F358B3B00C74950 /* JSServiceWorkerUpdateViaCache.cpp in Sources */,33716 33788 A14832B1187F61E100DA63A6 /* WAKAppKitStubs.m in Sources */, 33717 33789 A14832B3187F629100DA63A6 /* WAKClipView.m in Sources */, -
trunk/Source/WebCore/crypto/CryptoKey.cpp
r214362 r220619 30 30 31 31 #include "CryptoAlgorithmRegistry.h" 32 #include "CryptoKeyAES.h" 33 #include "CryptoKeyEC.h" 34 #include "CryptoKeyHMAC.h" 35 #include "CryptoKeyRSA.h" 36 #include "CryptoKeyRaw.h" 32 37 #include <wtf/CryptographicallyRandomNumber.h> 33 38 … … 44 49 CryptoKey::~CryptoKey() 45 50 { 51 } 52 53 auto CryptoKey::algorithm() const -> AlgorithmVariant 54 { 55 std::unique_ptr<KeyAlgorithm> algorithm = buildAlgorithm(); 56 switch (algorithm->keyAlgorithmClass()) { 57 case KeyAlgorithmClass::AES: 58 return downcast<AesKeyAlgorithm>(*algorithm).dictionary(); 59 case KeyAlgorithmClass::EC: 60 return downcast<EcKeyAlgorithm>(*algorithm).dictionary(); 61 case KeyAlgorithmClass::HMAC: 62 return downcast<HmacKeyAlgorithm>(*algorithm).dictionary(); 63 case KeyAlgorithmClass::HRSA: 64 return downcast<RsaHashedKeyAlgorithm>(*algorithm).dictionary(); 65 case KeyAlgorithmClass::RSA: 66 return downcast<RsaKeyAlgorithm>(*algorithm).dictionary(); 67 case KeyAlgorithmClass::Raw: 68 return downcast<RawKeyAlgorithm>(*algorithm).dictionary(); 69 } 46 70 } 47 71 -
trunk/Source/WebCore/crypto/CryptoKey.h
r213671 r220619 28 28 #if ENABLE(SUBTLE_CRYPTO) 29 29 30 #include "CryptoAesKeyAlgorithm.h" 30 31 #include "CryptoAlgorithmIdentifier.h" 32 #include "CryptoEcKeyAlgorithm.h" 33 #include "CryptoHmacKeyAlgorithm.h" 34 #include "CryptoKeyAlgorithm.h" 31 35 #include "CryptoKeyType.h" 32 36 #include "CryptoKeyUsage.h" 37 #include "CryptoRsaHashedKeyAlgorithm.h" 38 #include "CryptoRsaKeyAlgorithm.h" 33 39 #include <wtf/Forward.h> 34 40 #include <wtf/ThreadSafeRefCounted.h> 35 41 #include <wtf/TypeCasts.h> 42 #include <wtf/Variant.h> 36 43 #include <wtf/Vector.h> 37 44 #include <wtf/text/WTFString.h> … … 82 89 public: 83 90 using Type = CryptoKeyType; 91 using AlgorithmVariant = Variant<CryptoKeyAlgorithm, CryptoAesKeyAlgorithm, CryptoEcKeyAlgorithm, CryptoHmacKeyAlgorithm, CryptoRsaHashedKeyAlgorithm, CryptoRsaKeyAlgorithm>; 92 84 93 CryptoKey(CryptoAlgorithmIdentifier, Type, bool extractable, CryptoKeyUsageBitmap); 85 94 virtual ~CryptoKey(); 86 95 87 virtual CryptoKeyClass keyClass() const = 0;88 89 96 Type type() const; 90 97 bool extractable() const { return m_extractable; } 98 AlgorithmVariant algorithm() const; 99 Vector<CryptoKeyUsage> usages() const; 100 101 virtual CryptoKeyClass keyClass() const = 0; 91 102 virtual std::unique_ptr<KeyAlgorithm> buildAlgorithm() const = 0; 92 93 // Only for binding purpose.94 Vector<CryptoKeyUsage> usages() const;95 103 96 104 CryptoAlgorithmIdentifier algorithmIdentifier() const { return m_algorithmIdentifier; } -
trunk/Source/WebCore/crypto/CryptoKey.idl
r208602 r220619 30 30 }; 31 31 32 typedef (CryptoKeyAlgorithm or CryptoAesKeyAlgorithm or CryptoEcKeyAlgorithm or CryptoHmacKeyAlgorithm or CryptoRsaHashedKeyAlgorithm or CryptoRsaKeyAlgorithm) KeyAlgorithm; 33 32 34 [ 33 35 Conditional=SUBTLE_CRYPTO, … … 38 40 readonly attribute KeyType type; 39 41 readonly attribute boolean extractable; 40 [CachedAttribute , CustomGetter] readonly attribute objectalgorithm;42 [CachedAttribute] readonly attribute KeyAlgorithm algorithm; 41 43 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 42 44 }; -
trunk/Source/WebCore/crypto/keys/CryptoAesKeyAlgorithm.h
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType { 27 "public", 28 "private", 29 "secret" 26 #pragma once 27 28 #include "CryptoKeyAlgorithm.h" 29 30 namespace WebCore { 31 32 struct CryptoAesKeyAlgorithm : CryptoKeyAlgorithm { 33 // The length, in bits, of the key. 34 unsigned short length; 30 35 }; 31 36 32 [ 33 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 42 }; 37 } -
trunk/Source/WebCore/crypto/keys/CryptoAesKeyAlgorithm.idl
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType {27 "public",28 "private",29 "secret"30 };31 32 26 [ 33 27 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 28 JSGenerateToJSObject 29 ] dictionary CryptoAesKeyAlgorithm : CryptoKeyAlgorithm { 30 // The length, in bits, of the key. 31 required unsigned short length; 42 32 }; -
trunk/Source/WebCore/crypto/keys/CryptoEcKeyAlgorithm.h
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType { 27 "public", 28 "private", 29 "secret" 26 #pragma once 27 28 #include "CryptoKeyAlgorithm.h" 29 30 namespace WebCore { 31 32 struct CryptoEcKeyAlgorithm : CryptoKeyAlgorithm { 33 // The named curve that the key uses 34 String namedCurve; 30 35 }; 31 36 32 [ 33 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 42 }; 37 } 38 -
trunk/Source/WebCore/crypto/keys/CryptoEcKeyAlgorithm.idl
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType { 27 "public", 28 "private", 29 "secret" 30 }; 26 typedef DOMString NamedCurve; 31 27 32 28 [ 33 29 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 30 JSGenerateToJSObject 31 ] dictionary CryptoEcKeyAlgorithm : CryptoKeyAlgorithm { 32 // The named curve that the key uses 33 required NamedCurve namedCurve; 42 34 }; -
trunk/Source/WebCore/crypto/keys/CryptoHmacKeyAlgorithm.h
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType { 27 "public", 28 "private", 29 "secret" 26 #pragma once 27 28 #include "CryptoKeyAlgorithm.h" 29 30 namespace WebCore { 31 32 struct CryptoHmacKeyAlgorithm : CryptoKeyAlgorithm { 33 // The inner hash function to use. 34 CryptoKeyAlgorithm hash; 35 // The length (in bits) of the key. 36 unsigned length; 30 37 }; 31 38 32 [ 33 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 42 }; 39 } 40 41 -
trunk/Source/WebCore/crypto/keys/CryptoHmacKeyAlgorithm.idl
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType {27 "public",28 "private",29 "secret"30 };31 32 26 [ 33 27 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 28 JSGenerateToJSObject 29 ] dictionary CryptoHmacKeyAlgorithm : CryptoKeyAlgorithm { 30 // The inner hash function to use. 31 required CryptoKeyAlgorithm hash; 32 // The length (in bits) of the key. 33 required unsigned long length; 42 34 }; -
trunk/Source/WebCore/crypto/keys/CryptoKeyAES.cpp
r219831 r220619 38 38 39 39 namespace WebCore { 40 41 CryptoAesKeyAlgorithm AesKeyAlgorithm::dictionary() const 42 { 43 CryptoAesKeyAlgorithm result; 44 result.name = this->name(); 45 result.length = this->length(); 46 return result; 47 } 40 48 41 49 static inline bool lengthIsValid(size_t length) -
trunk/Source/WebCore/crypto/keys/CryptoKeyAES.h
r213628 r220619 50 50 KeyAlgorithmClass keyAlgorithmClass() const final { return KeyAlgorithmClass::AES; } 51 51 52 CryptoAesKeyAlgorithm dictionary() const; 53 52 54 size_t length() const { return m_length; } 53 55 -
trunk/Source/WebCore/crypto/keys/CryptoKeyAlgorithm.h
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 26 26 #pragma once 27 27 28 #if ENABLE(SUBTLE_CRYPTO)29 30 #include <wtf/Forward.h>31 #include <wtf/Noncopyable.h>32 #include <wtf/Vector.h>33 28 #include <wtf/text/WTFString.h> 34 35 namespace JSC {36 class ExecState;37 class JSObject;38 }39 29 40 30 namespace WebCore { 41 31 42 class JSCryptoAlgorithmBuilder { 43 WTF_MAKE_NONCOPYABLE(JSCryptoAlgorithmBuilder); 44 public: 45 JSCryptoAlgorithmBuilder(JSC::ExecState*); 46 virtual ~JSCryptoAlgorithmBuilder(); 47 48 JSC::JSObject* result() const { return m_dictionary; } 49 50 void add(const char*, unsigned); 51 void add(const char*, const String&); 52 void add(const char*, const Vector<uint8_t>&); 53 void add(const char*, const JSCryptoAlgorithmBuilder&); 54 55 private: 56 JSC::ExecState* m_exec; 57 JSC::JSObject* m_dictionary; 32 struct CryptoKeyAlgorithm { 33 String name; 58 34 }; 59 35 60 } // namespace WebCore 61 62 #endif // ENABLE(SUBTLE_CRYPTO) 36 } -
trunk/Source/WebCore/crypto/keys/CryptoKeyAlgorithm.idl
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType {27 "public",28 "private",29 "secret"30 };31 32 26 [ 33 27 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 28 JSGenerateToJSObject 29 ] dictionary CryptoKeyAlgorithm { 30 required DOMString name; 42 31 }; -
trunk/Source/WebCore/crypto/keys/CryptoKeyEC.cpp
r219856 r220619 36 36 namespace WebCore { 37 37 38 CryptoEcKeyAlgorithm EcKeyAlgorithm::dictionary() const 39 { 40 CryptoEcKeyAlgorithm result; 41 result.name = this->name(); 42 result.namedCurve = this->namedCurve(); 43 return result; 44 } 45 38 46 static const char* const P256 = "P-256"; 39 47 static const char* const P384 = "P-384"; -
trunk/Source/WebCore/crypto/keys/CryptoKeyEC.h
r216497 r220619 59 59 60 60 const String& namedCurve() const { return m_curve; } 61 62 CryptoEcKeyAlgorithm dictionary() const; 61 63 62 64 private: -
trunk/Source/WebCore/crypto/keys/CryptoKeyHMAC.cpp
r219831 r220619 38 38 39 39 namespace WebCore { 40 41 CryptoHmacKeyAlgorithm HmacKeyAlgorithm::dictionary() const 42 { 43 CryptoHmacKeyAlgorithm result; 44 result.name = this->name(); 45 result.hash.name = this->hash(); 46 result.length = this->length(); 47 return result; 48 } 40 49 41 50 static size_t getKeyLengthFromHash(CryptoAlgorithmIdentifier hash) -
trunk/Source/WebCore/crypto/keys/CryptoKeyHMAC.h
r213628 r220619 53 53 size_t length() const { return m_length; } 54 54 55 CryptoHmacKeyAlgorithm dictionary() const; 56 55 57 private: 56 58 String m_hash; -
trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.cpp
r213560 r220619 29 29 #include "CryptoKeyDataRSAComponents.h" 30 30 #include "JsonWebKey.h" 31 #include <JavaScriptCore/GenericTypedArrayViewInlines.h> 32 #include <JavaScriptCore/JSGenericTypedArrayViewInlines.h> 33 #include <heap/HeapInlines.h> 31 34 #include <wtf/text/Base64.h> 32 35 … … 34 37 35 38 namespace WebCore { 39 40 CryptoRsaKeyAlgorithm RsaKeyAlgorithm::dictionary() const 41 { 42 CryptoRsaKeyAlgorithm result; 43 result.name = this->name(); 44 result.modulusLength = this->modulusLength(); 45 result.publicExponent = Uint8Array::create(this->publicExponent().data(), this->publicExponent().size()); 46 return result; 47 } 48 49 CryptoRsaHashedKeyAlgorithm RsaHashedKeyAlgorithm::dictionary() const 50 { 51 CryptoRsaHashedKeyAlgorithm result; 52 result.name = this->name(); 53 result.modulusLength = this->modulusLength(); 54 result.publicExponent = Uint8Array::create(this->publicExponent().data(), this->publicExponent().size()); 55 result.hash.name = this->hash(); 56 return result; 57 } 36 58 37 59 RefPtr<CryptoKeyRSA> CryptoKeyRSA::importJwk(CryptoAlgorithmIdentifier algorithm, std::optional<CryptoAlgorithmIdentifier> hash, JsonWebKey&& keyData, bool extractable, CryptoKeyUsageBitmap usages) -
trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h
r216497 r220619 66 66 const Vector<uint8_t>& publicExponent() const { return m_publicExponent; } 67 67 68 CryptoRsaKeyAlgorithm dictionary() const; 69 68 70 private: 69 71 size_t m_modulusLength; … … 82 84 83 85 const String& hash() const { return m_hash; } 86 87 CryptoRsaHashedKeyAlgorithm dictionary() const; 84 88 85 89 private: -
trunk/Source/WebCore/crypto/keys/CryptoKeyRaw.cpp
r213671 r220619 34 34 namespace WebCore { 35 35 36 CryptoKeyAlgorithm RawKeyAlgorithm::dictionary() const 37 { 38 CryptoKeyAlgorithm result; 39 result.name = this->name(); 40 return result; 41 } 42 36 43 CryptoKeyRaw::CryptoKeyRaw(CryptoAlgorithmIdentifier identifier, Vector<uint8_t>&& keyData, CryptoKeyUsageBitmap usages) 37 44 : CryptoKey(identifier, CryptoKeyType::Secret, false, usages) -
trunk/Source/WebCore/crypto/keys/CryptoKeyRaw.h
r213671 r220619 40 40 41 41 KeyAlgorithmClass keyAlgorithmClass() const override { return KeyAlgorithmClass::Raw; } 42 43 CryptoKeyAlgorithm dictionary() const; 42 44 }; 43 45 -
trunk/Source/WebCore/crypto/keys/CryptoRsaHashedKeyAlgorithm.h
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType { 27 "public", 28 "private", 29 "secret" 26 #pragma once 27 28 #include "CryptoRsaKeyAlgorithm.h" 29 30 namespace WebCore { 31 32 struct CryptoRsaHashedKeyAlgorithm : CryptoRsaKeyAlgorithm { 33 // The hash algorithm that is used with this key 34 CryptoKeyAlgorithm hash; 30 35 }; 31 36 32 [ 33 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 42 }; 37 } 38 -
trunk/Source/WebCore/crypto/keys/CryptoRsaHashedKeyAlgorithm.idl
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType {27 "public",28 "private",29 "secret"30 };31 32 26 [ 33 27 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 28 JSGenerateToJSObject 29 ] dictionary CryptoRsaHashedKeyAlgorithm : CryptoRsaKeyAlgorithm { 30 // The hash algorithm that is used with this key 31 required CryptoKeyAlgorithm hash; 42 32 }; -
trunk/Source/WebCore/crypto/keys/CryptoRsaKeyAlgorithm.h
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType { 27 "public", 28 "private", 29 "secret" 26 #pragma once 27 28 #include "CryptoKeyAlgorithm.h" 29 #include <runtime/Uint8Array.h> 30 31 namespace WebCore { 32 33 struct CryptoRsaKeyAlgorithm : CryptoKeyAlgorithm { 34 // The length, in bits, of the RSA modulus 35 unsigned modulusLength; 36 // The RSA public exponent 37 RefPtr<Uint8Array> publicExponent; 30 38 }; 31 39 32 [ 33 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 42 }; 40 } 41 -
trunk/Source/WebCore/crypto/keys/CryptoRsaKeyAlgorithm.idl
r220618 r220619 1 1 /* 2 * Copyright (C) 201 3Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 enum KeyType { 27 "public", 28 "private", 29 "secret" 30 }; 26 typedef Uint8Array BigInteger; 31 27 32 28 [ 33 29 Conditional=SUBTLE_CRYPTO, 34 Exposed=(Window,Worker), 35 GenerateIsReachable=Impl, 36 SkipVTableValidation 37 ] interface CryptoKey { 38 readonly attribute KeyType type; 39 readonly attribute boolean extractable; 40 [CachedAttribute, CustomGetter] readonly attribute object algorithm; 41 [CachedAttribute] readonly attribute sequence<CryptoKeyUsage> usages; 30 JSGenerateToJSObject 31 ] dictionary CryptoRsaKeyAlgorithm : CryptoKeyAlgorithm { 32 // The length, in bits, of the RSA modulus 33 required unsigned long modulusLength; 34 // The RSA public exponent 35 required BigInteger publicExponent; 42 36 };
Note: See TracChangeset
for help on using the changeset viewer.