<!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
&lt;rdar://problem/23789585&gt;

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  &lt;jiewen_tan@apple.com&gt;
+
+        [WebCrypto] Implement ECDH GenerateKey operation
+        https://bugs.webkit.org/show_bug.cgi?id=169093
+        &lt;rdar://problem/23789585&gt;
+
+        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  &lt;hyatt@apple.com&gt;
</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 &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS crypto.subtle.generateKey(&quot;ecdh&quot;, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]) rejected promise  with TypeError: Member EcKeyParams.namedCurve is required and must be an instance of DOMString.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]) rejected promise  with TypeError: Member EcKeyParams.namedCurve is required and must be an instance of DOMString.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: true}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]) rejected promise  with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: null}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]) rejected promise  with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: undefined}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]) rejected promise  with TypeError: Member EcKeyParams.namedCurve is required and must be an instance of DOMString.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: Symbol()}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]) rejected promise  with TypeError: Cannot convert a symbol to a string.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: { }}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]) rejected promise  with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: 1}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]) rejected promise  with NotSupportedError (DOM Exception 9): The algorithm is not supported.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;encrypt&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;decrypt&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;sign&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;verify&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;wrapKey&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;unwrapKey&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-521&quot;}, extractable, [&quot;deriveKey&quot;]) 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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test generating an EC key pair with malformed-paramters.&quot;);
+
+var extractable = true;
+
+// Malformed AlgorithmIdentifiers
+shouldReject('crypto.subtle.generateKey(&quot;ecdh&quot;, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: true}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: null}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: undefined}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: Symbol()}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: { }}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: 1}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;])');
+// Wrong usages
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;encrypt&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;decrypt&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;sign&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;verify&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;wrapKey&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;unwrapKey&quot;])');
+// Not supported NamedCurve
+shouldReject('crypto.subtle.generateKey({name: &quot;ecdh&quot;, namedCurve: &quot;P-521&quot;}, extractable, [&quot;deriveKey&quot;])');
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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 &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test generating an extractable EC key pair with P-256 using ECDH algorithm.&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+
+debug(&quot;Generating a key pair...&quot;);
+crypto.subtle.generateKey({ name: &quot;ECDH&quot;, namedCurve: &quot;P-256&quot;}, extractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]).then(function(result) {
+    keyPair = result;
+    shouldBe(&quot;keyPair.toString()&quot;, &quot;'[object Object]'&quot;);
+    shouldBe(&quot;keyPair.publicKey.type&quot;, &quot;'public'&quot;);
+    shouldBe(&quot;keyPair.publicKey.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.publicKey.usages&quot;, &quot;[ ]&quot;);
+    shouldBe(&quot;keyPair.privateKey.type&quot;, &quot;'private'&quot;);
+    shouldBe(&quot;keyPair.privateKey.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.privateKey.usages&quot;, &quot;['deriveBits', 'deriveKey']&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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 &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test generating an EC key pair with P-256 using ECDH algorithm.&quot;);
+
+jsTestIsAsync = true;
+
+var nonExtractable = false;
+
+debug(&quot;Generating a key pair...&quot;);
+crypto.subtle.generateKey({ name: &quot;ECDH&quot;, namedCurve: &quot;P-256&quot;}, nonExtractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]).then(function(result) {
+    keyPair = result;
+    shouldBe(&quot;keyPair.toString()&quot;, &quot;'[object Object]'&quot;);
+    shouldBe(&quot;keyPair.publicKey.type&quot;, &quot;'public'&quot;);
+    shouldBe(&quot;keyPair.publicKey.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.publicKey.usages&quot;, &quot;[ ]&quot;);
+    shouldBe(&quot;keyPair.privateKey.type&quot;, &quot;'private'&quot;);
+    shouldBe(&quot;keyPair.privateKey.extractable&quot;, &quot;false&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.privateKey.usages&quot;, &quot;['deriveBits', 'deriveKey']&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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 &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test generating an EC key pair with P-384 using ECDH algorithm.&quot;);
+
+jsTestIsAsync = true;
+
+var nonExtractable = false;
+
+debug(&quot;Generating a key pair...&quot;);
+crypto.subtle.generateKey({ name: &quot;ECDH&quot;, namedCurve: &quot;P-384&quot;}, nonExtractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]).then(function(result) {
+    keyPair = result;
+    shouldBe(&quot;keyPair.toString()&quot;, &quot;'[object Object]'&quot;);
+    shouldBe(&quot;keyPair.publicKey.type&quot;, &quot;'public'&quot;);
+    shouldBe(&quot;keyPair.publicKey.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.namedCurve&quot;, &quot;'P-384'&quot;);
+    shouldBe(&quot;keyPair.publicKey.usages&quot;, &quot;[ ]&quot;);
+    shouldBe(&quot;keyPair.privateKey.type&quot;, &quot;'private'&quot;);
+    shouldBe(&quot;keyPair.privateKey.extractable&quot;, &quot;false&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.namedCurve&quot;, &quot;'P-384'&quot;);
+    shouldBe(&quot;keyPair.privateKey.usages&quot;, &quot;['deriveBits', 'deriveKey']&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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 &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test generating an EC key pair with P-256 using ECDH algorithm with a single usage.&quot;);
+
+jsTestIsAsync = true;
+
+var nonExtractable = false;
+
+debug(&quot;Generating a key pair...&quot;);
+crypto.subtle.generateKey({ name: &quot;ECDH&quot;, namedCurve: &quot;P-256&quot;}, nonExtractable, [&quot;deriveKey&quot;]).then(function(result) {
+    keyPair = result;
+    shouldBe(&quot;keyPair.toString()&quot;, &quot;'[object Object]'&quot;);
+    shouldBe(&quot;keyPair.publicKey.type&quot;, &quot;'public'&quot;);
+    shouldBe(&quot;keyPair.publicKey.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.publicKey.usages&quot;, &quot;[ ]&quot;);
+    shouldBe(&quot;keyPair.privateKey.type&quot;, &quot;'private'&quot;);
+    shouldBe(&quot;keyPair.privateKey.extractable&quot;, &quot;false&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.privateKey.usages&quot;, &quot;['deriveKey']&quot;);
+
+    return crypto.subtle.generateKey({ name: &quot;ECDH&quot;, namedCurve: &quot;P-256&quot;}, nonExtractable, [&quot;deriveBits&quot;]);
+}).then(function(result) {
+    keyPair = result;
+    shouldBe(&quot;keyPair.toString()&quot;, &quot;'[object Object]'&quot;);
+    shouldBe(&quot;keyPair.publicKey.type&quot;, &quot;'public'&quot;);
+    shouldBe(&quot;keyPair.publicKey.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.publicKey.usages&quot;, &quot;[ ]&quot;);
+    shouldBe(&quot;keyPair.privateKey.type&quot;, &quot;'private'&quot;);
+    shouldBe(&quot;keyPair.privateKey.extractable&quot;, &quot;false&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.privateKey.usages&quot;, &quot;['deriveBits']&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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 &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+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>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;script&gt;
+        worker = startWorker('resources/ec-generate-key.js');
+    &lt;/script&gt;
+    &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</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(&quot;../../../resources/common.js&quot;);
+
+description(&quot;Test generating an EC key pair with P-256 using ECDH algorithm in workers.&quot;);
+
+jsTestIsAsync = true;
+
+var nonExtractable = false;
+
+debug(&quot;Generating a key pair...&quot;);
+crypto.subtle.generateKey({ name: &quot;ECDH&quot;, namedCurve: &quot;P-256&quot;}, nonExtractable, [&quot;deriveKey&quot;, &quot;deriveBits&quot;]).then(function(result) {
+    keyPair = result;
+    shouldBe(&quot;keyPair.toString()&quot;, &quot;'[object Object]'&quot;);
+    shouldBe(&quot;keyPair.publicKey.type&quot;, &quot;'public'&quot;);
+    shouldBe(&quot;keyPair.publicKey.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.publicKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.publicKey.usages&quot;, &quot;[ ]&quot;);
+    shouldBe(&quot;keyPair.privateKey.type&quot;, &quot;'private'&quot;);
+    shouldBe(&quot;keyPair.privateKey.extractable&quot;, &quot;false&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.name&quot;, &quot;'ECDH'&quot;);
+    shouldBe(&quot;keyPair.privateKey.algorithm.namedCurve&quot;, &quot;'P-256'&quot;);
+    shouldBe(&quot;keyPair.privateKey.usages&quot;, &quot;['deriveBits', 'deriveKey']&quot;);
+
+    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  &lt;jiewen_tan@apple.com&gt;
+
+        [WebCrypto] Implement ECDH GenerateKey operation
+        https://bugs.webkit.org/show_bug.cgi?id=169093
+        &lt;rdar://problem/23789585&gt;
+
+        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  &lt;achristensen@webkit.org&gt;
</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 &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
</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 &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-256}, true, []) assert_equals: Empty usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-384}, false, []) assert_equals: Empty usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-384}, true, []) assert_equals: Empty usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
</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 &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
</span><span class="cx"> FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-521}, true, []) assert_equals: Empty usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
</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 &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, encrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, decrypt]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, sign]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, verify]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, wrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Bad usages: generateKey({name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits, deriveKey, deriveBits, unwrapKey]) assert_equals: Bad usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
</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 &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-256}, true, []) assert_equals: Empty usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-384}, false, []) assert_equals: Empty usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
-FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-384}, true, []) assert_equals: Empty usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
</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 &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
</span><span class="cx"> FAIL Empty usages: generateKey({name: ECDH, namedCurve: P-521}, true, []) assert_equals: Empty usages not supported expected &quot;SyntaxError&quot; but got &quot;NotSupportedError&quot;
</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  &lt;jiewen_tan@apple.com&gt;
+
+        [WebCrypto] Implement ECDH GenerateKey operation
+        https://bugs.webkit.org/show_bug.cgi?id=169093
+        &lt;rdar://problem/23789585&gt;
+
+        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  &lt;mcatanzaro@igalia.com&gt;
</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 = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 574AC7531DAC367D00E9744C /* CryptoAlgorithmParameters.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CryptoAlgorithmParameters.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 574D42791D594FF6002CF50E /* GlobalCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GlobalCrypto.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                5750A9721E68D00000705C4A /* CryptoKeyEC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoKeyEC.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5750A9731E68D00000705C4A /* CryptoKeyEC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoKeyEC.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5750A97A1E69161600705C4A /* CryptoKeyECMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoKeyECMac.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5750A97C1E6A12B400705C4A /* EcKeyParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = EcKeyParams.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5750A97D1E6A13EF00705C4A /* CryptoAlgorithmEcKeyParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmEcKeyParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5750A97F1E6A150800705C4A /* JSEcKeyParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEcKeyParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5750A9801E6A150800705C4A /* JSEcKeyParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEcKeyParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5750A9841E6A216800705C4A /* CryptoAlgorithmECDH.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmECDH.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5750A9851E6A216800705C4A /* CryptoAlgorithmECDH.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmECDH.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 5768E4331DB7524500D0A4F7 /* JSRsaHashedKeyGenParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRsaHashedKeyGenParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5768E4351DB7527300D0A4F7 /* JSRsaHashedKeyGenParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRsaHashedKeyGenParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 577483101DADC49900716EF9 /* AesKeyGenParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AesKeyGenParams.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</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 &quot;CryptoKeyAES.h&quot;
</span><ins>+#include &quot;CryptoKeyEC.h&quot;
</ins><span class="cx"> #include &quot;CryptoKeyHMAC.h&quot;
</span><span class="cx"> #include &quot;CryptoKeyRSA.h&quot;
</span><span class="cx"> #include &quot;JSCryptoAlgorithmBuilder.h&quot;
</span><span class="lines">@@ -54,6 +55,12 @@
</span><span class="cx">         builder.add(&quot;length&quot;, aesAlgorithm.length());
</span><span class="cx">         break;
</span><span class="cx">     }
</span><ins>+    case KeyAlgorithmClass::EC: {
+        auto&amp; ecAlgorithm = downcast&lt;EcKeyAlgorithm&gt;(*algorithm);
+        builder.add(&quot;name&quot;, ecAlgorithm.name());
+        builder.add(&quot;namedCurve&quot;, ecAlgorithm.namedCurve());
+        break;
+    }
</ins><span class="cx">     case KeyAlgorithmClass::HMAC: {
</span><span class="cx">         auto&amp; hmacAlgorithm = downcast&lt;HmacKeyAlgorithm&gt;(*algorithm);
</span><span class="cx">         builder.add(&quot;name&quot;, 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 &quot;JSCryptoKeyPair.h&quot;
</span><span class="cx"> #include &quot;JSDOMPromise.h&quot;
</span><span class="cx"> #include &quot;JSDOMWrapper.h&quot;
</span><ins>+#include &quot;JSEcKeyParams.h&quot;
</ins><span class="cx"> #include &quot;JSHmacKeyParams.h&quot;
</span><span class="cx"> #include &quot;JSJsonWebKey.h&quot;
</span><span class="cx"> #include &quot;JSRsaHashedImportParams.h&quot;
</span><span class="lines">@@ -199,6 +200,13 @@
</span><span class="cx">                 result = std::make_unique&lt;CryptoAlgorithmHmacKeyParams&gt;(params);
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><ins>+            case CryptoAlgorithmIdentifier::ECDSA:
+            case CryptoAlgorithmIdentifier::ECDH: {
+                auto params = convertDictionary&lt;CryptoAlgorithmEcKeyParams&gt;(state, value);
+                RETURN_IF_EXCEPTION(scope, nullptr);
+                result = std::make_unique&lt;CryptoAlgorithmEcKeyParams&gt;(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-&gt;generateKey(*params, extractable, keyUsages, WTFMove(callback), WTFMove(exceptionCallback), *scriptExecutionContextFromExecState(&amp;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-&gt;algorithmIdentifier());
</span><span class="cx">             write(downcast&lt;CryptoKeyAES&gt;(*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-&gt;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 &lt;CommonCrypto/CommonCryptorSPI.h&gt;
</span><ins>+#include &lt;CommonCrypto/CommonECCryptor.h&gt;
</ins><span class="cx"> #include &lt;CommonCrypto/CommonRSACryptor.h&gt;
</span><span class="cx"> #include &lt;CommonCrypto/CommonRandomSPI.h&gt;
</span><span class="cx"> #endif
</span><span class="lines">@@ -85,6 +86,10 @@
</span><span class="cx"> extern &quot;C&quot; CCCryptorStatus CCRSACryptorImport(const void *keyPackage, size_t keyPackageLen, CCRSACryptorRef *key);
</span><span class="cx"> extern &quot;C&quot; CCCryptorStatus CCRSACryptorExport(CCRSACryptorRef key, void *out, size_t *outLen);
</span><span class="cx"> 
</span><ins>+typedef struct _CCECCryptor *CCECCryptorRef;
+extern &quot;C&quot; CCCryptorStatus CCECCryptorGeneratePair(size_t keysize, CCECCryptorRef *publicKey, CCECCryptorRef *privateKey);
+extern &quot;C&quot; void CCECCryptorRelease(CCECCryptorRef key);
+
</ins><span class="cx"> #if !USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> extern &quot;C&quot; 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 &quot;config.h&quot;
+#include &quot;CryptoAlgorithmECDH.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include &quot;CryptoAlgorithmEcKeyParams.h&quot;
+#include &quot;CryptoKeyEC.h&quot;
+#include &quot;ExceptionCode.h&quot;
+
+namespace WebCore {
+
+Ref&lt;CryptoAlgorithm&gt; CryptoAlgorithmECDH::create()
+{
+    return adoptRef(*new CryptoAlgorithmECDH);
+}
+
+CryptoAlgorithmIdentifier CryptoAlgorithmECDH::identifier() const
+{
+    return s_identifier;
+}
+
+void CryptoAlgorithmECDH::generateKey(const CryptoAlgorithmParameters&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp;)
+{
+    const auto&amp; ecParameters = downcast&lt;CryptoAlgorithmEcKeyParams&gt;(parameters);
+
+    if (usages &amp; (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-&gt;setUsagesBitmap(0);
+    pair.privateKey-&gt;setUsagesBitmap(pair.privateKey-&gt;usagesBitmap() &amp; (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 &quot;CryptoAlgorithm.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+namespace WebCore {
+
+class CryptoAlgorithmECDH final : public CryptoAlgorithm {
+public:
+    static constexpr const char* s_name = &quot;ECDH&quot;;
+    static constexpr CryptoAlgorithmIdentifier s_identifier = CryptoAlgorithmIdentifier::ECDH;
+    static Ref&lt;CryptoAlgorithm&gt; create();
+
+private:
+    CryptoAlgorithmECDH() = default;
+    CryptoAlgorithmIdentifier identifier() const final;
+
+    void generateKey(const CryptoAlgorithmParameters&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;) 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 &quot;config.h&quot;
+#include &quot;CryptoKeyEC.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include &quot;CryptoKeyPair.h&quot;
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+struct _PlatformECKeyGnuTLS {
+};
+
+CryptoKeyEC::~CryptoKeyEC()
+{
+    notImplemented();
+}
+
+std::optional&lt;CryptoKeyPair&gt; 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 &quot;config.h&quot;
+#include &quot;CryptoKeyEC.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include &quot;CryptoAlgorithmRegistry.h&quot;
+#include &quot;CryptoKeyData.h&quot;
+#include &quot;ExceptionCode.h&quot;
+
+namespace WebCore {
+
+static const char* const P256 = &quot;P-256&quot;;
+static const char* const P384 = &quot;P-384&quot;;
+
+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&lt;CryptoKeyPair&gt; CryptoKeyEC::generatePair(CryptoAlgorithmIdentifier identifier, const String&amp; 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&lt;KeyAlgorithm&gt; CryptoKeyEC::buildAlgorithm() const
+{
+    String name = CryptoAlgorithmRegistry::singleton().name(algorithmIdentifier());
+    switch (m_curve) {
+    case NamedCurve::P256:
+        return std::make_unique&lt;EcKeyAlgorithm&gt;(name, String(P256));
+    case NamedCurve::P384:
+        return std::make_unique&lt;EcKeyAlgorithm&gt;(name, String(P384));
+    }
+
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+std::unique_ptr&lt;CryptoKeyData&gt; CryptoKeyEC::exportData() const
+{
+    // A dummy implementation for now.
+    return std::make_unique&lt;CryptoKeyData&gt;(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 &quot;CryptoKey.h&quot;
+#include &quot;CryptoKeyPair.h&quot;
+#include &quot;ExceptionOr.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#if OS(DARWIN) &amp;&amp; !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&amp; name, const String&amp; curve)
+        : KeyAlgorithm(name)
+        , m_curve(curve)
+    {
+    }
+
+    KeyAlgorithmClass keyAlgorithmClass() const override { return KeyAlgorithmClass::EC; }
+
+    const String&amp; 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&lt;CryptoKeyEC&gt; 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&lt;CryptoKeyPair&gt; generatePair(CryptoAlgorithmIdentifier, const String&amp;, bool extractable, CryptoKeyUsageBitmap);
+
+private:
+    CryptoKeyEC(CryptoAlgorithmIdentifier, NamedCurve, CryptoKeyType, PlatformECKey, bool extractable, CryptoKeyUsageBitmap);
+
+    CryptoKeyClass keyClass() const final { return CryptoKeyClass::EC; }
+
+    std::unique_ptr&lt;KeyAlgorithm&gt; buildAlgorithm() const final;
+    std::unique_ptr&lt;CryptoKeyData&gt; exportData() const final;
+
+    static std::optional&lt;CryptoKeyPair&gt; 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 &quot;CryptoAlgorithmAES_CFB.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmAES_GCM.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmAES_KW.h&quot;
</span><ins>+#include &quot;CryptoAlgorithmECDH.h&quot;
</ins><span class="cx"> #include &quot;CryptoAlgorithmHMAC.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmRSAES_PKCS1_v1_5.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmRSASSA_PKCS1_v1_5.h&quot;
</span><span class="lines">@@ -50,6 +51,7 @@
</span><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmAES_CFB&gt;();
</span><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmAES_GCM&gt;();
</span><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmAES_KW&gt;();
</span><ins>+    registerAlgorithm&lt;CryptoAlgorithmECDH&gt;();
</ins><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmHMAC&gt;();
</span><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmRSAES_PKCS1_v1_5&gt;();
</span><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmRSASSA_PKCS1_v1_5&gt;();
</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 &quot;config.h&quot;
+#include &quot;CryptoKeyEC.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include &quot;CommonCryptoUtilities.h&quot;
+
+namespace WebCore {
+
+CryptoKeyEC::~CryptoKeyEC()
+{
+    CCECCryptorRelease(m_platformKey);
+}
+
+std::optional&lt;CryptoKeyPair&gt; 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, &amp;ccPublicKey, &amp;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 &quot;CryptoAlgorithmParameters.h&quot;
+
+#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>