<!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>[213489] 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/213489">213489</a></dd>
<dt>Author</dt> <dd>jiewen_tan@apple.com</dd>
<dt>Date</dt> <dd>2017-03-06 18:56:58 -0800 (Mon, 06 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>[WebCrypto] Implement ECDH GenerateKey operation
https://bugs.webkit.org/show_bug.cgi?id=169093
<rdar://problem/23789585>
Reviewed by Brent Fulgham.
LayoutTests/imported/w3c:
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt:
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt:
Source/WebCore:
This patch implements GenerateKey operation of ECDH according to:
https://www.w3.org/TR/WebCryptoAPI/#ecdh-operations.
Note: Sad that we are not able to support P-521 at this moment due
to lack of necessary support in the underlying crypto library.
Tests: crypto/subtle/ec-generate-key-malformed-parameters.html
crypto/subtle/ecdh-generate-key-extractable.html
crypto/subtle/ecdh-generate-key-p256.html
crypto/subtle/ecdh-generate-key-p384.html
crypto/subtle/ecdh-generate-key-single-usage.html
crypto/workers/subtle/ec-generate-key.html
* CMakeLists.txt:
* DerivedSources.make:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCryptoKeyCustom.cpp:
(WebCore::JSCryptoKey::algorithm):
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):
Add support for ECDH.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::write):
Structured clonable will be added later on.
* crypto/CommonCryptoUtilities.h:
Add SPI for EC.
* crypto/CryptoAlgorithmParameters.h:
* crypto/CryptoKey.h:
* crypto/algorithms/CryptoAlgorithmECDH.cpp: Added.
(WebCore::CryptoAlgorithmECDH::create):
(WebCore::CryptoAlgorithmECDH::identifier):
(WebCore::CryptoAlgorithmECDH::generateKey):
* crypto/algorithms/CryptoAlgorithmECDH.h: Added.
* crypto/gnutls/CryptoKeyECGnuTLS.cpp: Added.
(WebCore::CryptoKeyEC::~CryptoKeyEC):
(WebCore::CryptoKeyEC::platformGeneratePair):
* crypto/keys/CryptoKeyEC.cpp: Added.
(WebCore::CryptoKeyEC::CryptoKeyEC):
(WebCore::CryptoKeyEC::generatePair):
(WebCore::CryptoKeyEC::buildAlgorithm):
(WebCore::CryptoKeyEC::exportData):
* crypto/keys/CryptoKeyEC.h: Added.
(WebCore::EcKeyAlgorithm::EcKeyAlgorithm):
(WebCore::EcKeyAlgorithm::namedCurve):
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
Add support for ECDH.
* crypto/mac/CryptoKeyECMac.cpp: Added.
(WebCore::CryptoKeyEC::~CryptoKeyEC):
(WebCore::CryptoKeyEC::platformGeneratePair):
* crypto/parameters/CryptoAlgorithmEcKeyParams.h: Added.
* crypto/parameters/EcKeyParams.idl: Added.
LayoutTests:
* crypto/subtle/ec-generate-key-malformed-parameters-expected.txt: Added.
* crypto/subtle/ec-generate-key-malformed-parameters.html: Added.
* crypto/subtle/ecdh-generate-key-extractable-expected.txt: Added.
* crypto/subtle/ecdh-generate-key-extractable.html: Added.
* crypto/subtle/ecdh-generate-key-p256-expected.txt: Added.
* crypto/subtle/ecdh-generate-key-p256.html: Added.
* crypto/subtle/ecdh-generate-key-p384-expected.txt: Added.
* crypto/subtle/ecdh-generate-key-p384.html: Added.
* crypto/subtle/ecdh-generate-key-single-usage-expected.txt: Added.
* crypto/subtle/ecdh-generate-key-single-usage.html: Added.
* crypto/workers/subtle/ec-generate-key-expected.txt: Added.
* crypto/workers/subtle/ec-generate-key.html: Added.
* crypto/workers/subtle/resources/ec-generate-key.js: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsWebCryptoAPIgenerateKeyfailures_ECDHworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsWebCryptoAPIgenerateKeysuccesses_ECDHworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsWebCryptoAPIgenerateKeytest_failures_ECDHexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsWebCryptoAPIgenerateKeytest_successes_ECDHexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCorePlatformGTKcmake">trunk/Source/WebCore/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebCorePlatformMaccmake">trunk/Source/WebCore/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCryptoKeyCustomcpp">trunk/Source/WebCore/bindings/js/JSCryptoKeyCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp">trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsSerializedScriptValuecpp">trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoCommonCryptoUtilitiesh">trunk/Source/WebCore/crypto/CommonCryptoUtilities.h</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoAlgorithmParametersh">trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoKeyh">trunk/Source/WebCore/crypto/CryptoKey.h</a></li>
<li><a href="#trunkSourceWebCorecryptomacCryptoAlgorithmRegistryMaccpp">trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscryptosubtleecgeneratekeymalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/ec-generate-key-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecgeneratekeymalformedparametershtml">trunk/LayoutTests/crypto/subtle/ec-generate-key-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdhgeneratekeyextractableexpectedtxt">trunk/LayoutTests/crypto/subtle/ecdh-generate-key-extractable-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdhgeneratekeyextractablehtml">trunk/LayoutTests/crypto/subtle/ecdh-generate-key-extractable.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdhgeneratekeyp256expectedtxt">trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p256-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdhgeneratekeyp256html">trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p256.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdhgeneratekeyp384expectedtxt">trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p384-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdhgeneratekeyp384html">trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p384.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdhgeneratekeysingleusageexpectedtxt">trunk/LayoutTests/crypto/subtle/ecdh-generate-key-single-usage-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdhgeneratekeysingleusagehtml">trunk/LayoutTests/crypto/subtle/ecdh-generate-key-single-usage.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleecgeneratekeyexpectedtxt">trunk/LayoutTests/crypto/workers/subtle/ec-generate-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleecgeneratekeyhtml">trunk/LayoutTests/crypto/workers/subtle/ec-generate-key.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourcesecgeneratekeyjs">trunk/LayoutTests/crypto/workers/subtle/resources/ec-generate-key.js</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmECDHcpp">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmECDHh">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.h</a></li>
<li><a href="#trunkSourceWebCorecryptognutlsCryptoKeyECGnuTLScpp">trunk/Source/WebCore/crypto/gnutls/CryptoKeyECGnuTLS.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptokeysCryptoKeyECcpp">trunk/Source/WebCore/crypto/keys/CryptoKeyEC.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptokeysCryptoKeyECh">trunk/Source/WebCore/crypto/keys/CryptoKeyEC.h</a></li>
<li><a href="#trunkSourceWebCorecryptomacCryptoKeyECMaccpp">trunk/Source/WebCore/crypto/mac/CryptoKeyECMac.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersCryptoAlgorithmEcKeyParamsh">trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmEcKeyParams.h</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersEcKeyParamsidl">trunk/Source/WebCore/crypto/parameters/EcKeyParams.idl</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/LayoutTests/ChangeLog        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2017-03-06 Jiewen Tan <jiewen_tan@apple.com>
+
+ [WebCrypto] Implement ECDH GenerateKey operation
+ https://bugs.webkit.org/show_bug.cgi?id=169093
+ <rdar://problem/23789585>
+
+ Reviewed by Brent Fulgham.
+
+ * crypto/subtle/ec-generate-key-malformed-parameters-expected.txt: Added.
+ * crypto/subtle/ec-generate-key-malformed-parameters.html: Added.
+ * crypto/subtle/ecdh-generate-key-extractable-expected.txt: Added.
+ * crypto/subtle/ecdh-generate-key-extractable.html: Added.
+ * crypto/subtle/ecdh-generate-key-p256-expected.txt: Added.
+ * crypto/subtle/ecdh-generate-key-p256.html: Added.
+ * crypto/subtle/ecdh-generate-key-p384-expected.txt: Added.
+ * crypto/subtle/ecdh-generate-key-p384.html: Added.
+ * crypto/subtle/ecdh-generate-key-single-usage-expected.txt: Added.
+ * crypto/subtle/ecdh-generate-key-single-usage.html: Added.
+ * crypto/workers/subtle/ec-generate-key-expected.txt: Added.
+ * crypto/workers/subtle/ec-generate-key.html: Added.
+ * crypto/workers/subtle/resources/ec-generate-key.js: Added.
+
</ins><span class="cx"> 2017-03-06 Dave Hyatt <hyatt@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION: Block no longer shrinks to preferred width in this flex box layout
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecgeneratekeymalformedparametersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ec-generate-key-malformed-parameters-expected.txt (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ec-generate-key-malformed-parameters-expected.txt         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ec-generate-key-malformed-parameters-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+Test generating an EC key pair with malformed-paramters.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS crypto.subtle.generateKey("ecdh", extractable, ["deriveKey", "deriveBits"]) rejected promise with TypeError: Member EcKeyParams.namedCurve is required and must be an instance of DOMString.
+PASS crypto.subtle.generateKey({name: "ecdh"}, extractable, ["deriveKey", "deriveBits"]) rejected promise with TypeError: Member EcKeyParams.namedCurve is required and must be an instance of DOMString.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: true}, extractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: null}, extractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: undefined}, extractable, ["deriveKey", "deriveBits"]) rejected promise with TypeError: Member EcKeyParams.namedCurve is required and must be an instance of DOMString.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: Symbol()}, extractable, ["deriveKey", "deriveBits"]) rejected promise with TypeError: Cannot convert a symbol to a string.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: { }}, extractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: 1}, extractable, ["deriveKey", "deriveBits"]) rejected promise with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["encrypt"]) rejected promise with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["decrypt"]) rejected promise with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["sign"]) rejected promise with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["verify"]) rejected promise with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["wrapKey"]) rejected promise with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["unwrapKey"]) rejected promise with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-521"}, extractable, ["deriveKey"]) rejected promise with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecgeneratekeymalformedparametershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ec-generate-key-malformed-parameters.html (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ec-generate-key-malformed-parameters.html         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ec-generate-key-malformed-parameters.html        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/common.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+description("Test generating an EC key pair with malformed-paramters.");
+
+var extractable = true;
+
+// Malformed AlgorithmIdentifiers
+shouldReject('crypto.subtle.generateKey("ecdh", extractable, ["deriveKey", "deriveBits"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh"}, extractable, ["deriveKey", "deriveBits"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: true}, extractable, ["deriveKey", "deriveBits"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: null}, extractable, ["deriveKey", "deriveBits"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: undefined}, extractable, ["deriveKey", "deriveBits"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: Symbol()}, extractable, ["deriveKey", "deriveBits"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: { }}, extractable, ["deriveKey", "deriveBits"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: 1}, extractable, ["deriveKey", "deriveBits"])');
+// Wrong usages
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["encrypt"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["decrypt"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["sign"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["verify"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["wrapKey"])');
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-256"}, extractable, ["unwrapKey"])');
+// Not supported NamedCurve
+shouldReject('crypto.subtle.generateKey({name: "ecdh", namedCurve: "P-521"}, extractable, ["deriveKey"])');
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdhgeneratekeyextractableexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ecdh-generate-key-extractable-expected.txt (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdh-generate-key-extractable-expected.txt         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ecdh-generate-key-extractable-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+Test generating an extractable EC key pair with P-256 using ECDH algorithm.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Generating a key pair...
+PASS keyPair.toString() is '[object Object]'
+PASS keyPair.publicKey.type is 'public'
+PASS keyPair.publicKey.extractable is true
+PASS keyPair.publicKey.algorithm.name is 'ECDH'
+PASS keyPair.publicKey.algorithm.namedCurve is 'P-256'
+PASS keyPair.publicKey.usages is [ ]
+PASS keyPair.privateKey.type is 'private'
+PASS keyPair.privateKey.extractable is true
+PASS keyPair.privateKey.algorithm.name is 'ECDH'
+PASS keyPair.privateKey.algorithm.namedCurve is 'P-256'
+PASS keyPair.privateKey.usages is ['deriveBits', 'deriveKey']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdhgeneratekeyextractablehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ecdh-generate-key-extractable.html (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdh-generate-key-extractable.html         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ecdh-generate-key-extractable.html        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/common.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+description("Test generating an extractable EC key pair with P-256 using ECDH algorithm.");
+
+jsTestIsAsync = true;
+
+var extractable = true;
+
+debug("Generating a key pair...");
+crypto.subtle.generateKey({ name: "ECDH", namedCurve: "P-256"}, extractable, ["deriveKey", "deriveBits"]).then(function(result) {
+ keyPair = result;
+ shouldBe("keyPair.toString()", "'[object Object]'");
+ shouldBe("keyPair.publicKey.type", "'public'");
+ shouldBe("keyPair.publicKey.extractable", "true");
+ shouldBe("keyPair.publicKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.publicKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.publicKey.usages", "[ ]");
+ shouldBe("keyPair.privateKey.type", "'private'");
+ shouldBe("keyPair.privateKey.extractable", "true");
+ shouldBe("keyPair.privateKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.privateKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.privateKey.usages", "['deriveBits', 'deriveKey']");
+
+ finishJSTest();
+});
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdhgeneratekeyp256expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p256-expected.txt (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p256-expected.txt         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p256-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+Test generating an EC key pair with P-256 using ECDH algorithm.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Generating a key pair...
+PASS keyPair.toString() is '[object Object]'
+PASS keyPair.publicKey.type is 'public'
+PASS keyPair.publicKey.extractable is true
+PASS keyPair.publicKey.algorithm.name is 'ECDH'
+PASS keyPair.publicKey.algorithm.namedCurve is 'P-256'
+PASS keyPair.publicKey.usages is [ ]
+PASS keyPair.privateKey.type is 'private'
+PASS keyPair.privateKey.extractable is false
+PASS keyPair.privateKey.algorithm.name is 'ECDH'
+PASS keyPair.privateKey.algorithm.namedCurve is 'P-256'
+PASS keyPair.privateKey.usages is ['deriveBits', 'deriveKey']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdhgeneratekeyp256html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p256.html (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p256.html         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p256.html        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/common.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+description("Test generating an EC key pair with P-256 using ECDH algorithm.");
+
+jsTestIsAsync = true;
+
+var nonExtractable = false;
+
+debug("Generating a key pair...");
+crypto.subtle.generateKey({ name: "ECDH", namedCurve: "P-256"}, nonExtractable, ["deriveKey", "deriveBits"]).then(function(result) {
+ keyPair = result;
+ shouldBe("keyPair.toString()", "'[object Object]'");
+ shouldBe("keyPair.publicKey.type", "'public'");
+ shouldBe("keyPair.publicKey.extractable", "true");
+ shouldBe("keyPair.publicKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.publicKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.publicKey.usages", "[ ]");
+ shouldBe("keyPair.privateKey.type", "'private'");
+ shouldBe("keyPair.privateKey.extractable", "false");
+ shouldBe("keyPair.privateKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.privateKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.privateKey.usages", "['deriveBits', 'deriveKey']");
+
+ finishJSTest();
+});
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdhgeneratekeyp384expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p384-expected.txt (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p384-expected.txt         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p384-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+Test generating an EC key pair with P-384 using ECDH algorithm.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Generating a key pair...
+PASS keyPair.toString() is '[object Object]'
+PASS keyPair.publicKey.type is 'public'
+PASS keyPair.publicKey.extractable is true
+PASS keyPair.publicKey.algorithm.name is 'ECDH'
+PASS keyPair.publicKey.algorithm.namedCurve is 'P-384'
+PASS keyPair.publicKey.usages is [ ]
+PASS keyPair.privateKey.type is 'private'
+PASS keyPair.privateKey.extractable is false
+PASS keyPair.privateKey.algorithm.name is 'ECDH'
+PASS keyPair.privateKey.algorithm.namedCurve is 'P-384'
+PASS keyPair.privateKey.usages is ['deriveBits', 'deriveKey']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdhgeneratekeyp384html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p384.html (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p384.html         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ecdh-generate-key-p384.html        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/common.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+description("Test generating an EC key pair with P-384 using ECDH algorithm.");
+
+jsTestIsAsync = true;
+
+var nonExtractable = false;
+
+debug("Generating a key pair...");
+crypto.subtle.generateKey({ name: "ECDH", namedCurve: "P-384"}, nonExtractable, ["deriveKey", "deriveBits"]).then(function(result) {
+ keyPair = result;
+ shouldBe("keyPair.toString()", "'[object Object]'");
+ shouldBe("keyPair.publicKey.type", "'public'");
+ shouldBe("keyPair.publicKey.extractable", "true");
+ shouldBe("keyPair.publicKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.publicKey.algorithm.namedCurve", "'P-384'");
+ shouldBe("keyPair.publicKey.usages", "[ ]");
+ shouldBe("keyPair.privateKey.type", "'private'");
+ shouldBe("keyPair.privateKey.extractable", "false");
+ shouldBe("keyPair.privateKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.privateKey.algorithm.namedCurve", "'P-384'");
+ shouldBe("keyPair.privateKey.usages", "['deriveBits', 'deriveKey']");
+
+ finishJSTest();
+});
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdhgeneratekeysingleusageexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ecdh-generate-key-single-usage-expected.txt (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdh-generate-key-single-usage-expected.txt         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ecdh-generate-key-single-usage-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+Test generating an EC key pair with P-256 using ECDH algorithm with a single usage.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Generating a key pair...
+PASS keyPair.toString() is '[object Object]'
+PASS keyPair.publicKey.type is 'public'
+PASS keyPair.publicKey.extractable is true
+PASS keyPair.publicKey.algorithm.name is 'ECDH'
+PASS keyPair.publicKey.algorithm.namedCurve is 'P-256'
+PASS keyPair.publicKey.usages is [ ]
+PASS keyPair.privateKey.type is 'private'
+PASS keyPair.privateKey.extractable is false
+PASS keyPair.privateKey.algorithm.name is 'ECDH'
+PASS keyPair.privateKey.algorithm.namedCurve is 'P-256'
+PASS keyPair.privateKey.usages is ['deriveKey']
+PASS keyPair.toString() is '[object Object]'
+PASS keyPair.publicKey.type is 'public'
+PASS keyPair.publicKey.extractable is true
+PASS keyPair.publicKey.algorithm.name is 'ECDH'
+PASS keyPair.publicKey.algorithm.namedCurve is 'P-256'
+PASS keyPair.publicKey.usages is [ ]
+PASS keyPair.privateKey.type is 'private'
+PASS keyPair.privateKey.extractable is false
+PASS keyPair.privateKey.algorithm.name is 'ECDH'
+PASS keyPair.privateKey.algorithm.namedCurve is 'P-256'
+PASS keyPair.privateKey.usages is ['deriveBits']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdhgeneratekeysingleusagehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/ecdh-generate-key-single-usage.html (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdh-generate-key-single-usage.html         (rev 0)
+++ trunk/LayoutTests/crypto/subtle/ecdh-generate-key-single-usage.html        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/common.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+description("Test generating an EC key pair with P-256 using ECDH algorithm with a single usage.");
+
+jsTestIsAsync = true;
+
+var nonExtractable = false;
+
+debug("Generating a key pair...");
+crypto.subtle.generateKey({ name: "ECDH", namedCurve: "P-256"}, nonExtractable, ["deriveKey"]).then(function(result) {
+ keyPair = result;
+ shouldBe("keyPair.toString()", "'[object Object]'");
+ shouldBe("keyPair.publicKey.type", "'public'");
+ shouldBe("keyPair.publicKey.extractable", "true");
+ shouldBe("keyPair.publicKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.publicKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.publicKey.usages", "[ ]");
+ shouldBe("keyPair.privateKey.type", "'private'");
+ shouldBe("keyPair.privateKey.extractable", "false");
+ shouldBe("keyPair.privateKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.privateKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.privateKey.usages", "['deriveKey']");
+
+ return crypto.subtle.generateKey({ name: "ECDH", namedCurve: "P-256"}, nonExtractable, ["deriveBits"]);
+}).then(function(result) {
+ keyPair = result;
+ shouldBe("keyPair.toString()", "'[object Object]'");
+ shouldBe("keyPair.publicKey.type", "'public'");
+ shouldBe("keyPair.publicKey.extractable", "true");
+ shouldBe("keyPair.publicKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.publicKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.publicKey.usages", "[ ]");
+ shouldBe("keyPair.privateKey.type", "'private'");
+ shouldBe("keyPair.privateKey.extractable", "false");
+ shouldBe("keyPair.privateKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.privateKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.privateKey.usages", "['deriveBits']");
+
+ finishJSTest();
+});
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleecgeneratekeyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/ec-generate-key-expected.txt (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/ec-generate-key-expected.txt         (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/ec-generate-key-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+[Worker] Test generating an EC key pair with P-256 using ECDH algorithm in workers.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Starting worker: resources/ec-generate-key.js
+[Worker] Generating a key pair...
+PASS [Worker] keyPair.toString() is '[object Object]'
+PASS [Worker] keyPair.publicKey.type is 'public'
+PASS [Worker] keyPair.publicKey.extractable is true
+PASS [Worker] keyPair.publicKey.algorithm.name is 'ECDH'
+PASS [Worker] keyPair.publicKey.algorithm.namedCurve is 'P-256'
+PASS [Worker] keyPair.publicKey.usages is [ ]
+PASS [Worker] keyPair.privateKey.type is 'private'
+PASS [Worker] keyPair.privateKey.extractable is false
+PASS [Worker] keyPair.privateKey.algorithm.name is 'ECDH'
+PASS [Worker] keyPair.privateKey.algorithm.namedCurve is 'P-256'
+PASS [Worker] keyPair.privateKey.usages is ['deriveBits', 'deriveKey']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleecgeneratekeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/ec-generate-key.html (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/ec-generate-key.html         (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/ec-generate-key.html        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <script src="../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+ <script>
+ worker = startWorker('resources/ec-generate-key.js');
+ </script>
+ <script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourcesecgeneratekeyjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/resources/ec-generate-key.js (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/ec-generate-key.js         (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/ec-generate-key.js        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+importScripts('../../../../resources/js-test-pre.js');
+importScripts("../../../resources/common.js");
+
+description("Test generating an EC key pair with P-256 using ECDH algorithm in workers.");
+
+jsTestIsAsync = true;
+
+var nonExtractable = false;
+
+debug("Generating a key pair...");
+crypto.subtle.generateKey({ name: "ECDH", namedCurve: "P-256"}, nonExtractable, ["deriveKey", "deriveBits"]).then(function(result) {
+ keyPair = result;
+ shouldBe("keyPair.toString()", "'[object Object]'");
+ shouldBe("keyPair.publicKey.type", "'public'");
+ shouldBe("keyPair.publicKey.extractable", "true");
+ shouldBe("keyPair.publicKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.publicKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.publicKey.usages", "[ ]");
+ shouldBe("keyPair.privateKey.type", "'private'");
+ shouldBe("keyPair.privateKey.extractable", "false");
+ shouldBe("keyPair.privateKey.algorithm.name", "'ECDH'");
+ shouldBe("keyPair.privateKey.algorithm.namedCurve", "'P-256'");
+ shouldBe("keyPair.privateKey.usages", "['deriveBits', 'deriveKey']");
+
+ finishJSTest();
+});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-03-06 Jiewen Tan <jiewen_tan@apple.com>
+
+ [WebCrypto] Implement ECDH GenerateKey operation
+ https://bugs.webkit.org/show_bug.cgi?id=169093
+ <rdar://problem/23789585>
+
+ Reviewed by Brent Fulgham.
+
+ * web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt:
+ * web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt:
+ * web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt:
+ * web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt:
+
</ins><span class="cx"> 2017-03-06 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Fix URLs relative to file URLs with paths beginning with Windows drive letters
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsWebCryptoAPIgenerateKeyfailures_ECDHworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -323,96 +323,96 @@
</span><span class="cx"> PASS Bad algorithm: generateKey({name: EC, namedCurve: P521}, true, [decrypt, sign, deriveBits, decrypt, sign, deriveBits])
</span><span class="cx"> PASS Bad algorithm: generateKey({name: EC, namedCurve: P521}, RED, [decrypt, sign, deriveBits, decrypt, sign, deriveBits])
</span><span class="cx"> PASS Bad algorithm: generateKey({name: EC, namedCurve: P521}, 7, [decrypt, sign, deriveBits, decrypt, sign, deriveBits])
</span><del>-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
</del><ins>+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey])
</ins><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: P-512}, false, [deriveKey])
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: P-512}, true, [deriveKey])
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: P-512}, false, [deriveBits, deriveKey])
</span><span class="lines">@@ -433,10 +433,10 @@
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: Curve25519}, true, [])
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: Curve25519}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: Curve25519}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
</span><del>-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-256}, false, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-256}, true, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-384}, false, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-384}, true, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
</del><ins>+PASS Empty usages: generateKey({name: ECDH, namedCurve: P-256}, false, [])
+PASS Empty usages: generateKey({name: ECDH, namedCurve: P-256}, true, [])
+PASS Empty usages: generateKey({name: ECDH, namedCurve: P-384}, false, [])
+PASS Empty usages: generateKey({name: ECDH, namedCurve: P-384}, true, [])
</ins><span class="cx"> FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-521}, false, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
</span><span class="cx"> FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-521}, true, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsWebCryptoAPIgenerateKeysuccesses_ECDHworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -1,74 +1,74 @@
</span><span class="cx">
</span><del>-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
</del><ins>+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsWebCryptoAPIgenerateKeytest_failures_ECDHexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -325,96 +325,96 @@
</span><span class="cx"> PASS Bad algorithm: generateKey({name: EC, namedCurve: P521}, true, [decrypt, sign, deriveBits, decrypt, sign, deriveBits])
</span><span class="cx"> PASS Bad algorithm: generateKey({name: EC, namedCurve: P521}, RED, [decrypt, sign, deriveBits, decrypt, sign, deriveBits])
</span><span class="cx"> PASS Bad algorithm: generateKey({name: EC, namedCurve: P521}, 7, [decrypt, sign, deriveBits, decrypt, sign, deriveBits])
</span><del>-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected "SyntaxError" but got "NotSupportedError"
</del><ins>+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, unwrapKey])
+PASS Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey])
</ins><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: P-512}, false, [deriveKey])
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: P-512}, true, [deriveKey])
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: P-512}, false, [deriveBits, deriveKey])
</span><span class="lines">@@ -435,10 +435,10 @@
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: Curve25519}, true, [])
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: Curve25519}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
</span><span class="cx"> PASS Bad algorithm property: generateKey({name: ECDH, namedCurve: Curve25519}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
</span><del>-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-256}, false, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-256}, true, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-384}, false, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-384}, true, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
</del><ins>+PASS Empty usages: generateKey({name: ECDH, namedCurve: P-256}, false, [])
+PASS Empty usages: generateKey({name: ECDH, namedCurve: P-256}, true, [])
+PASS Empty usages: generateKey({name: ECDH, namedCurve: P-384}, false, [])
+PASS Empty usages: generateKey({name: ECDH, namedCurve: P-384}, true, [])
</ins><span class="cx"> FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-521}, false, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
</span><span class="cx"> FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-521}, true, []) assert_equals: Empty usages not supported expected "SyntaxError" but got "NotSupportedError"
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsWebCryptoAPIgenerateKeytest_successes_ECDHexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -3,76 +3,76 @@
</span><span class="cx"> Warning! RSA key generation is intrinsically very slow, so the related tests can take up to several minutes to complete, depending on browser!
</span><span class="cx">
</span><span class="cx">
</span><del>-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
-FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The operation is not supported. Reached unreachable code
</del><ins>+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: ecdh, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: ecdh, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveBits, deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveBits, deriveKey])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+PASS Success: generateKey({name: Ecdh, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits])
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveBits, deriveKey]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
+FAIL Success: generateKey({name: Ecdh, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits]) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -342,6 +342,7 @@
</span><span class="cx"> crypto/parameters/AesCbcCfbParams.idl
</span><span class="cx"> crypto/parameters/AesGcmParams.idl
</span><span class="cx"> crypto/parameters/AesKeyGenParams.idl
</span><ins>+ crypto/parameters/EcKeyParams.idl
</ins><span class="cx"> crypto/parameters/HmacKeyParams.idl
</span><span class="cx"> crypto/parameters/RsaHashedImportParams.idl
</span><span class="cx"> crypto/parameters/RsaHashedKeyGenParams.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/ChangeLog        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -1,3 +1,66 @@
</span><ins>+2017-03-06 Jiewen Tan <jiewen_tan@apple.com>
+
+ [WebCrypto] Implement ECDH GenerateKey operation
+ https://bugs.webkit.org/show_bug.cgi?id=169093
+ <rdar://problem/23789585>
+
+ Reviewed by Brent Fulgham.
+
+ This patch implements GenerateKey operation of ECDH according to:
+ https://www.w3.org/TR/WebCryptoAPI/#ecdh-operations.
+ Note: Sad that we are not able to support P-521 at this moment due
+ to lack of necessary support in the underlying crypto library.
+
+ Tests: crypto/subtle/ec-generate-key-malformed-parameters.html
+ crypto/subtle/ecdh-generate-key-extractable.html
+ crypto/subtle/ecdh-generate-key-p256.html
+ crypto/subtle/ecdh-generate-key-p384.html
+ crypto/subtle/ecdh-generate-key-single-usage.html
+ crypto/workers/subtle/ec-generate-key.html
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * PlatformGTK.cmake:
+ * PlatformMac.cmake:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCryptoKeyCustom.cpp:
+ (WebCore::JSCryptoKey::algorithm):
+ * bindings/js/JSSubtleCryptoCustom.cpp:
+ (WebCore::normalizeCryptoAlgorithmParameters):
+ (WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):
+ Add support for ECDH.
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::CloneSerializer::write):
+ Structured clonable will be added later on.
+ * crypto/CommonCryptoUtilities.h:
+ Add SPI for EC.
+ * crypto/CryptoAlgorithmParameters.h:
+ * crypto/CryptoKey.h:
+ * crypto/algorithms/CryptoAlgorithmECDH.cpp: Added.
+ (WebCore::CryptoAlgorithmECDH::create):
+ (WebCore::CryptoAlgorithmECDH::identifier):
+ (WebCore::CryptoAlgorithmECDH::generateKey):
+ * crypto/algorithms/CryptoAlgorithmECDH.h: Added.
+ * crypto/gnutls/CryptoKeyECGnuTLS.cpp: Added.
+ (WebCore::CryptoKeyEC::~CryptoKeyEC):
+ (WebCore::CryptoKeyEC::platformGeneratePair):
+ * crypto/keys/CryptoKeyEC.cpp: Added.
+ (WebCore::CryptoKeyEC::CryptoKeyEC):
+ (WebCore::CryptoKeyEC::generatePair):
+ (WebCore::CryptoKeyEC::buildAlgorithm):
+ (WebCore::CryptoKeyEC::exportData):
+ * crypto/keys/CryptoKeyEC.h: Added.
+ (WebCore::EcKeyAlgorithm::EcKeyAlgorithm):
+ (WebCore::EcKeyAlgorithm::namedCurve):
+ * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
+ (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
+ Add support for ECDH.
+ * crypto/mac/CryptoKeyECMac.cpp: Added.
+ (WebCore::CryptoKeyEC::~CryptoKeyEC):
+ (WebCore::CryptoKeyEC::platformGeneratePair):
+ * crypto/parameters/CryptoAlgorithmEcKeyParams.h: Added.
+ * crypto/parameters/EcKeyParams.idl: Added.
+
</ins><span class="cx"> 2017-03-06 Michael Catanzaro <mcatanzaro@igalia.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, fix unused parameter warning after r213464
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/DerivedSources.make        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -274,6 +274,7 @@
</span><span class="cx"> $(WebCore)/crypto/parameters/AesCbcCfbParams.idl \
</span><span class="cx"> $(WebCore)/crypto/parameters/AesGcmParams.idl \
</span><span class="cx"> $(WebCore)/crypto/parameters/AesKeyGenParams.idl \
</span><ins>+ $(WebCore)/crypto/parameters/EcKeyParams.idl \
</ins><span class="cx"> $(WebCore)/crypto/parameters/HmacKeyParams.idl \
</span><span class="cx"> $(WebCore)/crypto/parameters/RsaHashedImportParams.idl \
</span><span class="cx"> $(WebCore)/crypto/parameters/RsaHashedKeyGenParams.idl \
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformGTK.cmake (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformGTK.cmake        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/PlatformGTK.cmake        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -386,6 +386,7 @@
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmAES_CFB.cpp
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmAES_KW.cpp
</span><ins>+ crypto/algorithms/CryptoAlgorithmECDH.cpp
</ins><span class="cx"> crypto/algorithms/CryptoAlgorithmHMAC.cpp
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
</span><span class="lines">@@ -406,6 +407,7 @@
</span><span class="cx"> crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp
</span><span class="cx"> crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp
</span><span class="cx"> crypto/gnutls/CryptoAlgorithmRegistryGnuTLS.cpp
</span><ins>+ crypto/gnutls/CryptoKeyECGnuTLS.cpp
</ins><span class="cx"> crypto/gnutls/CryptoKeyRSAGnuTLS.cpp
</span><span class="cx"> crypto/gnutls/SerializedCryptoKeyWrapGnuTLS.cpp
</span><span class="cx">
</span><span class="lines">@@ -412,6 +414,7 @@
</span><span class="cx"> crypto/keys/CryptoKeyAES.cpp
</span><span class="cx"> crypto/keys/CryptoKeyDataOctetSequence.cpp
</span><span class="cx"> crypto/keys/CryptoKeyDataRSAComponents.cpp
</span><ins>+ crypto/keys/CryptoKeyEC.cpp
</ins><span class="cx"> crypto/keys/CryptoKeyHMAC.cpp
</span><span class="cx"> crypto/keys/CryptoKeyRSA.cpp
</span><span class="cx"> crypto/keys/CryptoKeySerializationRaw.cpp
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformMac.cmake (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformMac.cmake        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/PlatformMac.cmake        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -182,6 +182,7 @@
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmAES_CFB.cpp
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmAES_KW.cpp
</span><ins>+ crypto/algorithms/CryptoAlgorithmECDH.cpp
</ins><span class="cx"> crypto/algorithms/CryptoAlgorithmHMAC.cpp
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
</span><span class="cx"> crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
</span><span class="lines">@@ -195,6 +196,7 @@
</span><span class="cx"> crypto/keys/CryptoKeyAES.cpp
</span><span class="cx"> crypto/keys/CryptoKeyDataOctetSequence.cpp
</span><span class="cx"> crypto/keys/CryptoKeyDataRSAComponents.cpp
</span><ins>+ crypto/keys/CryptoKeyEC.cpp
</ins><span class="cx"> crypto/keys/CryptoKeyHMAC.cpp
</span><span class="cx"> crypto/keys/CryptoKeyRSA.cpp
</span><span class="cx"> crypto/keys/CryptoKeySerializationRaw.cpp
</span><span class="lines">@@ -208,6 +210,7 @@
</span><span class="cx"> crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp
</span><span class="cx"> crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp
</span><span class="cx"> crypto/mac/CryptoAlgorithmRegistryMac.cpp
</span><ins>+ crypto/mac/CryptoKeyECDHMac.cpp
</ins><span class="cx"> crypto/mac/CryptoKeyMac.cpp
</span><span class="cx"> crypto/mac/CryptoKeyRSAMac.cpp
</span><span class="cx"> crypto/mac/SerializedCryptoKeyWrapMac.mm
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -2360,6 +2360,14 @@
</span><span class="cx">                 573489391DAC6B6E00DC0667 /* CryptoAlgorithmParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 573489381DAC6B6D00DC0667 /* CryptoAlgorithmParameters.h */; };
</span><span class="cx">                 5739E12F1DAC7F7800E14383 /* JSCryptoAlgorithmParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 5739E12E1DAC7F7800E14383 /* JSCryptoAlgorithmParameters.h */; };
</span><span class="cx">                 5739E1311DAC7FD100E14383 /* JSCryptoAlgorithmParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5739E1301DAC7FD100E14383 /* JSCryptoAlgorithmParameters.cpp */; };
</span><ins>+                5750A9741E68D00000705C4A /* CryptoKeyEC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5750A9721E68D00000705C4A /* CryptoKeyEC.cpp */; };
+                5750A9751E68D00000705C4A /* CryptoKeyEC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5750A9731E68D00000705C4A /* CryptoKeyEC.h */; };
+                5750A97B1E69161600705C4A /* CryptoKeyECMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5750A97A1E69161600705C4A /* CryptoKeyECMac.cpp */; };
+                5750A97E1E6A13EF00705C4A /* CryptoAlgorithmEcKeyParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5750A97D1E6A13EF00705C4A /* CryptoAlgorithmEcKeyParams.h */; };
+                5750A9811E6A150800705C4A /* JSEcKeyParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5750A97F1E6A150800705C4A /* JSEcKeyParams.cpp */; };
+                5750A9821E6A150800705C4A /* JSEcKeyParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5750A9801E6A150800705C4A /* JSEcKeyParams.h */; };
+                5750A9861E6A216800705C4A /* CryptoAlgorithmECDH.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5750A9841E6A216800705C4A /* CryptoAlgorithmECDH.cpp */; };
+                5750A9871E6A216800705C4A /* CryptoAlgorithmECDH.h in Headers */ = {isa = PBXBuildFile; fileRef = 5750A9851E6A216800705C4A /* CryptoAlgorithmECDH.h */; };
</ins><span class="cx">                 5768E4341DB7524500D0A4F7 /* JSRsaHashedKeyGenParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5768E4331DB7524500D0A4F7 /* JSRsaHashedKeyGenParams.h */; };
</span><span class="cx">                 5768E4361DB7527400D0A4F7 /* JSRsaHashedKeyGenParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5768E4351DB7527300D0A4F7 /* JSRsaHashedKeyGenParams.cpp */; };
</span><span class="cx">                 577483121DADC55D00716EF9 /* CryptoAlgorithmAesKeyGenParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 577483111DADC55D00716EF9 /* CryptoAlgorithmAesKeyGenParams.h */; };
</span><span class="lines">@@ -9768,6 +9776,15 @@
</span><span class="cx">                 5739E1301DAC7FD100E14383 /* JSCryptoAlgorithmParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoAlgorithmParameters.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 574AC7531DAC367D00E9744C /* CryptoAlgorithmParameters.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CryptoAlgorithmParameters.idl; sourceTree = "<group>"; };
</span><span class="cx">                 574D42791D594FF6002CF50E /* GlobalCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GlobalCrypto.idl; sourceTree = "<group>"; };
</span><ins>+                5750A9721E68D00000705C4A /* CryptoKeyEC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoKeyEC.cpp; sourceTree = "<group>"; };
+                5750A9731E68D00000705C4A /* CryptoKeyEC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoKeyEC.h; sourceTree = "<group>"; };
+                5750A97A1E69161600705C4A /* CryptoKeyECMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoKeyECMac.cpp; sourceTree = "<group>"; };
+                5750A97C1E6A12B400705C4A /* EcKeyParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = EcKeyParams.idl; sourceTree = "<group>"; };
+                5750A97D1E6A13EF00705C4A /* CryptoAlgorithmEcKeyParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmEcKeyParams.h; sourceTree = "<group>"; };
+                5750A97F1E6A150800705C4A /* JSEcKeyParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEcKeyParams.cpp; sourceTree = "<group>"; };
+                5750A9801E6A150800705C4A /* JSEcKeyParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEcKeyParams.h; sourceTree = "<group>"; };
+                5750A9841E6A216800705C4A /* CryptoAlgorithmECDH.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmECDH.cpp; sourceTree = "<group>"; };
+                5750A9851E6A216800705C4A /* CryptoAlgorithmECDH.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmECDH.h; sourceTree = "<group>"; };
</ins><span class="cx">                 5768E4331DB7524500D0A4F7 /* JSRsaHashedKeyGenParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRsaHashedKeyGenParams.h; sourceTree = "<group>"; };
</span><span class="cx">                 5768E4351DB7527300D0A4F7 /* JSRsaHashedKeyGenParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRsaHashedKeyGenParams.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 577483101DADC49900716EF9 /* AesKeyGenParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AesKeyGenParams.idl; sourceTree = "<group>"; };
</span><span class="lines">@@ -23553,6 +23570,7 @@
</span><span class="cx">                                 E1FE136E183FECF000892F13 /* CryptoAlgorithmRSA_OAEPMac.cpp */,
</span><span class="cx">                                 E1233F0E185A4130008DFAF5 /* CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp */,
</span><span class="cx">                                 E1C266D618317AB4003F8B33 /* CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp */,
</span><ins>+                                5750A97A1E69161600705C4A /* CryptoKeyECMac.cpp */,
</ins><span class="cx">                                 E19AC3F8182566F700349426 /* CryptoKeyMac.cpp */,
</span><span class="cx">                                 E164FAA418315E1A00DB4E61 /* CryptoKeyRSAMac.cpp */,
</span><span class="cx">                                 E18DF33618AAF14D00773E59 /* SerializedCryptoKeyWrapMac.mm */,
</span><span class="lines">@@ -23571,6 +23589,8 @@
</span><span class="cx">                                 57B5F7F71E5BE84000F34F90 /* CryptoAlgorithmAES_GCM.h */,
</span><span class="cx">                                 E1FE1378184D21BB00892F13 /* CryptoAlgorithmAES_KW.cpp */,
</span><span class="cx">                                 E1FE1379184D21BB00892F13 /* CryptoAlgorithmAES_KW.h */,
</span><ins>+                                5750A9841E6A216800705C4A /* CryptoAlgorithmECDH.cpp */,
+                                5750A9851E6A216800705C4A /* CryptoAlgorithmECDH.h */,
</ins><span class="cx">                                 E125F82F1822F11B00D84CD9 /* CryptoAlgorithmHMAC.cpp */,
</span><span class="cx">                                 E125F8301822F11B00D84CD9 /* CryptoAlgorithmHMAC.h */,
</span><span class="cx">                                 E1FE1368183FE1AB00892F13 /* CryptoAlgorithmRSA_OAEP.cpp */,
</span><span class="lines">@@ -23602,6 +23622,8 @@
</span><span class="cx">                                 E125F862182C303A00D84CD9 /* CryptoKeyDataOctetSequence.h */,
</span><span class="cx">                                 E1C266DC18319F31003F8B33 /* CryptoKeyDataRSAComponents.cpp */,
</span><span class="cx">                                 E1C266DD18319F31003F8B33 /* CryptoKeyDataRSAComponents.h */,
</span><ins>+                                5750A9721E68D00000705C4A /* CryptoKeyEC.cpp */,
+                                5750A9731E68D00000705C4A /* CryptoKeyEC.h */,
</ins><span class="cx">                                 E125F8331822F18A00D84CD9 /* CryptoKeyHMAC.cpp */,
</span><span class="cx">                                 E125F8341822F18A00D84CD9 /* CryptoKeyHMAC.h */,
</span><span class="cx">                                 57E2336A1DCC262400F28D01 /* CryptoKeyRSA.cpp */,
</span><span class="lines">@@ -23623,6 +23645,7 @@
</span><span class="cx">                                 57B5F8081E5D1A9800F34F90 /* CryptoAlgorithmAesGcmParams.h */,
</span><span class="cx">                                 577483111DADC55D00716EF9 /* CryptoAlgorithmAesKeyGenParams.h */,
</span><span class="cx">                                 E19AC3F61824E5D100349426 /* CryptoAlgorithmAesKeyGenParamsDeprecated.h */,
</span><ins>+                                5750A97D1E6A13EF00705C4A /* CryptoAlgorithmEcKeyParams.h */,
</ins><span class="cx">                                 577483181DB4491F00716EF9 /* CryptoAlgorithmHmacKeyParams.h */,
</span><span class="cx">                                 E19DA29B18189ADD00088BC8 /* CryptoAlgorithmHmacKeyParamsDeprecated.h */,
</span><span class="cx">                                 E1C6571E1816E50300256CDD /* CryptoAlgorithmHmacParamsDeprecated.h */,
</span><span class="lines">@@ -23634,6 +23657,7 @@
</span><span class="cx">                                 5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */,
</span><span class="cx">                                 E1FE1376184D1E3300892F13 /* CryptoAlgorithmRsaOaepParamsDeprecated.h */,
</span><span class="cx">                                 E1BD331B182D8EE900C05D9F /* CryptoAlgorithmRsaSsaParamsDeprecated.h */,
</span><ins>+                                5750A97C1E6A12B400705C4A /* EcKeyParams.idl */,
</ins><span class="cx">                                 577483171DB1FE8900716EF9 /* HmacKeyParams.idl */,
</span><span class="cx">                                 57E2336C1DCD437000F28D01 /* RsaHashedImportParams.idl */,
</span><span class="cx">                                 57F827391DB72C22009D2BF4 /* RsaHashedKeyGenParams.idl */,
</span><span class="lines">@@ -23808,6 +23832,8 @@
</span><span class="cx">                                 E1F80B8C183172B5007885C3 /* JSCryptoKeyPair.h */,
</span><span class="cx">                                 57D0018E1DD5415300ED19D9 /* JSCryptoKeyUsage.cpp */,
</span><span class="cx">                                 57D0018C1DD5413200ED19D9 /* JSCryptoKeyUsage.h */,
</span><ins>+                                5750A97F1E6A150800705C4A /* JSEcKeyParams.cpp */,
+                                5750A9801E6A150800705C4A /* JSEcKeyParams.h */,
</ins><span class="cx">                                 57E233681DCAB24300F28D01 /* JSHmacKeyParams.cpp */,
</span><span class="cx">                                 57E233661DCAB21C00F28D01 /* JSHmacKeyParams.h */,
</span><span class="cx">                                 57E2335E1DC7D67B00F28D01 /* JSJsonWebKey.cpp */,
</span><span class="lines">@@ -25514,6 +25540,7 @@
</span><span class="cx">                                 FD31607E12B026F700C1A359 /* AudioChannel.h in Headers */,
</span><span class="cx">                                 FD31600512B0267600C1A359 /* AudioContext.h in Headers */,
</span><span class="cx">                                 FD31607F12B026F700C1A359 /* AudioDestination.h in Headers */,
</span><ins>+                                5750A9871E6A216800705C4A /* CryptoAlgorithmECDH.h in Headers */,
</ins><span class="cx">                                 070F549E17F2402700169E04 /* AudioDestinationConsumer.h in Headers */,
</span><span class="cx">                                 FD3160BD12B0272A00C1A359 /* AudioDestinationMac.h in Headers */,
</span><span class="cx">                                 FD31600812B0267600C1A359 /* AudioDestinationNode.h in Headers */,
</span><span class="lines">@@ -26832,6 +26859,7 @@
</span><span class="cx">                                 BC6932740D7E293900AE44D1 /* JSDOMWindowBase.h in Headers */,
</span><span class="cx">                                 652FBBBC0DE27CB60001D386 /* JSDOMWindowCustom.h in Headers */,
</span><span class="cx">                                 460CBF361D4BCD0E0092E88E /* JSDOMWindowProperties.h in Headers */,
</span><ins>+                                5750A97E1E6A13EF00705C4A /* CryptoAlgorithmEcKeyParams.h in Headers */,
</ins><span class="cx">                                 BCBFB53D0DCD29CF0019B3E5 /* JSDOMWindowShell.h in Headers */,
</span><span class="cx">                                 65E0E9441133C89F00B4CB10 /* JSDOMWrapper.h in Headers */,
</span><span class="cx">                                 7C45C9D31E3FCBD700AAB558 /* JSDOMWrapperCache.h in Headers */,
</span><span class="lines">@@ -28069,6 +28097,7 @@
</span><span class="cx">                                 99CC0B5C18BE984A006CEBCC /* ReplaySessionSegment.h in Headers */,
</span><span class="cx">                                 4998AEC613F9D0EA0090B1AA /* RequestAnimationFrameCallback.h in Headers */,
</span><span class="cx">                                 F55B3DD01251F12D003EF269 /* ResetInputType.h in Headers */,
</span><ins>+                                5750A9821E6A150800705C4A /* JSEcKeyParams.h in Headers */,
</ins><span class="cx">                                 7EE6846A12D26E3800E79415 /* ResourceError.h in Headers */,
</span><span class="cx">                                 934F713C0D5A6F1900018D69 /* ResourceErrorBase.h in Headers */,
</span><span class="cx">                                 514C76790CE923A1007EF3CD /* ResourceHandle.h in Headers */,
</span><span class="lines">@@ -28389,6 +28418,7 @@
</span><span class="cx">                                 BC2272BD0E82EAAE00E7F975 /* StyleRareNonInheritedData.h in Headers */,
</span><span class="cx">                                 BC2272870E82E70700E7F975 /* StyleReflection.h in Headers */,
</span><span class="cx">                                 E461802D1C8DD2900026C02C /* StyleRelations.h in Headers */,
</span><ins>+                                5750A9751E68D00000705C4A /* CryptoKeyEC.h in Headers */,
</ins><span class="cx">                                 E4D58EB517B4DBDC00CBDCA8 /* StyleResolveForDocument.h in Headers */,
</span><span class="cx">                                 E139866415478474001E3F65 /* StyleResolver.h in Headers */,
</span><span class="cx">                                 E4BBED4D14FCDBA1003F0B98 /* StyleRule.h in Headers */,
</span><span class="lines">@@ -30824,6 +30854,7 @@
</span><span class="cx">                                 511EF2CB17F0FD3500E4FA16 /* JSIDBVersionChangeEvent.cpp in Sources */,
</span><span class="cx">                                 A77979280D6B9E64003851B9 /* JSImageData.cpp in Sources */,
</span><span class="cx">                                 A7D0318E0E93540300E24ACD /* JSImageDataCustom.cpp in Sources */,
</span><ins>+                                5750A9811E6A150800705C4A /* JSEcKeyParams.cpp in Sources */,
</ins><span class="cx">                                 A86629D409DA2B48009633A6 /* JSInputEvent.cpp in Sources */,
</span><span class="cx">                                 7A0E771E10C00DB100A0276E /* JSInspectorFrontendHost.cpp in Sources */,
</span><span class="cx">                                 7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */,
</span><span class="lines">@@ -31337,6 +31368,7 @@
</span><span class="cx">                                 FABE72FD1059C21100D999DD /* MathMLElementFactory.cpp in Sources */,
</span><span class="cx">                                 0BCF83F61059C1EB00D999DD /* MathMLFractionElement.cpp in Sources */,
</span><span class="cx">                                 FABE72F81059C1EB00D999DD /* MathMLMathElement.cpp in Sources */,
</span><ins>+                                5750A9741E68D00000705C4A /* CryptoKeyEC.cpp in Sources */,
</ins><span class="cx">                                 05D913CEEAB2A60534218ACF /* MathMLMencloseElement.cpp in Sources */,
</span><span class="cx">                                 FABE72FE1059C21100D999DD /* MathMLNames.cpp in Sources */,
</span><span class="cx">                                 16EA24CEEAB2A60534218ACF /* MathMLOperatorDictionary.cpp in Sources */,
</span><span class="lines">@@ -32335,6 +32367,7 @@
</span><span class="cx">                                 BCE65D320EAD1211007E4533 /* Theme.cpp in Sources */,
</span><span class="cx">                                 310D71951B335C9D009C7B73 /* ThemeCocoa.mm in Sources */,
</span><span class="cx">                                 44C991A00F3D210E00586670 /* ThemeIOS.mm in Sources */,
</span><ins>+                                5750A9861E6A216800705C4A /* CryptoAlgorithmECDH.cpp in Sources */,
</ins><span class="cx">                                 BCE659E90EA92FFA007E4533 /* ThemeMac.mm in Sources */,
</span><span class="cx">                                 976D6C94122B8A3D001FD1F7 /* ThreadableBlobRegistry.cpp in Sources */,
</span><span class="cx">                                 0B90561E0F257E930095FF6A /* ThreadableLoader.cpp in Sources */,
</span><span class="lines">@@ -32446,6 +32479,7 @@
</span><span class="cx">                                 FD7F299313D4C0CB00AD9535 /* WaveShaperNode.cpp in Sources */,
</span><span class="cx">                                 FD7F299613D4C0CB00AD9535 /* WaveShaperProcessor.cpp in Sources */,
</span><span class="cx">                                 29A8124A0FBB9CA900510293 /* WebAccessibilityObjectWrapperBase.mm in Sources */,
</span><ins>+                                5750A97B1E69161600705C4A /* CryptoKeyECMac.cpp in Sources */,
</ins><span class="cx">                                 AAA728F816D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm in Sources */,
</span><span class="cx">                                 AA478A8016CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.mm in Sources */,
</span><span class="cx">                                 2D3EF4491917915C00034184 /* WebActionDisablingCALayerDelegate.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCryptoKeyCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCryptoKeyCustom.cpp (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCryptoKeyCustom.cpp        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/bindings/js/JSCryptoKeyCustom.cpp        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx">
</span><span class="cx"> #include "CryptoKeyAES.h"
</span><ins>+#include "CryptoKeyEC.h"
</ins><span class="cx"> #include "CryptoKeyHMAC.h"
</span><span class="cx"> #include "CryptoKeyRSA.h"
</span><span class="cx"> #include "JSCryptoAlgorithmBuilder.h"
</span><span class="lines">@@ -54,6 +55,12 @@
</span><span class="cx"> builder.add("length", aesAlgorithm.length());
</span><span class="cx"> break;
</span><span class="cx"> }
</span><ins>+ case KeyAlgorithmClass::EC: {
+ auto& ecAlgorithm = downcast<EcKeyAlgorithm>(*algorithm);
+ builder.add("name", ecAlgorithm.name());
+ builder.add("namedCurve", ecAlgorithm.namedCurve());
+ break;
+ }
</ins><span class="cx"> case KeyAlgorithmClass::HMAC: {
</span><span class="cx"> auto& hmacAlgorithm = downcast<HmacKeyAlgorithm>(*algorithm);
</span><span class="cx"> builder.add("name", hmacAlgorithm.name());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #include "JSCryptoKeyPair.h"
</span><span class="cx"> #include "JSDOMPromise.h"
</span><span class="cx"> #include "JSDOMWrapper.h"
</span><ins>+#include "JSEcKeyParams.h"
</ins><span class="cx"> #include "JSHmacKeyParams.h"
</span><span class="cx"> #include "JSJsonWebKey.h"
</span><span class="cx"> #include "JSRsaHashedImportParams.h"
</span><span class="lines">@@ -199,6 +200,13 @@
</span><span class="cx"> result = std::make_unique<CryptoAlgorithmHmacKeyParams>(params);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><ins>+ case CryptoAlgorithmIdentifier::ECDSA:
+ case CryptoAlgorithmIdentifier::ECDH: {
+ auto params = convertDictionary<CryptoAlgorithmEcKeyParams>(state, value);
+ RETURN_IF_EXCEPTION(scope, nullptr);
+ result = std::make_unique<CryptoAlgorithmEcKeyParams>(params);
+ break;
+ }
</ins><span class="cx"> default:
</span><span class="cx"> throwNotSupportedError(state, scope);
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -724,9 +732,9 @@
</span><span class="cx"> rejectWithException(WTFMove(capturedPromise), ec);
</span><span class="cx"> };
</span><span class="cx">
</span><del>- // The 11 December 2014 version of the specification suggests we should perform the following task asynchronously
</del><ins>+ // The 26 January 2017 version of the specification suggests we should perform the following task asynchronously
</ins><span class="cx"> // regardless what kind of keys it produces: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-generateKey
</span><del>- // That's simply not efficient for AES and HMAC keys. Therefore, we perform it as an async task conditionally.
</del><ins>+ // That's simply not efficient for AES, HMAC and EC keys. Therefore, we perform it as an async task only for RSA keys.
</ins><span class="cx"> algorithm->generateKey(*params, extractable, keyUsages, WTFMove(callback), WTFMove(exceptionCallback), *scriptExecutionContextFromExecState(&state));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsSerializedScriptValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -1208,6 +1208,10 @@
</span><span class="cx"> write(key->algorithmIdentifier());
</span><span class="cx"> write(downcast<CryptoKeyAES>(*key).key());
</span><span class="cx"> break;
</span><ins>+ case CryptoKeyClass::EC:
+ // A dummy implementation for now.
+ // FIXME: https://bugs.webkit.org/show_bug.cgi?id=169232
+ break;
</ins><span class="cx"> case CryptoKeyClass::RSA:
</span><span class="cx"> write(CryptoKeyClassSubtag::RSA);
</span><span class="cx"> write(key->algorithmIdentifier());
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCommonCryptoUtilitiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CommonCryptoUtilities.h (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CommonCryptoUtilities.h        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/crypto/CommonCryptoUtilities.h        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx">
</span><span class="cx"> #if USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> #include <CommonCrypto/CommonCryptorSPI.h>
</span><ins>+#include <CommonCrypto/CommonECCryptor.h>
</ins><span class="cx"> #include <CommonCrypto/CommonRSACryptor.h>
</span><span class="cx"> #include <CommonCrypto/CommonRandomSPI.h>
</span><span class="cx"> #endif
</span><span class="lines">@@ -85,6 +86,10 @@
</span><span class="cx"> extern "C" CCCryptorStatus CCRSACryptorImport(const void *keyPackage, size_t keyPackageLen, CCRSACryptorRef *key);
</span><span class="cx"> extern "C" CCCryptorStatus CCRSACryptorExport(CCRSACryptorRef key, void *out, size_t *outLen);
</span><span class="cx">
</span><ins>+typedef struct _CCECCryptor *CCECCryptorRef;
+extern "C" CCCryptorStatus CCECCryptorGeneratePair(size_t keysize, CCECCryptorRef *publicKey, CCECCryptorRef *privateKey);
+extern "C" void CCECCryptorRelease(CCECCryptorRef key);
+
</ins><span class="cx"> #if !USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> 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, void* tag, size_t* tagLength);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> AesCbcCfbParams,
</span><span class="cx"> AesGcmParams,
</span><span class="cx"> AesKeyGenParams,
</span><ins>+ EcKeyParams,
</ins><span class="cx"> HmacKeyParams,
</span><span class="cx"> RsaHashedKeyGenParams,
</span><span class="cx"> RsaHashedImportParams,
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoKeyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoKey.h (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoKey.h        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/crypto/CryptoKey.h        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx">
</span><span class="cx"> enum class CryptoKeyClass {
</span><span class="cx"> AES,
</span><ins>+ EC,
</ins><span class="cx"> HMAC,
</span><span class="cx"> RSA
</span><span class="cx"> };
</span><span class="lines">@@ -49,6 +50,7 @@
</span><span class="cx">
</span><span class="cx"> enum class KeyAlgorithmClass {
</span><span class="cx"> AES,
</span><ins>+ EC,
</ins><span class="cx"> HMAC,
</span><span class="cx"> HRSA,
</span><span class="cx"> RSA,
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmECDHcppfromrev213486trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp (from rev 213486, trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h) (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp         (rev 0)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CryptoAlgorithmECDH.h"
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include "CryptoAlgorithmEcKeyParams.h"
+#include "CryptoKeyEC.h"
+#include "ExceptionCode.h"
+
+namespace WebCore {
+
+Ref<CryptoAlgorithm> CryptoAlgorithmECDH::create()
+{
+ return adoptRef(*new CryptoAlgorithmECDH);
+}
+
+CryptoAlgorithmIdentifier CryptoAlgorithmECDH::identifier() const
+{
+ return s_identifier;
+}
+
+void CryptoAlgorithmECDH::generateKey(const CryptoAlgorithmParameters& parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&& callback, ExceptionCallback&& exceptionCallback, ScriptExecutionContext&)
+{
+ const auto& ecParameters = downcast<CryptoAlgorithmEcKeyParams>(parameters);
+
+ if (usages & (CryptoKeyUsageEncrypt | CryptoKeyUsageDecrypt | CryptoKeyUsageSign | CryptoKeyUsageVerify | CryptoKeyUsageWrapKey | CryptoKeyUsageUnwrapKey)) {
+ exceptionCallback(SYNTAX_ERR);
+ return;
+ }
+
+ auto result = CryptoKeyEC::generatePair(CryptoAlgorithmIdentifier::ECDH, ecParameters.namedCurve, extractable, usages);
+ if (result.hasException()) {
+ exceptionCallback(result.releaseException().code());
+ return;
+ }
+
+ auto pair = result.releaseReturnValue();
+ pair.publicKey->setUsagesBitmap(0);
+ pair.privateKey->setUsagesBitmap(pair.privateKey->usagesBitmap() & (CryptoKeyUsageDeriveKey | CryptoKeyUsageDeriveBits));
+ callback(WTFMove(pair));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmECDHhfromrev213486trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.h (from rev 213486, trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h) (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.h         (rev 0)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.h        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "CryptoAlgorithm.h"
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+namespace WebCore {
+
+class CryptoAlgorithmECDH final : public CryptoAlgorithm {
+public:
+ static constexpr const char* s_name = "ECDH";
+ static constexpr CryptoAlgorithmIdentifier s_identifier = CryptoAlgorithmIdentifier::ECDH;
+ static Ref<CryptoAlgorithm> create();
+
+private:
+ CryptoAlgorithmECDH() = default;
+ CryptoAlgorithmIdentifier identifier() const final;
+
+ void generateKey(const CryptoAlgorithmParameters&, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&&, ScriptExecutionContext&) final;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptognutlsCryptoKeyECGnuTLScppfromrev213486trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/gnutls/CryptoKeyECGnuTLS.cpp (from rev 213486, trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h) (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/gnutls/CryptoKeyECGnuTLS.cpp         (rev 0)
+++ trunk/Source/WebCore/crypto/gnutls/CryptoKeyECGnuTLS.cpp        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CryptoKeyEC.h"
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include "CryptoKeyPair.h"
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+struct _PlatformECKeyGnuTLS {
+};
+
+CryptoKeyEC::~CryptoKeyEC()
+{
+ notImplemented();
+}
+
+std::optional<CryptoKeyPair> CryptoKeyEC::platformGeneratePair(CryptoAlgorithmIdentifier, NamedCurve, bool, CryptoKeyUsageBitmap)
+{
+ notImplemented();
+
+ return std::nullopt;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptokeysCryptoKeyECcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/crypto/keys/CryptoKeyEC.cpp (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/keys/CryptoKeyEC.cpp         (rev 0)
+++ trunk/Source/WebCore/crypto/keys/CryptoKeyEC.cpp        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,86 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CryptoKeyEC.h"
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include "CryptoAlgorithmRegistry.h"
+#include "CryptoKeyData.h"
+#include "ExceptionCode.h"
+
+namespace WebCore {
+
+static const char* const P256 = "P-256";
+static const char* const P384 = "P-384";
+
+CryptoKeyEC::CryptoKeyEC(CryptoAlgorithmIdentifier identifier, NamedCurve curve, CryptoKeyType type, PlatformECKey platformKey, bool extractable, CryptoKeyUsageBitmap usages)
+ : CryptoKey(identifier, type, extractable, usages)
+ , m_platformKey(platformKey)
+ , m_curve(curve)
+{
+}
+
+ExceptionOr<CryptoKeyPair> CryptoKeyEC::generatePair(CryptoAlgorithmIdentifier identifier, const String& namedCurve, bool extractable, CryptoKeyUsageBitmap usages)
+{
+ NamedCurve curve;
+ if (namedCurve == P256)
+ curve = NamedCurve::P256;
+ else if (namedCurve == P384)
+ curve = NamedCurve::P384;
+ else
+ return Exception { NOT_SUPPORTED_ERR };
+
+ auto result = platformGeneratePair(identifier, curve, extractable, usages);
+ if (!result)
+ return Exception { OperationError };
+
+ return WTFMove(*result);
+}
+
+std::unique_ptr<KeyAlgorithm> CryptoKeyEC::buildAlgorithm() const
+{
+ String name = CryptoAlgorithmRegistry::singleton().name(algorithmIdentifier());
+ switch (m_curve) {
+ case NamedCurve::P256:
+ return std::make_unique<EcKeyAlgorithm>(name, String(P256));
+ case NamedCurve::P384:
+ return std::make_unique<EcKeyAlgorithm>(name, String(P384));
+ }
+
+ ASSERT_NOT_REACHED();
+ return nullptr;
+}
+
+std::unique_ptr<CryptoKeyData> CryptoKeyEC::exportData() const
+{
+ // A dummy implementation for now.
+ return std::make_unique<CryptoKeyData>(CryptoKeyData::Format::OctetSequence);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptokeysCryptoKeyECh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/crypto/keys/CryptoKeyEC.h (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/keys/CryptoKeyEC.h         (rev 0)
+++ trunk/Source/WebCore/crypto/keys/CryptoKeyEC.h        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,99 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "CryptoKey.h"
+#include "CryptoKeyPair.h"
+#include "ExceptionOr.h"
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#if OS(DARWIN) && !PLATFORM(GTK)
+typedef struct _CCECCryptor *CCECCryptorRef;
+typedef CCECCryptorRef PlatformECKey;
+#endif
+
+#if PLATFORM(GTK)
+typedef struct _PlatformECKeyGnuTLS PlatformECKeyGnuTLS;
+typedef PlatformECKeyGnuTLS *PlatformECKey;
+#endif
+
+
+namespace WebCore {
+
+class EcKeyAlgorithm : public KeyAlgorithm {
+public:
+ EcKeyAlgorithm(const String& name, const String& curve)
+ : KeyAlgorithm(name)
+ , m_curve(curve)
+ {
+ }
+
+ KeyAlgorithmClass keyAlgorithmClass() const override { return KeyAlgorithmClass::EC; }
+
+ const String& namedCurve() const { return m_curve; }
+
+private:
+ String m_curve;
+};
+
+class CryptoKeyEC final : public CryptoKey {
+public:
+ // FIXME: https://bugs.webkit.org/show_bug.cgi?id=169231
+ enum class NamedCurve {
+ P256,
+ P384,
+ };
+
+ static Ref<CryptoKeyEC> create(CryptoAlgorithmIdentifier identifier, NamedCurve curve, CryptoKeyType type, PlatformECKey platformKey, bool extractable, CryptoKeyUsageBitmap usages)
+ {
+ return adoptRef(*new CryptoKeyEC(identifier, curve, type, platformKey, extractable, usages));
+ }
+ virtual ~CryptoKeyEC();
+
+ static ExceptionOr<CryptoKeyPair> generatePair(CryptoAlgorithmIdentifier, const String&, bool extractable, CryptoKeyUsageBitmap);
+
+private:
+ CryptoKeyEC(CryptoAlgorithmIdentifier, NamedCurve, CryptoKeyType, PlatformECKey, bool extractable, CryptoKeyUsageBitmap);
+
+ CryptoKeyClass keyClass() const final { return CryptoKeyClass::EC; }
+
+ std::unique_ptr<KeyAlgorithm> buildAlgorithm() const final;
+ std::unique_ptr<CryptoKeyData> exportData() const final;
+
+ static std::optional<CryptoKeyPair> platformGeneratePair(CryptoAlgorithmIdentifier, NamedCurve, bool extractable, CryptoKeyUsageBitmap);
+
+ PlatformECKey m_platformKey;
+ NamedCurve m_curve;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CRYPTO_KEY(CryptoKeyEC, CryptoKeyClass::EC)
+
+SPECIALIZE_TYPE_TRAITS_KEY_ALGORITHM(EcKeyAlgorithm, KeyAlgorithmClass::EC)
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptomacCryptoAlgorithmRegistryMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp (213488 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp        2017-03-07 02:54:09 UTC (rev 213488)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "CryptoAlgorithmAES_CFB.h"
</span><span class="cx"> #include "CryptoAlgorithmAES_GCM.h"
</span><span class="cx"> #include "CryptoAlgorithmAES_KW.h"
</span><ins>+#include "CryptoAlgorithmECDH.h"
</ins><span class="cx"> #include "CryptoAlgorithmHMAC.h"
</span><span class="cx"> #include "CryptoAlgorithmRSAES_PKCS1_v1_5.h"
</span><span class="cx"> #include "CryptoAlgorithmRSASSA_PKCS1_v1_5.h"
</span><span class="lines">@@ -50,6 +51,7 @@
</span><span class="cx"> registerAlgorithm<CryptoAlgorithmAES_CFB>();
</span><span class="cx"> registerAlgorithm<CryptoAlgorithmAES_GCM>();
</span><span class="cx"> registerAlgorithm<CryptoAlgorithmAES_KW>();
</span><ins>+ registerAlgorithm<CryptoAlgorithmECDH>();
</ins><span class="cx"> registerAlgorithm<CryptoAlgorithmHMAC>();
</span><span class="cx"> registerAlgorithm<CryptoAlgorithmRSAES_PKCS1_v1_5>();
</span><span class="cx"> registerAlgorithm<CryptoAlgorithmRSASSA_PKCS1_v1_5>();
</span></span></pre></div>
<a id="trunkSourceWebCorecryptomacCryptoKeyECMaccppfromrev213486trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/mac/CryptoKeyECMac.cpp (from rev 213486, trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h) (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/CryptoKeyECMac.cpp         (rev 0)
+++ trunk/Source/WebCore/crypto/mac/CryptoKeyECMac.cpp        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CryptoKeyEC.h"
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include "CommonCryptoUtilities.h"
+
+namespace WebCore {
+
+CryptoKeyEC::~CryptoKeyEC()
+{
+ CCECCryptorRelease(m_platformKey);
+}
+
+std::optional<CryptoKeyPair> CryptoKeyEC::platformGeneratePair(CryptoAlgorithmIdentifier identifier, NamedCurve curve, bool extractable, CryptoKeyUsageBitmap usages)
+{
+ size_t size;
+ switch (curve) {
+ case NamedCurve::P256:
+ size = 256;
+ break;
+ case NamedCurve::P384:
+ size = 384;
+ break;
+ }
+
+ CCECCryptorRef ccPublicKey;
+ CCECCryptorRef ccPrivateKey;
+ CCCryptorStatus status = CCECCryptorGeneratePair(size, &ccPublicKey, &ccPrivateKey);
+ if (status)
+ return std::nullopt;
+
+ auto publicKey = CryptoKeyEC::create(identifier, curve, CryptoKeyType::Public, ccPublicKey, true, usages);
+ auto privateKey = CryptoKeyEC::create(identifier, curve, CryptoKeyType::Private, ccPrivateKey, extractable, usages);
+ return CryptoKeyPair { WTFMove(publicKey), WTFMove(privateKey) };
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersCryptoAlgorithmEcKeyParamshfromrev213486trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmEcKeyParams.h (from rev 213486, trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h) (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmEcKeyParams.h         (rev 0)
+++ trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmEcKeyParams.h        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "CryptoAlgorithmParameters.h"
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+namespace WebCore {
+
+class CryptoAlgorithmEcKeyParams final : public CryptoAlgorithmParameters {
+public:
+ String namedCurve;
+
+ Class parametersClass() const final { return Class::EcKeyParams; }
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CRYPTO_ALGORITHM_PARAMETERS(EcKeyParams)
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersEcKeyParamsidlfromrev213486trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/parameters/EcKeyParams.idl (from rev 213486, trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h) (0 => 213489)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/EcKeyParams.idl         (rev 0)
+++ trunk/Source/WebCore/crypto/parameters/EcKeyParams.idl        2017-03-07 02:56:58 UTC (rev 213489)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// This is a unified dictionary for EcKeyImportParams and EcKeyGenParams.
+// https://www.w3.org/TR/WebCryptoAPI/#EcKeyImportParams-dictionary, and
+// https://www.w3.org/TR/WebCryptoAPI/#EcKeyGenParams-dictionary
+[
+ Conditional=SUBTLE_CRYPTO,
+ ImplementedAs=CryptoAlgorithmEcKeyParams
+] dictionary EcKeyParams : CryptoAlgorithmParameters {
+ required DOMString namedCurve;
+};
</ins></span></pre>
</div>
</div>
</body>
</html>