This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22639 - Clarification on "raise an error" in RSAES-PKCS1-v1_5
Summary: Clarification on "raise an error" in RSAES-PKCS1-v1_5
Status: RESOLVED FIXED
Alias: None
Product: Web Cryptography
Classification: Unclassified
Component: Web Cryptography API Document (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ryan Sleevi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-10 20:24 UTC by Eric Roman
Modified: 2014-02-20 21:11 UTC (History)
3 users (show)

See Also:


Attachments

Description Eric Roman 2013-07-10 20:24:09 UTC
Section "18.3. RSAES-PKCS1-v1_5" describes in fairly generic terms to "raise an error".

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

In this case:

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

I interpret "raise an error" 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.
Comment 1 David Dahl 2013-07-10 21:19:01 UTC
(In reply to comment #0)
> Section "18.3. RSAES-PKCS1-v1_5" describes in fairly generic terms to "raise
> an error".
> 
> It is ambiguous what raising an error means, given that it applies to both
> asynchronous and synchronous cases.
> 
> In this case:
> 
> "If key does not describe an RSA public key, raise an error and terminate
> the algorithm."
> 

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

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

This section needs to be updated to match the Promises direction
Comment 2 Mark Watson 2014-02-20 21:11:18 UTC
All errors are now asynchronous according to Bug 24427.