-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ambiguity of the Web Crypto API Doc #310
Comments
Hey 👋 Thanks for the report, and apologies for the delay. I would say that the text is not necessarily ambiguous, since the first check comes strictly before the second one, so a So, I think the second check (and identical checks for the other algorithms) can simply be removed. |
Hi! I was reading the web crypto API spec and I found an unmatched implementation.
Under the
importKey()
method spec:Point 2. If format is equal to the string "jwk":
importKey()
method is not aJsonWebKey
dictionary,throw
a**TypeError**
.However, under the
RSASSA-PKCS1-v1_5
algorithm section ofimportKey()
method:If format is "
jwk
":JsonWebKey
dictionary:Let jwk equal keyData.
Throw
a**DataError**
.So if the format is "jwk" and keyData is not a
JsonWebKey
, the generalimportKey()
spec throws aTypeError
, but the algorithm-specific spec throws aDataError
. It seems like the doc has some inconsistencies in the API Doc.The text was updated successfully, but these errors were encountered: