bytecodealliance / bytecodealliance/StarlingMonkey

WebCrypto's `importKey` is incomplete and emits misleading exceptions

Open
#246 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
288
Forks
57
PR merge metrics
No merged PRs in 30d

Description

The implementation of `importKey` [claims](https://github.com/bytecodealliance/StarlingMonkey/blob/4051ee1e72b8c9ae49cc78140529fb6198992760/builtins/web/crypto/crypto-algorithm.cpp#L1859) to support a number of key formats. In practice, that support is [incomplete](https://github.com/bytecodealliance/StarlingMonkey/blob/4051ee1e72b8c9ae49cc78140529fb6198992760/builtins/web/crypto/crypto-algorithm.cpp#L1615-L1621) in at least [two](https://github.com/bytecodealliance/StarlingMonkey/blob/4051ee1e72b8c9ae49cc78140529fb6198992760/builtins/web/crypto/crypto-algorithm.cpp#L1841-L1845) places, maybe more.

Additionally, the implementation raises an exception listing an [incorrect set of supported formats](https://github.com/bytecodealliance/StarlingMonkey/blob/4051ee1e72b8c9ae49cc78140529fb6198992760/builtins/web/crypto/subtle-crypto.cpp#L105-L108).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.