You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For RSA-PSS the spec says the following for pkcs8 importing in the block that validates algorithm OID:
If params is not defined, or is not an instance of the RSASSA-PSS-params ASN.1 type defined in [RFC3447], throw a NotSupportedError.
For spki:
If params is not defined, or is not an instance of the RSASSA-PSS-params ASN.1 type defined in [RFC3447], throw a DataError.
One throws a NotSupportedError, the other a DataError for the same class of issue. This is also not tested in WPT (having it wrong doesn't make the tests fail). Found during some routine maintenance of Deno's Web Crypto implementation.
The same is the case for the same bit of code in RSA-OAEP's import key operation.
The question is: is this wrong? Shouldn't both return DataError?