<!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>[279374] trunk/LayoutTests</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/279374">279374</a></dd>
<dt>Author</dt> <dd>yoshiaki.jitsukawa@sony.com</dd>
<dt>Date</dt> <dd>2021-06-29 08:19:46 -0700 (Tue, 29 Jun 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>P-384 EC public JWK key in layout tests is wrong
https://bugs.webkit.org/show_bug.cgi?id=227432

Reviewed by Chris Dumez.

Fix the y value of the JWK keys. The y value was derived from the x value with openssl,
using EC_POINT_set_compressed_coordinates_GFp() and EC_POINT_get_affine_coordinates_GFp(),
and was verified with EC_KEY_check_key().

* crypto/subtle/ec-import-key-malformed-parameters.html:
* crypto/subtle/ecdh-import-jwk-public-key-p384.html:
* crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html:
* crypto/workers/subtle/resources/ec-import-jwk-key-public.js:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecimportkeymalformedparametershtml">trunk/LayoutTests/crypto/subtle/ec-import-key-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdhimportjwkpublickeyp384html">trunk/LayoutTests/crypto/subtle/ecdh-import-jwk-public-key-p384.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleecdsaimportjwkpublickeyalg384html">trunk/LayoutTests/crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourcesecimportjwkkeypublicjs">trunk/LayoutTests/crypto/workers/subtle/resources/ec-import-jwk-key-public.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (279373 => 279374)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2021-06-29 13:53:43 UTC (rev 279373)
+++ trunk/LayoutTests/ChangeLog 2021-06-29 15:19:46 UTC (rev 279374)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2021-06-29  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
+
+        P-384 EC public JWK key in layout tests is wrong
+        https://bugs.webkit.org/show_bug.cgi?id=227432
+
+        Reviewed by Chris Dumez.
+
+        Fix the y value of the JWK keys. The y value was derived from the x value with openssl,
+        using EC_POINT_set_compressed_coordinates_GFp() and EC_POINT_get_affine_coordinates_GFp(),
+        and was verified with EC_KEY_check_key().
+
+        * crypto/subtle/ec-import-key-malformed-parameters.html:
+        * crypto/subtle/ecdh-import-jwk-public-key-p384.html:
+        * crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html:
+        * crypto/workers/subtle/resources/ec-import-jwk-key-public.js:
+
</ins><span class="cx"> 2021-06-29  Rob Buis  <rbuis@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Nullptr crash in HTMLStackItem::create via DocumentFragment::parseHTML
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecimportkeymalformedparametershtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/ec-import-key-malformed-parameters.html (279373 => 279374)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ec-import-key-malformed-parameters.html  2021-06-29 13:53:43 UTC (rev 279373)
+++ trunk/LayoutTests/crypto/subtle/ec-import-key-malformed-parameters.html     2021-06-29 15:19:46 UTC (rev 279374)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> var y = "9jmNTLqM4cjBhdAnHcNI9YQV3O8LFmo-EdZWk8ntAaI"; // P-256
</span><span class="cx"> var d = "ppxBSov3N8_AUcisAuvmLV4yE8e_L_BLE8bZb9Z1Xjg"; // P-256
</span><span class="cx"> var x384 = "1bHwFrsaPRjYq-zFOyLXK8Ugv3EqbVF075ct7ouTl_pwyhjeBu03JHjKTsyVbNWK";
</span><del>-var y384 = "1bHwFrsaPRjYq-zFOyLXK8Ugv3EqbVF075ct7ouTl_pwyhjeBu03JHjKTsyVbNWK";
</del><ins>+var y384 = "OPQLbvRDpocNk4FRQLUVRBbqiauWcnUn7cAC2uSOH6GpSLoTo6B-4LtHq0ydd-iu";
</ins><span class="cx"> var spkiP256Key = hexStringToUint8Array("3059301306072a8648ce3d020106082a8648ce3d03010703420004c3ee3a2c3380072b9b2a59fed2cada65121806e22c4f4f8a25e740fc3e54d75d86c200298e6dfc1611d185eedbdb3c2661b0eb0441f7fd57c90d08112e9ae71c");
</span><span class="cx"> var spkiP384Key = hexStringToUint8Array("3076301006072a8648ce3d020106052b8104002203620004478f6119747475f94b742654be32ab6ebbdc371afa34fbee6d12c32fe2d586231262b17d13a1f271f19c8008c034d8716b7df0ce1d987990c5b175ecae1aa40f2fb89e4778528e1234e56d69638db135d103fa68448fee2b4f58ecc86d7f4b7a");
</span><span class="cx"> var truncatedSpkiP256Key1 = hexStringToUint8Array("30");
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdhimportjwkpublickeyp384html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/ecdh-import-jwk-public-key-p384.html (279373 => 279374)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdh-import-jwk-public-key-p384.html     2021-06-29 13:53:43 UTC (rev 279373)
+++ trunk/LayoutTests/crypto/subtle/ecdh-import-jwk-public-key-p384.html        2021-06-29 15:19:46 UTC (rev 279374)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">     ext: true,
</span><span class="cx">     crv: "P-384",
</span><span class="cx">     x: "1bHwFrsaPRjYq-zFOyLXK8Ugv3EqbVF075ct7ouTl_pwyhjeBu03JHjKTsyVbNWK",
</span><del>-    y: "1bHwFrsaPRjYq-zFOyLXK8Ugv3EqbVF075ct7ouTl_pwyhjeBu03JHjKTsyVbNWK",
</del><ins>+    y: "OPQLbvRDpocNk4FRQLUVRBbqiauWcnUn7cAC2uSOH6GpSLoTo6B-4LtHq0ydd-iu",
</ins><span class="cx"> };
</span><span class="cx"> var extractable = true;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleecdsaimportjwkpublickeyalg384html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html (279373 => 279374)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html 2021-06-29 13:53:43 UTC (rev 279373)
+++ trunk/LayoutTests/crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html    2021-06-29 15:19:46 UTC (rev 279374)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">     ext: true,
</span><span class="cx">     crv: "P-384",
</span><span class="cx">     x: "1bHwFrsaPRjYq-zFOyLXK8Ugv3EqbVF075ct7ouTl_pwyhjeBu03JHjKTsyVbNWK",
</span><del>-    y: "1bHwFrsaPRjYq-zFOyLXK8Ugv3EqbVF075ct7ouTl_pwyhjeBu03JHjKTsyVbNWK",
</del><ins>+    y: "OPQLbvRDpocNk4FRQLUVRBbqiauWcnUn7cAC2uSOH6GpSLoTo6B-4LtHq0ydd-iu",
</ins><span class="cx">     alg: "ES384"
</span><span class="cx"> };
</span><span class="cx"> var extractable = true;
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourcesecimportjwkkeypublicjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/workers/subtle/resources/ec-import-jwk-key-public.js (279373 => 279374)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/ec-import-jwk-key-public.js    2021-06-29 13:53:43 UTC (rev 279373)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/ec-import-jwk-key-public.js       2021-06-29 15:19:46 UTC (rev 279374)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">     ext: true,
</span><span class="cx">     crv: "P-384",
</span><span class="cx">     x: "1bHwFrsaPRjYq-zFOyLXK8Ugv3EqbVF075ct7ouTl_pwyhjeBu03JHjKTsyVbNWK",
</span><del>-    y: "1bHwFrsaPRjYq-zFOyLXK8Ugv3EqbVF075ct7ouTl_pwyhjeBu03JHjKTsyVbNWK",
</del><ins>+    y: "OPQLbvRDpocNk4FRQLUVRBbqiauWcnUn7cAC2uSOH6GpSLoTo6B-4LtHq0ydd-iu",
</ins><span class="cx"> };
</span><span class="cx"> var extractable = true;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>