<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[160547] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/160547">160547</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2013-12-13 11:10:54 -0800 (Fri, 13 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>WebCrypto Key.usages should be ordered alphabetically
https://bugs.webkit.org/show_bug.cgi?id=125696
Reviewed by Darin Adler.
Source/WebCore:
* crypto/CryptoKey.cpp: (WebCore::CryptoKey::usages): Do it.
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-invalid-length-expected.txt:
* crypto/subtle/aes-cbc-invalid-length.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-postMessage-expected.txt:
* crypto/subtle/hmac-postMessage.html:
* crypto/subtle/jwk-import-use-values-expected.txt:
* crypto/subtle/jwk-import-use-values.html:
* crypto/subtle/postMessage-worker-expected.txt:
* crypto/subtle/postMessage-worker.html:
* crypto/subtle/resources/postMessage-worker.js:
(onmessage):
* 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/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt:
* crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbc192encryptdecryptexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbc192encryptdecrypthtml">trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbc256encryptdecryptexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbc256encryptdecrypthtml">trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptdecryptexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptdecryptwithpaddingexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptdecryptwithpaddinghtml">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptdecrypthtml">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcgeneratekeyexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcgeneratekeyhtml">trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcinvalidlengthexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcinvalidlengthhtml">trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaeskwwrapunwrapaesexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaeskwwrapunwrapaeshtml">trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaespostMessageexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-postMessage-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaespostMessagehtml">trunk/LayoutTests/crypto/subtle/aes-postMessage.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmacpostMessageexpectedtxt">trunk/LayoutTests/crypto/subtle/hmac-postMessage-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmacpostMessagehtml">trunk/LayoutTests/crypto/subtle/hmac-postMessage.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlejwkimportusevaluesexpectedtxt">trunk/LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlejwkimportusevalueshtml">trunk/LayoutTests/crypto/subtle/jwk-import-use-values.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlepostMessageworkerexpectedtxt">trunk/LayoutTests/crypto/subtle/postMessage-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlepostMessageworkerhtml">trunk/LayoutTests/crypto/subtle/postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleresourcespostMessageworkerjs">trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepkeymanipulationexpectedtxt">trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepkeymanipulationhtml">trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepwrapunwrapaesexpectedtxt">trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepwrapunwrapaeshtml">trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaespkcs1v1_5wrapunwrapaesexpectedtxt">trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaespkcs1v1_5wrapunwrapaeshtml">trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoKeycpp">trunk/Source/WebCore/crypto/CryptoKey.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/ChangeLog        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2013-12-13 Alexey Proskuryakov <ap@apple.com>
+
+ WebCrypto Key.usages should be ordered alphabetically
+ https://bugs.webkit.org/show_bug.cgi?id=125696
+
+ Reviewed by Darin Adler.
+
+ * 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-invalid-length-expected.txt:
+ * crypto/subtle/aes-cbc-invalid-length.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-postMessage-expected.txt:
+ * crypto/subtle/hmac-postMessage.html:
+ * crypto/subtle/jwk-import-use-values-expected.txt:
+ * crypto/subtle/jwk-import-use-values.html:
+ * crypto/subtle/postMessage-worker-expected.txt:
+ * crypto/subtle/postMessage-worker.html:
+ * crypto/subtle/resources/postMessage-worker.js:
+ (onmessage):
+ * 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/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt:
+ * crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html:
+
</ins><span class="cx"> 2013-12-13 Rob Buis <rob.buis@samsung.com>
</span><span class="cx">
</span><span class="cx"> Clean up SVGScriptElement
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbc192encryptdecryptexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS key.algorithm.length is 192
</span><del>-PASS key.usages is ['encrypt', 'decrypt']
</del><ins>+PASS key.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> Using the key to encrypt plaintext...
</span><span class="cx"> PASS bytesToHexString(new Uint8Array(encryptionResult)) is '4f021db243bc633d7178183a9fa071e8b4d9ada9ad7dedf4e5e738763f69145a571b242012fb7ae07fa9baac3df102e008b0e27988598881d920a9e64f5615cd612ccd79224b350935d45dd6a98f8176'
</span><span class="cx"> Decrypting it back...
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbc192encryptdecrypthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> shouldBe("key.extractable", "true");
</span><span class="cx"> shouldBe("key.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("key.algorithm.length", "192");
</span><del>- shouldBe("key.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("key.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> debug("Using the key to encrypt plaintext...");
</span><span class="cx"> return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbc256encryptdecryptexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS key.algorithm.length is 256
</span><del>-PASS key.usages is ['encrypt', 'decrypt']
</del><ins>+PASS key.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> Using the key to encrypt plaintext...
</span><span class="cx"> PASS bytesToHexString(new Uint8Array(encryptionResult)) is 'f58c4c04d6e5f1ba779eabfb5f7bfbd69cfc4e967edb808d679f777bc6702c7d39f23369a9d9bacfa530e26304231461b2eb05e2c39be9fcda6c19078c6a9d1b3f461796d6b0d6b2e0c2a72b4d80e644'
</span><span class="cx"> Decrypting it back...
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbc256encryptdecrypthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> shouldBe("key.extractable", "true");
</span><span class="cx"> shouldBe("key.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("key.algorithm.length", "256");
</span><del>- shouldBe("key.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("key.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> debug("Using the key to encrypt plaintext...");
</span><span class="cx"> return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptdecryptexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS key.algorithm.length is 128
</span><del>-PASS key.usages is ['encrypt', 'decrypt']
</del><ins>+PASS key.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> Using the key to encrypt plaintext...
</span><span class="cx"> PASS bytesToHexString(new Uint8Array(encryptionResult)) is '7649abac8119b246cee98e9b12e9197d5086cb9b507219ee95db113a917678b273bed6b8e3c1743b7116e69e222295163ff1caa1681fac09120eca307586e1a78cb82807230e1321d3fae00d18cc2012'
</span><span class="cx"> Decrypting it back...
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptdecryptwithpaddingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS key.algorithm.length is 128
</span><del>-PASS key.usages is ['encrypt', 'decrypt']
</del><ins>+PASS key.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> Using the key to encrypt plaintext...
</span><span class="cx"> PASS bytesToHexString(new Uint8Array(cyphertext)) is '630199c5f202cc7167bb84c6c72b349d'
</span><span class="cx"> Decrypting it back...
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptdecryptwithpaddinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> shouldBe("key.extractable", "true");
</span><span class="cx"> shouldBe("key.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("key.algorithm.length", "128");
</span><del>- shouldBe("key.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("key.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> debug("Using the key to encrypt plaintext...");
</span><span class="cx"> return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptdecrypthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> shouldBe("key.extractable", "true");
</span><span class="cx"> shouldBe("key.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("key.algorithm.length", "128");
</span><del>- shouldBe("key.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("key.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> debug("Using the key to encrypt plaintext...");
</span><span class="cx"> return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcgeneratekeyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS key.algorithm.length is 128
</span><del>-PASS key.usages is ['encrypt', 'decrypt']
</del><ins>+PASS key.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcgeneratekeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> shouldBe("key.extractable", "true");
</span><span class="cx"> shouldBe("key.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("key.algorithm.length", "128");
</span><del>- shouldBe("key.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("key.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> finishJSTest();
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcinvalidlengthexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS key.algorithm.length is 176
</span><del>-PASS key.usages is ['encrypt', 'decrypt']
</del><ins>+PASS key.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> Using the key to encrypt plaintext...
</span><span class="cx"> Failed, as expected. Note that the spec doesn't appear to clearly define which step should fail.
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcinvalidlengthhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> shouldBe("key.extractable", "true");
</span><span class="cx"> shouldBe("key.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("key.algorithm.length", "176");
</span><del>- shouldBe("key.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("key.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> debug("Using the key to encrypt plaintext...");
</span><span class="cx"> return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, [plaintext]);
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaeskwwrapunwrapaesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS unwrappedKey.extractable is true
</span><span class="cx"> PASS unwrappedKey.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS unwrappedKey.algorithm.length is 128
</span><del>-PASS unwrappedKey.usages is ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']
</del><ins>+PASS unwrappedKey.usages is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
</ins><span class="cx"> Exporting it...
</span><span class="cx"> PASS bytesToHexString(unwrappedKeyData) is bytesToHexString(keyData)
</span><span class="cx">
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> PASS unwrappedKey.extractable is true
</span><span class="cx"> PASS unwrappedKey.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS unwrappedKey.algorithm.length is 128
</span><del>-PASS unwrappedKey.usages is ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']
</del><ins>+PASS unwrappedKey.usages is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
</ins><span class="cx"> Exporting it...
</span><span class="cx"> PASS bytesToHexString(unwrappedKeyData) is bytesToHexString(keyData)
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaeskwwrapunwrapaeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> shouldBe("unwrappedKey.extractable", "true");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.length", "128");
</span><del>- shouldBe("unwrappedKey.usages", "['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']");
</del><ins>+ shouldBe("unwrappedKey.usages", "['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']");
</ins><span class="cx">
</span><span class="cx"> debug("Exporting it...");
</span><span class="cx"> return crypto.subtle.exportKey("raw", unwrappedKey);
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> shouldBe("unwrappedKey.extractable", "true");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.length", "128");
</span><del>- shouldBe("unwrappedKey.usages", "['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']");
</del><ins>+ shouldBe("unwrappedKey.usages", "['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']");
</ins><span class="cx">
</span><span class="cx"> debug("Exporting it...");
</span><span class="cx"> return crypto.subtle.exportKey("raw", unwrappedKey);
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaespostMessageexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-postMessage-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-postMessage-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-postMessage-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS key.algorithm.length is 128
</span><del>-PASS key.usages is ["encrypt", "decrypt", "sign", "verify"]
</del><ins>+PASS key.usages is ["decrypt", "encrypt", "sign", "verify"]
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaespostMessagehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-postMessage.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-postMessage.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/aes-postMessage.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> shouldBe("key.extractable", "true");
</span><span class="cx"> shouldBe("key.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("key.algorithm.length", "128");
</span><del>- shouldBe("key.usages", '["encrypt", "decrypt", "sign", "verify"]');
</del><ins>+ shouldBe("key.usages", '["decrypt", "encrypt", "sign", "verify"]');
</ins><span class="cx">
</span><span class="cx"> finishJSTest();
</span><span class="cx"> }, false);
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmacpostMessageexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-postMessage-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-postMessage-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/hmac-postMessage-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'HMAC'
</span><span class="cx"> PASS key.algorithm.length is 16
</span><del>-PASS key.usages is ["encrypt", "decrypt", "sign", "verify"]
</del><ins>+PASS key.usages is ["decrypt", "encrypt", "sign", "verify"]
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmacpostMessagehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-postMessage.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-postMessage.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/hmac-postMessage.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> shouldBe("key.extractable", "true");
</span><span class="cx"> shouldBe("key.algorithm.name", "'HMAC'");
</span><span class="cx"> shouldBe("key.algorithm.length", "16");
</span><del>- shouldBe("key.usages", '["encrypt", "decrypt", "sign", "verify"]');
</del><ins>+ shouldBe("key.usages", '["decrypt", "encrypt", "sign", "verify"]');
</ins><span class="cx">
</span><span class="cx"> finishJSTest();
</span><span class="cx"> }, false);
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlejwkimportusevaluesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> PASS key.usages is ["decrypt"]
</span><span class="cx">
</span><span class="cx"> enconly,deconly:
</span><del>-PASS key.usages is ["encrypt","decrypt"]
</del><ins>+PASS key.usages is ["decrypt","encrypt"]
</ins><span class="cx">
</span><span class="cx"> wrap:
</span><span class="cx"> PASS key.usages is ["wrapKey"]
</span><span class="lines">@@ -19,13 +19,13 @@
</span><span class="cx"> PASS key.usages is ["unwrapKey"]
</span><span class="cx">
</span><span class="cx"> wrap,unwrap:
</span><del>-PASS key.usages is ["wrapKey","unwrapKey"]
</del><ins>+PASS key.usages is ["unwrapKey","wrapKey"]
</ins><span class="cx">
</span><span class="cx"> enconly,deconly,wrap:
</span><del>-PASS key.usages is ["encrypt","decrypt","wrapKey"]
</del><ins>+PASS key.usages is ["decrypt","encrypt","wrapKey"]
</ins><span class="cx">
</span><span class="cx"> enc:
</span><del>-PASS key.usages is ["encrypt","decrypt","wrapKey","unwrapKey"]
</del><ins>+PASS key.usages is ["decrypt","encrypt","unwrapKey","wrapKey"]
</ins><span class="cx">
</span><span class="cx"> sigonly:
</span><span class="cx"> PASS key.usages is ["sign"]
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> PASS key.usages is ["encrypt"]
</span><span class="cx">
</span><span class="cx"> enconly,,deconly:
</span><del>-PASS key.usages is ["encrypt","decrypt"]
</del><ins>+PASS key.usages is ["decrypt","encrypt"]
</ins><span class="cx">
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlejwkimportusevalueshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/jwk-import-use-values.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/jwk-import-use-values.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/jwk-import-use-values.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -54,12 +54,12 @@
</span><span class="cx"> Promise.all([
</span><span class="cx"> testWithAESCBC(["encrypt"], "enconly"),
</span><span class="cx"> testWithAESCBC(["decrypt"], "deconly"),
</span><del>- testWithAESCBC(["encrypt", "decrypt"], "enconly,deconly"),
</del><ins>+ testWithAESCBC(["decrypt", "encrypt"], "enconly,deconly"),
</ins><span class="cx"> testWithAESCBC(["wrapKey"], "wrap"),
</span><span class="cx"> testWithAESCBC(["unwrapKey"], "unwrap"),
</span><del>- testWithAESCBC(["wrapKey", "unwrapKey"], "wrap,unwrap"),
- testWithAESCBC(["encrypt", "decrypt", "wrapKey"], "enconly,deconly,wrap"),
- testWithAESCBC(["encrypt", "decrypt", "wrapKey", "unwrapKey"], "enc"),
</del><ins>+ testWithAESCBC(["unwrapKey", "wrapKey"], "wrap,unwrap"),
+ testWithAESCBC(["decrypt", "encrypt", "wrapKey"], "enconly,deconly,wrap"),
+ testWithAESCBC(["decrypt", "encrypt", "unwrapKey", "wrapKey"], "enc"),
</ins><span class="cx"> testWithHMAC(["sign"], "sigonly"),
</span><span class="cx"> testWithHMAC(["verify"], "vfyonly"),
</span><span class="cx"> testWithHMAC(["sign", "verify"], "sig"),
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> testWithAESCBC([], "enconly "),
</span><span class="cx"> testWithAESCBC([], "EncOnly"),
</span><span class="cx"> testWithAESCBC(["encrypt"], "enconly, deconly"),
</span><del>- testWithAESCBC(["encrypt", "decrypt"], "enconly,,deconly"),
</del><ins>+ testWithAESCBC(["decrypt","encrypt"], "enconly,,deconly"),
</ins><span class="cx">
</span><span class="cx"> ]).then(function() { finishJSTest(); } );
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlepostMessageworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/postMessage-worker-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/postMessage-worker-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/postMessage-worker-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'HMAC'
</span><span class="cx"> PASS key.algorithm.length is 16
</span><del>-PASS key.usages is ["encrypt", "decrypt", "sign", "verify"]
</del><ins>+PASS key.usages is ["decrypt", "encrypt", "sign", "verify"]
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlepostMessageworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/postMessage-worker.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/postMessage-worker.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/postMessage-worker.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> shouldBe("key.extractable", "true");
</span><span class="cx"> shouldBe("key.algorithm.name", "'HMAC'");
</span><span class="cx"> shouldBe("key.algorithm.length", "16");
</span><del>- shouldBe("key.usages", '["encrypt", "decrypt", "sign", "verify"]');
</del><ins>+ shouldBe("key.usages", '["decrypt", "encrypt", "sign", "verify"]');
</ins><span class="cx"> }
</span><span class="cx"> finishJSTest();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleresourcespostMessageworkerjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -7,8 +7,8 @@
</span><span class="cx"> postMessage({ result:false, message:'key.extractable should be true' });
</span><span class="cx"> else if (key.algorithm.name != "HMAC")
</span><span class="cx"> postMessage({ result:false, message:'key.algorithm.name should be "HMAC"' });
</span><del>- else if (key.usages.toString() != "encrypt,decrypt,sign,verify")
- postMessage({ result:false, message:'key.usages should be ["encrypt", "decrypt", "sign", "verify"]' });
</del><ins>+ else if (key.usages.toString() != "decrypt,encrypt,sign,verify")
+ postMessage({ result:false, message:'key.usages should be ["decrypt", "encrypt", "sign", "verify"]' });
</ins><span class="cx"> else
</span><span class="cx"> postMessage({ result:true, key:key });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepkeymanipulationexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> PASS bytesToHexString(exportedPublicKey.algorithm.publicExponent) is '010001'
</span><span class="cx"> PASS exportedPublicKey.algorithm.hash.name is 'SHA-1'
</span><span class="cx"> PASS exportedPublicKey.extractable is true
</span><del>-PASS exportedPublicKey.usages is ['encrypt','decrypt','wrapKey','unwrapKey']
</del><ins>+PASS exportedPublicKey.usages is ['decrypt','encrypt','unwrapKey','wrapKey']
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepkeymanipulationhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> shouldBe("bytesToHexString(exportedPublicKey.algorithm.publicExponent)", "'010001'");
</span><span class="cx"> shouldBe("exportedPublicKey.algorithm.hash.name", "'SHA-1'");
</span><span class="cx"> shouldBe("exportedPublicKey.extractable", "true");
</span><del>- shouldBe("exportedPublicKey.usages", "['encrypt','decrypt','wrapKey','unwrapKey']");
</del><ins>+ shouldBe("exportedPublicKey.usages", "['decrypt','encrypt','unwrapKey','wrapKey']");
</ins><span class="cx">
</span><span class="cx"> finishJSTest();
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepwrapunwrapaesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS unwrappedKey.extractable is true
</span><span class="cx"> PASS unwrappedKey.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS unwrappedKey.algorithm.length is 256
</span><del>-PASS unwrappedKey.usages is ['encrypt', 'decrypt']
</del><ins>+PASS unwrappedKey.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> Exporting it...
</span><span class="cx"> PASS bytesToHexString(unwrappedKeyData) is bytesToHexString(aesKeyData)
</span><span class="cx">
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> PASS unwrappedKey.extractable is true
</span><span class="cx"> PASS unwrappedKey.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS unwrappedKey.algorithm.length is 256
</span><del>-PASS unwrappedKey.usages is ['encrypt', 'decrypt']
</del><ins>+PASS unwrappedKey.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> Exporting it...
</span><span class="cx"> PASS bytesToHexString(unwrappedKeyData) is bytesToHexString(aesKeyData)
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepwrapunwrapaeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> shouldBe("unwrappedKey.extractable", "true");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.length", "256");
</span><del>- shouldBe("unwrappedKey.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("unwrappedKey.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> debug("Exporting it...");
</span><span class="cx"> return crypto.subtle.exportKey("raw", unwrappedKey);
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> shouldBe("unwrappedKey.extractable", "true");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.length", "256");
</span><del>- shouldBe("unwrappedKey.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("unwrappedKey.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> debug("Exporting it...");
</span><span class="cx"> return crypto.subtle.exportKey("raw", unwrappedKey);
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaespkcs1v1_5wrapunwrapaesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS unwrappedKey.extractable is true
</span><span class="cx"> PASS unwrappedKey.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS unwrappedKey.algorithm.length is 256
</span><del>-PASS unwrappedKey.usages is ['encrypt', 'decrypt']
</del><ins>+PASS unwrappedKey.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> Exporting it...
</span><span class="cx"> PASS bytesToHexString(unwrappedKeyData) is bytesToHexString(aesKeyData)
</span><span class="cx">
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> PASS unwrappedKey.extractable is true
</span><span class="cx"> PASS unwrappedKey.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS unwrappedKey.algorithm.length is 256
</span><del>-PASS unwrappedKey.usages is ['encrypt', 'decrypt']
</del><ins>+PASS unwrappedKey.usages is ['decrypt', 'encrypt']
</ins><span class="cx"> Exporting it...
</span><span class="cx"> PASS bytesToHexString(unwrappedKeyData) is bytesToHexString(aesKeyData)
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaespkcs1v1_5wrapunwrapaeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> shouldBe("unwrappedKey.extractable", "true");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.length", "256");
</span><del>- shouldBe("unwrappedKey.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("unwrappedKey.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> debug("Exporting it...");
</span><span class="cx"> return crypto.subtle.exportKey("raw", unwrappedKey);
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> shouldBe("unwrappedKey.extractable", "true");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.name", "'AES-CBC'");
</span><span class="cx"> shouldBe("unwrappedKey.algorithm.length", "256");
</span><del>- shouldBe("unwrappedKey.usages", "['encrypt', 'decrypt']");
</del><ins>+ shouldBe("unwrappedKey.usages", "['decrypt', 'encrypt']");
</ins><span class="cx">
</span><span class="cx"> debug("Exporting it...");
</span><span class="cx"> return crypto.subtle.exportKey("raw", unwrappedKey);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/Source/WebCore/ChangeLog        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2013-12-13 Alexey Proskuryakov <ap@apple.com>
+
+ WebCrypto Key.usages should be ordered alphabetically
+ https://bugs.webkit.org/show_bug.cgi?id=125696
+
+ Reviewed by Darin Adler.
+
+ * crypto/CryptoKey.cpp: (WebCore::CryptoKey::usages): Do it.
+
</ins><span class="cx"> 2013-12-13 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> Make some optimizations for DOM bindings involving vectors
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoKeycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoKey.cpp (160546 => 160547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoKey.cpp        2013-12-13 16:27:54 UTC (rev 160546)
+++ trunk/Source/WebCore/crypto/CryptoKey.cpp        2013-12-13 19:10:54 UTC (rev 160547)
</span><span class="lines">@@ -67,23 +67,24 @@
</span><span class="cx">
</span><span class="cx"> Vector<String> CryptoKey::usages() const
</span><span class="cx"> {
</span><ins>+ // The result is ordered alphabetically.
</ins><span class="cx"> Vector<String> result;
</span><ins>+ if (m_usages & CryptoKeyUsageDecrypt)
+ result.append(ASCIILiteral("decrypt"));
+ if (m_usages & CryptoKeyUsageDeriveBits)
+ result.append(ASCIILiteral("deriveBits"));
+ if (m_usages & CryptoKeyUsageDeriveKey)
+ result.append(ASCIILiteral("deriveKey"));
</ins><span class="cx"> if (m_usages & CryptoKeyUsageEncrypt)
</span><span class="cx"> result.append(ASCIILiteral("encrypt"));
</span><del>- if (m_usages & CryptoKeyUsageDecrypt)
- result.append(ASCIILiteral("decrypt"));
</del><span class="cx"> if (m_usages & CryptoKeyUsageSign)
</span><span class="cx"> result.append(ASCIILiteral("sign"));
</span><ins>+ if (m_usages & CryptoKeyUsageUnwrapKey)
+ result.append(ASCIILiteral("unwrapKey"));
</ins><span class="cx"> if (m_usages & CryptoKeyUsageVerify)
</span><span class="cx"> result.append(ASCIILiteral("verify"));
</span><del>- if (m_usages & CryptoKeyUsageDeriveKey)
- result.append(ASCIILiteral("deriveKey"));
- if (m_usages & CryptoKeyUsageDeriveBits)
- result.append(ASCIILiteral("deriveBits"));
</del><span class="cx"> if (m_usages & CryptoKeyUsageWrapKey)
</span><span class="cx"> result.append(ASCIILiteral("wrapKey"));
</span><del>- if (m_usages & CryptoKeyUsageUnwrapKey)
- result.append(ASCIILiteral("unwrapKey"));
</del><span class="cx">
</span><span class="cx"> return result;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>