Skip to content

Commit

Permalink
Do not include key_ops in exported JWK.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Oct 30, 2023
1 parent c21d9e2 commit e89e11b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# @digitalbazaar/ecdsa-multikey ChangeLog

## 1.2.1 - 2023-10-dd

### Fixed
- Do not include `ext` or `key_ops` in output JWK.

## 1.2.0 - 2023-10-30

### Added
Expand Down
2 changes: 2 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ export async function toJwk({keyPair, secretKey = false} = {}) {
const useSecretKey = secretKey && !!keyPair.secretKey;
const cryptoKey = useSecretKey ? keyPair.secretKey : keyPair.publicKey;
const jwk = await webcrypto.subtle.exportKey('jwk', cryptoKey);
delete jwk.ext;
delete jwk.key_ops;
return jwk;
}

Expand Down

0 comments on commit e89e11b

Please sign in to comment.