Skip to content

Commit

Permalink
fix: keyselection for ecdh when both OKP and EC are present
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Mar 22, 2021
1 parent 38ccc93 commit a0f8f7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers/keystore.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class KeyStore {
const scoring = { alg, use: 'sig' };

return this[filter]((jwk) => {
let candidate = jwk.kty === kty;
let candidate = Array.isArray(kty) ? kty.includes(jwk.kty) : jwk.kty === kty;

if (candidate && typeof kid === 'string') {
candidate = kid === jwk.kid;
Expand Down

0 comments on commit a0f8f7d

Please sign in to comment.