diff --git a/lib/jwa/pbes2.js b/lib/jwa/pbes2.js index bd1700fa12..b0c7d40dfa 100644 --- a/lib/jwa/pbes2.js +++ b/lib/jwa/pbes2.js @@ -54,7 +54,7 @@ module.exports = (JWA, JWK) => { if (kwWrap && kwUnwrap) { JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwWrap)) JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwUnwrap)) - JWK.oct.deriveKey[jwaAlg] = key => key.use === 'sig' || key.use === undefined + JWK.oct.deriveKey[jwaAlg] = key => key.use === 'enc' || key.use === undefined } }) }