<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25557</bug_id>
          
          <creation_ts>2014-05-05 18:42:26 +0000</creation_ts>
          <short_desc>Spec should allow returning NotSupportedError for reasons other than failed Algorithm normalization</short_desc>
          <delta_ts>2014-09-29 15:02:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Web Cryptography</product>
          <component>Web Cryptography API Document</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>vijaybh</reporter>
          <assigned_to name="Ryan Sleevi">sleevi</assigned_to>
          <cc>public-webcrypto</cc>
    
    <cc>watsonm</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105064</commentid>
    <comment_count>0</comment_count>
    <who name="">vijaybh</who>
    <bug_when>2014-05-05 18:42:26 +0000</bug_when>
    <thetext>(see discussion in http://lists.w3.org/Archives/Public/public-webcrypto/2014Apr/0085.html)

Currently the spec only allows NotSupportedError to be returned if Algorithm normalization fails to produce a registered algorithm. We should give an implementation the flexibility to return this error in other cases as well:

1. If we ever add anything to the registry then old implementations will automatically be in violation of this rule as they will then be returning NotSupportedError for &quot;registered algorithms&quot;.
2. An implementation may choose to not support a particular algorithm or operation due to various constraints, and may desire to fail early so scripts can handle errors more easily.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112303</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-09-26 19:03:30 +0000</bug_when>
    <thetext>(In reply to vijaybh from comment #0)
&gt; (see discussion in
&gt; http://lists.w3.org/Archives/Public/public-webcrypto/2014Apr/0085.html)
&gt; 
&gt; Currently the spec only allows NotSupportedError to be returned if Algorithm
&gt; normalization fails to produce a registered algorithm. We should give an
&gt; implementation the flexibility to return this error in other cases as well:
&gt; 
&gt; 1. If we ever add anything to the registry then old implementations will
&gt; automatically be in violation of this rule as they will then be returning
&gt; NotSupportedError for &quot;registered algorithms&quot;.

I don&apos;t think that&apos;s correct. We describe an internal [[supportedAlgorithms]] object which contains the algorithms supported *by the UA* and you return NotSupportedError for any others.

&gt; 2. An implementation may choose to not support a particular algorithm or
&gt; operation due to various constraints, and may desire to fail early so
&gt; scripts can handle errors more easily.

I think these cases end up being OperationErrors right now: you pass all the WebCrypto validation / data manipulation procedures and end up failing at the operation.

The problem with allowing implementations to optimize for cases they know aren&apos;t supported, whether they return OperationError of NotSupportedError is that we get inconsistent behavior across implementations as there can always be implementations that only discover whether something is supported when the operation is handed off to some crypto library.

So, I would suggest Won&apos;t Fix here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112355</commentid>
    <comment_count>2</comment_count>
    <who name="">vijaybh</who>
    <bug_when>2014-09-29 07:41:49 +0000</bug_when>
    <thetext>Go for it. This bug predates many changes in the spec which, as you rightly point out, have rendered it obsolete.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>