Changeset 163976 in webkit
- Timestamp:
- Feb 12, 2014, 1:08:40 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r163974 r163976 1 2014-02-12 Alexey Proskuryakov <ap@apple.com> 2 3 Wrap WebCrypto keys in SerializedScriptValue 4 https://bugs.webkit.org/show_bug.cgi?id=128680 5 6 Reviewed by Anders Carlsson. 7 8 * crypto/subtle/rsa-indexeddb-expected.txt: Added. 9 * crypto/subtle/rsa-indexeddb.html: Added. 10 * platform/efl/TestExpectations: 11 * platform/gtk/TestExpectations: 12 * platform/mac-wk1/TestExpectations: 13 * platform/win/TestExpectations: 14 * platform/wincairo/TestExpectations: 15 1 16 2014-02-12 Brendan Long <b.long@cablelabs.com> 2 17 -
trunk/LayoutTests/platform/efl/TestExpectations
r163953 r163976 272 272 webkit.org/b/87661 http/tests/security/cross-origin-worker-indexeddb.html [ Skip ] 273 273 webkit.org/b/87661 http/tests/security/no-indexeddb-from-sandbox.html [ Skip ] 274 webkit.org/b/87661 crypto/subtle/rsa-indexeddb.html [ Skip ] 274 275 275 276 #//////////////////////////////////////////////////////////////////////////////////////// -
trunk/LayoutTests/platform/gtk/TestExpectations
r163891 r163976 494 494 webkit.org/b/107194 http/tests/security/cross-origin-worker-indexeddb.html [ Skip ] 495 495 webkit.org/b/107194 http/tests/security/no-indexeddb-from-sandbox.html [ Skip ] 496 crypto/subtle/rsa-indexeddb.html 496 497 497 498 # crypto.subtle is not yet enabled -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r163968 r163976 6 6 http/tests/security/cross-origin-worker-indexeddb.html 7 7 http/tests/security/no-indexeddb-from-sandbox.html 8 crypto/subtle/rsa-indexeddb.html -
trunk/LayoutTests/platform/win/TestExpectations
r163924 r163976 1085 1085 http/tests/security/cross-origin-worker-indexeddb.html 1086 1086 http/tests/security/no-indexeddb-from-sandbox.html 1087 crypto/subtle/rsa-indexeddb.html 1087 1088 1088 1089 # StorageTracker is not enabled. -
trunk/LayoutTests/platform/wincairo/TestExpectations
r163619 r163976 1582 1582 http/tests/security/cross-origin-worker-indexeddb.html 1583 1583 http/tests/security/no-indexeddb-from-sandbox.html 1584 crypto/subtle/rsa-indexeddb.html 1584 1585 1585 1586 # StorageTracker is not enabled. -
trunk/Source/WebCore/ChangeLog
r163975 r163976 1 2014-02-12 Alexey Proskuryakov <ap@apple.com> 2 3 Wrap WebCrypto keys in SerializedScriptValue 4 https://bugs.webkit.org/show_bug.cgi?id=128680 5 6 Reviewed by Anders Carlsson. 7 8 Test: crypto/subtle/rsa-indexeddb.html 9 10 Added Mac code to wrap a key with AES-GCM. We then serialize it into a plist, 11 because more custom formats would be crazy (even the custom format in SerializedScriptValue 12 makes me nervous, we'll certainly need to change CryptoKey in the future). 13 14 * WebCore.exp.in: 15 * WebCore.xcodeproj/project.pbxproj: 16 * crypto/CommonCryptoUtilities.h: 17 * crypto/SerializedCryptoKeyWrap.h: Added. 18 * crypto/mac/SerializedCryptoKeyWrapMac.mm: Added. 19 (WebCore::vectorFromNSData): 20 (WebCore::wrapSerializedCryptoKey): 21 (WebCore::unwrapSerializedCryptoKey): 22 1 23 2014-02-12 Brent Fulgham <bfulgham@apple.com> 2 24 -
trunk/Source/WebCore/WebCore.exp.in
r163975 r163976 912 912 __ZN7WebCore23getFileModificationTimeERKN3WTF6StringERl 913 913 __ZN7WebCore23getHostnamesWithCookiesERKNS_21NetworkStorageSessionERN3WTF7HashSetINS3_6StringENS3_10StringHashENS3_10HashTraitsIS5_EEEE 914 __ZN7WebCore23wrapSerializedCryptoKeyERKN3WTF6VectorIhLm0ENS0_15CrashOnOverflowEEES5_RS3_ 914 915 __ZN7WebCore24CachedResourceHandleBase11setResourceEPNS_14CachedResourceE 915 916 __ZN7WebCore24DocumentMarkerController10markersForEPNS_4NodeENS_14DocumentMarker11MarkerTypesE … … 934 935 __ZN7WebCore25computeViewportAttributesENS_17ViewportArgumentsEiiifNS_7IntSizeE 935 936 __ZN7WebCore25createCanonicalUUIDStringEv 937 __ZN7WebCore25unwrapSerializedCryptoKeyERKN3WTF6VectorIhLm0ENS0_15CrashOnOverflowEEES5_RS3_ 936 938 __ZN7WebCore26ContextDestructionObserver16contextDestroyedEv 937 939 __ZN7WebCore26ContextDestructionObserverC2EPNS_22ScriptExecutionContextE -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r163974 r163976 5785 5785 E187056316E54A0D00585E97 /* MainThreadTask.h in Headers */ = {isa = PBXBuildFile; fileRef = E187056216E54A0D00585E97 /* MainThreadTask.h */; }; 5786 5786 E18772F1126E2629003DD586 /* Language.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18772F0126E2629003DD586 /* Language.cpp */; }; 5787 E18DF33518AAF12C00773E59 /* SerializedCryptoKeyWrap.h in Headers */ = {isa = PBXBuildFile; fileRef = E18DF33418AAF12C00773E59 /* SerializedCryptoKeyWrap.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5788 E18DF33818AAF14D00773E59 /* SerializedCryptoKeyWrapMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E18DF33618AAF14D00773E59 /* SerializedCryptoKeyWrapMac.mm */; }; 5787 5789 E19727161820549E00592D51 /* CryptoKeyType.h in Headers */ = {isa = PBXBuildFile; fileRef = E19727151820549E00592D51 /* CryptoKeyType.h */; }; 5788 5790 E19AC3EE1824DC7900349426 /* CryptoAlgorithmSHA224.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E19AC3E61824DC7900349426 /* CryptoAlgorithmSHA224.cpp */; }; … … 13077 13079 E187056216E54A0D00585E97 /* MainThreadTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainThreadTask.h; sourceTree = "<group>"; }; 13078 13080 E18772F0126E2629003DD586 /* Language.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Language.cpp; sourceTree = "<group>"; }; 13081 E18DF33418AAF12C00773E59 /* SerializedCryptoKeyWrap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedCryptoKeyWrap.h; sourceTree = "<group>"; }; 13082 E18DF33618AAF14D00773E59 /* SerializedCryptoKeyWrapMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SerializedCryptoKeyWrapMac.mm; path = mac/SerializedCryptoKeyWrapMac.mm; sourceTree = "<group>"; }; 13079 13083 E19727151820549E00592D51 /* CryptoKeyType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoKeyType.h; sourceTree = "<group>"; }; 13080 13084 E19AC3E61824DC7900349426 /* CryptoAlgorithmSHA224.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmSHA224.cpp; sourceTree = "<group>"; }; … … 21036 21040 E164FAA418315E1A00DB4E61 /* CryptoKeyRSAMac.cpp */, 21037 21041 E1FE13621834351100892F13 /* CryptoDigestMac.cpp */, 21042 E18DF33618AAF14D00773E59 /* SerializedCryptoKeyWrapMac.mm */, 21038 21043 ); 21039 21044 name = mac; … … 21237 21242 E19727151820549E00592D51 /* CryptoKeyType.h */, 21238 21243 E172AF6F180F289500FBADB9 /* CryptoKeyUsage.h */, 21244 E18DF33418AAF12C00773E59 /* SerializedCryptoKeyWrap.h */, 21239 21245 E1FF8F5C1807364B00132674 /* SubtleCrypto.idl */, 21240 21246 E1FF8F5D1807442100132674 /* SubtleCrypto.cpp */, … … 23437 23443 15C770A6100D41CD005BA267 /* DOMValidityState.h in Headers */, 23438 23444 BC1A37C0097C715F0019F3D8 /* DOMViews.h in Headers */, 23445 E18DF33518AAF12C00773E59 /* SerializedCryptoKeyWrap.h in Headers */, 23439 23446 31C0FF490E4CEFDD007D6FE5 /* DOMWebKitAnimationEvent.h in Headers */, 23440 23447 31C0FF4B0E4CEFDD007D6FE5 /* DOMWebKitAnimationEventInternal.h in Headers */, … … 26321 26328 E1FE137A184D21BB00892F13 /* CryptoAlgorithmAES_KW.cpp in Sources */, 26322 26329 512DD8F70D91E6AF000F89EE /* ArchiveResourceCollection.cpp in Sources */, 26330 E18DF33818AAF14D00773E59 /* SerializedCryptoKeyWrapMac.mm in Sources */, 26323 26331 49B3760C15C6C6840059131D /* ArrayValue.cpp in Sources */, 26324 26332 FD5686C913AC180200B69C68 /* AsyncAudioDecoder.cpp in Sources */, -
trunk/Source/WebCore/crypto/CommonCryptoUtilities.h
r160503 r163976 90 90 extern "C" CCCryptorStatus CCRSAGetKeyComponents(CCRSACryptorRef rsaKey, uint8_t *modulus, size_t *modulusLength, uint8_t *exponent, size_t *exponentLength, uint8_t *p, size_t *pLength, uint8_t *q, size_t *qLength); 91 91 extern "C" CCRSAKeyType CCRSAGetKeyType(CCRSACryptorRef key); 92 extern "C" CCCryptorStatus CCCryptorGCM(CCOperation op, CCAlgorithm alg, const void* key, size_t keyLength, const void* iv, size_t ivLen, const void* aData, size_t aDataLen, const void* dataIn, size_t dataInLength, void* dataOut, const void* tag, size_t* tagLength); 92 93 93 94 namespace WebCore { -
trunk/Source/WebKit/mac/ChangeLog
r163920 r163976 1 2014-02-12 Alexey Proskuryakov <ap@apple.com> 2 3 Wrap WebCrypto keys in SerializedScriptValue 4 https://bugs.webkit.org/show_bug.cgi?id=128680 5 6 Reviewed by Anders Carlsson. 7 8 Retrieve a master key (placeholder code for now), and use it to wrap key data. 9 10 * WebCoreSupport/WebChromeClient.mm: 11 (WebChromeClient::wrapCryptoKey): 12 (WebChromeClient::unwrapCryptoKey): 13 1 14 2014-02-11 Ryosuke Niwa <rniwa@webkit.org> 2 15 -
trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
r163883 r163976 80 80 #import <WebCore/PlatformScreen.h> 81 81 #import <WebCore/ResourceRequest.h> 82 #import <WebCore/SerializedCryptoKeyWrap.h> 82 83 #import <WebCore/Widget.h> 83 84 #import <WebCore/WindowFeatures.h> … … 1002 1003 bool WebChromeClient::wrapCryptoKey(const Vector<uint8_t>& key, Vector<uint8_t>& wrappedKey) const 1003 1004 { 1004 wrappedKey = key; 1005 return true; 1005 Vector<uint8_t> masterKey(16); 1006 memset(masterKey.data(), 0, masterKey.size()); // FIXME: Not implemented yet, will be getting a key from client. 1007 return wrapSerializedCryptoKey(masterKey, key, wrappedKey); 1006 1008 } 1007 1009 1008 1010 bool WebChromeClient::unwrapCryptoKey(const Vector<uint8_t>& wrappedKey, Vector<uint8_t>& key) const 1009 1011 { 1010 key = wrappedKey; 1011 return true; 1012 } 1013 #endif 1012 Vector<uint8_t> masterKey(16); 1013 memset(masterKey.data(), 0, masterKey.size()); // FIXME: Not implemented yet, will be getting a key from client. 1014 return unwrapSerializedCryptoKey(masterKey, wrappedKey, key); 1015 } 1016 #endif -
trunk/Source/WebKit2/ChangeLog
r163972 r163976 1 2014-02-12 Alexey Proskuryakov <ap@apple.com> 2 3 Wrap WebCrypto keys in SerializedScriptValue 4 https://bugs.webkit.org/show_bug.cgi?id=128680 5 6 Reviewed by Anders Carlsson. 7 8 Retrieve a master key (placeholder code for now), and use it to wrap key data. 9 10 * UIProcess/WebPageProxy.cpp: 11 (WebKit::WebPageProxy::wrapCryptoKey): 12 (WebKit::WebPageProxy::unwrapCryptoKey): 13 * UIProcess/mac/WebPageProxyMac.mm: 14 (WebKit::WebPageProxy::wrapCryptoKey): 15 (WebKit::WebPageProxy::unwrapCryptoKey): 16 1 17 2014-02-12 Zan Dobersek <zdobersek@igalia.com> 2 18 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r163959 r163976 4480 4480 } 4481 4481 4482 #if ENABLE(SUBTLE_CRYPTO) 4482 #if ENABLE(SUBTLE_CRYPTO) && !PLATFORM(COCOA) 4483 4483 void WebPageProxy::wrapCryptoKey(const Vector<uint8_t>& key, bool& succeeded, Vector<uint8_t>& wrappedKey) 4484 4484 { 4485 // FIXME: Implement. 4486 wrappedKey = key; 4487 succeeded = true; 4485 notImplemented(); 4486 succeeded = false; 4488 4487 } 4489 4488 4490 4489 void WebPageProxy::unwrapCryptoKey(const Vector<uint8_t>& wrappedKey, bool& succeeded, Vector<uint8_t>& key) 4491 4490 { 4492 // FIXME: Implement. 4493 key = wrappedKey; 4494 succeeded = true; 4491 notImplemented(); 4492 succeeded = false; 4495 4493 } 4496 4494 #endif -
trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
r163480 r163976 45 45 #import <WebCore/GraphicsLayer.h> 46 46 #import <WebCore/RuntimeApplicationChecks.h> 47 #import <WebCore/SerializedCryptoKeyWrap.h> 47 48 #import <WebCore/SharedBuffer.h> 48 49 #import <WebCore/TextAlternativeWithRange.h> … … 573 574 } 574 575 576 #if ENABLE(SUBTLE_CRYPTO) 577 void WebPageProxy::wrapCryptoKey(const Vector<uint8_t>& key, bool& succeeded, Vector<uint8_t>& wrappedKey) 578 { 579 Vector<uint8_t> masterKey(16); 580 memset(masterKey.data(), 0, masterKey.size()); // FIXME: Not implemented yet, will be getting a key from client. 581 succeeded = wrapSerializedCryptoKey(masterKey, key, wrappedKey); 582 } 583 584 void WebPageProxy::unwrapCryptoKey(const Vector<uint8_t>& wrappedKey, bool& succeeded, Vector<uint8_t>& key) 585 { 586 Vector<uint8_t> masterKey(16); 587 memset(masterKey.data(), 0, masterKey.size()); // FIXME: Not implemented yet, will be getting a key from client. 588 succeeded = unwrapSerializedCryptoKey(masterKey, wrappedKey, key); 589 } 590 #endif 591 575 592 } // namespace WebKit
Note:
See TracChangeset
for help on using the changeset viewer.