Changeset 159392 in webkit
- Timestamp:
- Nov 17, 2013, 5:17:09 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r159389 r159392 1 2013-11-17 Alexey Proskuryakov <ap@apple.com> 2 3 JWK crypto key export result is a DOM string instead of an array buffer 4 https://bugs.webkit.org/show_bug.cgi?id=124473 5 6 Reviewed by Sam Weinig. 7 8 * crypto/subtle/aes-export-key.html: 9 * crypto/subtle/hmac-export-key.html: 10 11 * crypto/subtle/resources/common.js: (bytesToASCIIString): Added a function that 12 converts an ArrayBuffer to a string, assuming it's all ASCII. 13 1 14 2013-11-17 Antti Koivisto <antti@apple.com> 2 15 -
trunk/LayoutTests/crypto/subtle/aes-export-key.html
r159377 r159392 49 49 return crypto.subtle.exportKey("jwk", key); 50 50 }).then(function(result) { 51 exportedJWK = JSON.parse( result);51 exportedJWK = JSON.parse(bytesToASCIIString(result)); 52 52 shouldBe("exportedJWK.kty", "'oct'"); 53 53 shouldBe("exportedJWK.k", "'jnOw99oOZFLIEPMrgJB55WL46tJSLGt7'"); -
trunk/LayoutTests/crypto/subtle/hmac-export-key.html
r159377 r159392 43 43 return crypto.subtle.exportKey("jwk", key); 44 44 }).then(function(result) { 45 exportedJWK = JSON.parse( result);45 exportedJWK = JSON.parse(bytesToASCIIString(result)); 46 46 shouldBe("exportedJWK.kty", "'oct'"); 47 47 shouldBe("exportedJWK.k", "'ahjkn-_387fgnsibf23qsvahjkn-_387fgnsibf23qs'"); -
trunk/LayoutTests/crypto/subtle/resources/common.js
r159327 r159392 53 53 54 54 return hexBytes.join(""); 55 } 56 57 function bytesToASCIIString(bytes) 58 { 59 return String.fromCharCode.apply(null, new Uint8Array(bytes)); 55 60 } 56 61 -
trunk/Source/WebCore/ChangeLog
r159391 r159392 1 2013-11-17 Alexey Proskuryakov <ap@apple.com> 2 3 JWK crypto key export result is a DOM string instead of an array buffer 4 https://bugs.webkit.org/show_bug.cgi?id=124473 5 6 Reviewed by Sam Weinig. 7 8 * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::exportKey): 9 Fix it. 10 1 11 2013-11-17 Sam Weinig <sam@webkit.org> 2 12 -
trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp
r159379 r159392 549 549 Vector<unsigned char> resultBuffer; 550 550 resultBuffer.append(utf8String.data(), utf8String.length()); 551 promiseWrapper->fulfill(result );551 promiseWrapper->fulfill(resultBuffer); 552 552 break; 553 553 }
Note:
See TracChangeset
for help on using the changeset viewer.