Uh oh!
There was an error while loading. Please reload this page.
crypto: fix webcrypto private/secret import with empty usages - #47877
Conversation
nodejs-github-bot
commented
May 5, 2023
Review requested:
|
panva
commented
May 5, 2023
How do we deal with the semverness of this? The keys were unusable before, they are non-importable now. It is unlikely any code depended on import of keys that weren't usable for any operation but I'm keen to get more opinions. |
nodejs-github-bot
commented
May 5, 2023
nodejs-github-bot
commented
May 5, 2023
panva
commented
May 6, 2023
Furthermore if any interoperable code uses webcrypto (kinda its whole point) it already can't depend on this as other implementations properly reject. I'm proposing to ship this is as a fix not as a breaking change. |
tniessen
commented
May 6, 2023
I'd expect near-zero breakage, so spec-compliance outweighs that concern. |
panva
commented
May 6, 2023
In that case this is ready for reviews. |
| } | ||
| throw lazyDOMException('Unrecognized algorithm name', 'NotSupportedError'); | ||
| if ((result.type === 'secret' || result.type === 'private') && result.usages.length === 0) { |
There was a problem hiding this comment.
| if((result.type==='secret'||result.type==='private')&&result.usages.length===0){ | |
| if(result.type!=='public'&&result.usages.length===0){ |
nodejs-github-bot
commented
May 7, 2023
Landed in 71eda57 |
Refs: nodejs#47864 PR-URL: nodejs#47877 Refs: nodejs#47864 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Backport-PR-URL: nodejs#47336
Refs: nodejs#47864 PR-URL: nodejs#47877 Refs: nodejs#47864 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
privateandsecrettype keys are not allowed to have empty usagesRefs: #47864
cc @tniessen@fhanau