Skip to content

Commit

Permalink
Fix w3c#146: Specify source of data for eliptic curve key import and …
Browse files Browse the repository at this point in the history
…fix error type (w3c#148)
  • Loading branch information
mwatson2 authored Oct 18, 2016
1 parent 3f28acd commit e094c89
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
16 changes: 9 additions & 7 deletions spec/Overview-WebCryptoAPI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8787,15 +8787,16 @@ dictionary <dfn id="dfn-EcKeyImportParams">EcKeyImportParams</dfn> : <a href="#d
Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
object that represents the Elliptic Curve public key identified by
performing the conversion steps defined in Section 2.3.4 of <a
href="#SEC1">SEC 1</a>.
href="#SEC1">SEC 1</a> to the <code>subjectPublicKey</code>
field of <var>spki</var>.
If a decode error occurs or an identity point is found,
<a href="#concept-throw">throw</a> a
<a href="#dfn-DataError"><code>DataError</code></a>.
The uncompressed point format MUST be supported.
If the implementation does not support the compressed point format and
a compressed point is provided,
<a href="#concept-throw">throw</a> a
<a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
<a href="#dfn-DataError"><code>DataError</code></a>.
</p>
</dd>
<dt>Otherwise:</dt>
Expand Down Expand Up @@ -9374,7 +9375,7 @@ dictionary <dfn id="dfn-EcKeyImportParams">EcKeyImportParams</dfn> : <a href="#d
Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
object that represents the Elliptic Curve public key identified by
performing the conversion steps defined in Section 2.3.4 of <a
href="#SEC1">SEC 1</a>.
href="#SEC1">SEC 1</a> to <var>keyData</var>.
If a decode error occurs or an identity point is found,
<a href="#concept-throw">throw</a> a
<a href="#dfn-DataError"><code>DataError</code></a>.
Expand Down Expand Up @@ -10486,15 +10487,16 @@ dictionary <dfn id="dfn-EcdhKeyDeriveParams">EcdhKeyDeriveParams</dfn> : <a href
Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
object that represents the Elliptic Curve public key identified by
performing the conversion steps defined in Section 2.3.4 of <a
href="#SEC1">SEC 1</a>.
href="#SEC1">SEC 1</a> to the <code>subjectPublicKey</code>
field of <var>spki</var>.
If a decode error occurs or an identity point is found,
<a href="#concept-throw">throw</a> a
<a href="#dfn-DataError"><code>DataError</code></a>.
The uncompressed point format MUST be supported.
If the implementation does not support the compressed point format and
a compressed point is provided,
<a href="#concept-throw">throw</a> a
<a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
<a href="#dfn-DataError"><code>DataError</code></a>.
</p>
</dd>
<dt>Otherwise:</dt>
Expand Down Expand Up @@ -11025,15 +11027,15 @@ dictionary <dfn id="dfn-EcdhKeyDeriveParams">EcdhKeyDeriveParams</dfn> : <a href
Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
object that represents the Elliptic Curve public key identified by
performing the conversion steps defined in Section 2.3.4 of <a
href="#SEC1">SEC 1</a>.
href="#SEC1">SEC 1</a> to <var>keyData</var>.
If a decode error occurs or an identity point is found,
<a href="#concept-throw">throw</a> a
<a href="#dfn-DataError"><code>DataError</code></a>.
The uncompressed point format MUST be supported.
If the implementation does not support the compressed point format and
a compressed point is provided,
<a href="#concept-throw">throw</a> a
<a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
<a href="#dfn-DataError"><code>DataError</code></a>.
</p>
</li>
</ol>
Expand Down
16 changes: 9 additions & 7 deletions spec/Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -8540,15 +8540,16 @@ <h4>23.7. Operations</h4>
<p>
Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
object that represents the Elliptic Curve public key identified by
performing the conversion steps defined in Section 2.3.4 of <a href="#SEC1">SEC 1</a>.
performing the conversion steps defined in Section 2.3.4 of <a href="#SEC1">SEC 1</a> to the <code>subjectPublicKey</code>
field of <var>spki</var>.
If a decode error occurs or an identity point is found,
<a href="#concept-throw">throw</a> a
<a href="#dfn-DataError"><code>DataError</code></a>.
The uncompressed point format MUST be supported.
If the implementation does not support the compressed point format and
a compressed point is provided,
<a href="#concept-throw">throw</a> a
<a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
<a href="#dfn-DataError"><code>DataError</code></a>.
</p>
</dd>
<dt>Otherwise:</dt>
Expand Down Expand Up @@ -9091,7 +9092,7 @@ <h4>23.7. Operations</h4>
<p>
Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
object that represents the Elliptic Curve public key identified by
performing the conversion steps defined in Section 2.3.4 of <a href="#SEC1">SEC 1</a>.
performing the conversion steps defined in Section 2.3.4 of <a href="#SEC1">SEC 1</a> to <var>keyData</var>.
If a decode error occurs or an identity point is found,
<a href="#concept-throw">throw</a> a
<a href="#dfn-DataError"><code>DataError</code></a>.
Expand Down Expand Up @@ -10151,15 +10152,16 @@ <h4>24.4. Operations</h4>
<p>
Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
object that represents the Elliptic Curve public key identified by
performing the conversion steps defined in Section 2.3.4 of <a href="#SEC1">SEC 1</a>.
performing the conversion steps defined in Section 2.3.4 of <a href="#SEC1">SEC 1</a> to the <code>subjectPublicKey</code>
field of <var>spki</var>.
If a decode error occurs or an identity point is found,
<a href="#concept-throw">throw</a> a
<a href="#dfn-DataError"><code>DataError</code></a>.
The uncompressed point format MUST be supported.
If the implementation does not support the compressed point format and
a compressed point is provided,
<a href="#concept-throw">throw</a> a
<a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
<a href="#dfn-DataError"><code>DataError</code></a>.
</p>
</dd>
<dt>Otherwise:</dt>
Expand Down Expand Up @@ -10657,15 +10659,15 @@ <h4>24.4. Operations</h4>
<p>
Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
object that represents the Elliptic Curve public key identified by
performing the conversion steps defined in Section 2.3.4 of <a href="#SEC1">SEC 1</a>.
performing the conversion steps defined in Section 2.3.4 of <a href="#SEC1">SEC 1</a> to <var>keyData</var>.
If a decode error occurs or an identity point is found,
<a href="#concept-throw">throw</a> a
<a href="#dfn-DataError"><code>DataError</code></a>.
The uncompressed point format MUST be supported.
If the implementation does not support the compressed point format and
a compressed point is provided,
<a href="#concept-throw">throw</a> a
<a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
<a href="#dfn-DataError"><code>DataError</code></a>.
</p>
</li>
</ol>
Expand Down

0 comments on commit e094c89

Please sign in to comment.