<?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>22639</bug_id>
          
          <creation_ts>2013-07-10 20:24:09 +0000</creation_ts>
          <short_desc>Clarification on &quot;raise an error&quot; in RSAES-PKCS1-v1_5</short_desc>
          <delta_ts>2014-02-20 21:11:18 +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>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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 name="Eric Roman">ericroman</reporter>
          <assigned_to name="Ryan Sleevi">sleevi</assigned_to>
          <cc>ap</cc>
    
    <cc>sleevi</cc>
    
    <cc>watsonm</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90611</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Roman">ericroman</who>
    <bug_when>2013-07-10 20:24:09 +0000</bug_when>
    <thetext>Section &quot;18.3. RSAES-PKCS1-v1_5&quot; describes in fairly generic terms to &quot;raise an error&quot;.

It is ambiguous what raising an error means, given that it applies to both asynchronous and synchronous cases.

In this case:

&quot;If key does not describe an RSA public key, raise an error and terminate the algorithm.&quot;

I interpret &quot;raise an error&quot; to mean throwing an exception, since it is happening while initializing the CryptoOperation.

However in the case 3.3, this same terminology is used in the context of finish(). Since the operation may not have completed yet (and hence the error is not known), throwing an exception does not make sense. The error would have to be delivered via the Promises reject() mechanism instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90619</commentid>
    <comment_count>1</comment_count>
    <who name="David Dahl">ddahl</who>
    <bug_when>2013-07-10 21:19:01 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Section &quot;18.3. RSAES-PKCS1-v1_5&quot; describes in fairly generic terms to &quot;raise
&gt; an error&quot;.
&gt; 
&gt; It is ambiguous what raising an error means, given that it applies to both
&gt; asynchronous and synchronous cases.
&gt; 
&gt; In this case:
&gt; 
&gt; &quot;If key does not describe an RSA public key, raise an error and terminate
&gt; the algorithm.&quot;
&gt; 

Above the &quot;raise and error&quot;  in section 18.3.4, there is an Ed. note:

&quot;Note: The following processing algorithms have not been updated to match the processing algorithm described in the CryptoOperation processing model.&quot;

This section needs to be updated to match the Promises direction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101023</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-02-20 21:11:18 +0000</bug_when>
    <thetext>All errors are now asynchronous according to Bug 24427.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>