Skip to content

Commit

Permalink
fix: allow PBES2 for the correct JWK use values
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Dec 5, 2019
1 parent 2bd3d3c commit f0d7194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jwa/pbes2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})
}

0 comments on commit f0d7194

Please sign in to comment.