Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kms-local): replace buggy didcomm clone with did jwt implementation #548

Merged

Conversation

mirceanis
Copy link
Member

@mirceanis mirceanis commented Jun 2, 2021

This fixes an old bug that was causing incorrect didcomm messaging in veramo.
The kms-local plugin now uses the did-jwt implementation of JWE using the anon [de]encrypter.

  • check if the current kms-local plugin can be used in a react-native context.
    It works fine. Don't forget to add @ethersproject/shims.
  • remove the libsodium-wrappers dependency and replaces it with @stablelib/* which should make it easier to work with multiple JS environments.
  • BREAKING CHANGE: remove kms-local-react-native. Use kms-local instead.

fixes #538
probably also fixes #306

@mirceanis mirceanis changed the title fix(did-comm): replace buggy didcomm clone with did jwt implementation fix(kms-local): replace buggy didcomm clone with did jwt implementation Jun 2, 2021
@codecov
Copy link

codecov bot commented Jun 2, 2021

Codecov Report

Merging #548 (d19879d) into next (88264db) will increase coverage by 9.58%.
The diff coverage is 63.54%.

@@            Coverage Diff             @@
##             next     #548      +/-   ##
==========================================
+ Coverage   67.58%   77.17%   +9.58%     
==========================================
  Files          62       71       +9     
  Lines        1530     1866     +336     
  Branches      247      314      +67     
==========================================
+ Hits         1034     1440     +406     
- Misses        400      424      +24     
+ Partials       96        2      -94     

Base automatically changed from feat/add-generic-signing-to-kms to next June 3, 2021 12:39
…rom `did-jwt`

fix(kms-local): replace buggy didcomm-js clone with anon encryption from `did-jwt`

fixes #538
Please use `@veramo/kms-local` instead
@mirceanis mirceanis force-pushed the 538-replace-buggy-didcomm-with-did-jwt-implementation branch from b148385 to d19879d Compare June 3, 2021 14:08
@@ -41,7 +41,7 @@ export class KeyManager implements IAgentPlugin {
keyManagerGet: this.keyManagerGet.bind(this),
keyManagerDelete: this.keyManagerDelete.bind(this),
keyManagerImport: this.keyManagerImport.bind(this),
keyManagerEncryptJWE: this.keyManagerDecryptJWE.bind(this),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooohweee, what a typo!!
This is likely the culprit of #306

@mirceanis mirceanis marked this pull request as ready for review June 7, 2021 10:31
@mirceanis mirceanis requested review from awoie and jasheal June 7, 2021 12:29
Copy link
Member

@awoie awoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mirceanis mirceanis merged commit 9dea353 into next Jun 7, 2021
@mirceanis mirceanis deleted the 538-replace-buggy-didcomm-with-did-jwt-implementation branch June 7, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants