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 VC verification (jsigs/expo-crypto related). #640

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix VC verification (jsigs/expo-crypto related).
dmitrizagidulin committed Sep 18, 2024
commit e282eb8f358da7fa24bba7c4c6f74d69f4199a24
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# learner-credential-wallet Changelog
## 2.1.2 - build 82

### Fixed
- Fix signature verification (`@sphereon/isomorphic-webcrypto` was failing upstream in `jsonld-signatures`),
and has been replaced with `expo-crypto` usage. Also fixes StatusList `Buffer` error.

## 2.1.1 - build 81

### Changed
Update to latest library versions, add support for VC DM 2.0.
- Update to latest library versions, add support for VC DM 2.0.

## 2.1.0 - build 80
First official release to app stores post RN Upgrade and conversion to Expo. Releases are now back on `main` branch.
- First official release to app stores post RN Upgrade and conversion to Expo. Releases are now back on `main` branch.

### Added
- Add support for the OBv3 name property (derived from `identifierHash` when `identifierType == 'name'`).
67 changes: 56 additions & 11 deletions app/mock/credential.ts

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion app/types/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ declare module '@digitalcredentials/vc';
declare module '@digitalcredentials/vc-bitstring-status-list';
declare module '@digitalcredentials/vc-status-list';
declare module '@digitalcredentials/vpqr';
declare module '@digitalbazaar/http-client';
declare module '@digitalcredentials/jsonld-signatures';
declare module '@digitalcredentials/ed25519-signature-2020' {
export class Ed25519Signature2020 {
908 changes: 630 additions & 278 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -31,16 +31,14 @@
}
}
},
"overrides": {
"@digitalbazaar/http-client": "4.1.0"
},
"dependencies": {
"@craftzdog/react-native-buffer": "^6.0.5",
"@digitalcredentials/did-method-key": "^2.0.3",
"@digitalcredentials/ed25519-signature-2020": "^5.0.0",
"@digitalcredentials/ed25519-signature-2020": "^6.0.0",
"@digitalcredentials/ed25519-verification-key-2020": "^4.0.0",
"@digitalcredentials/issuer-registry-client": "^3.0.0",
"@digitalcredentials/security-document-loader": "^6.0.0",
"@digitalcredentials/vc": "^8.0.1",
"@digitalcredentials/vc": "^9.0.0",
"@digitalcredentials/vc-bitstring-status-list": "^1.0.0",
"@digitalcredentials/vc-status-list": "^9.0.0",
"@digitalcredentials/vpqr": "^2.2.1",
7 changes: 6 additions & 1 deletion shim.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { Platform } from 'react-native';
import 'react-native-quick-crypto';
const bi = require('big-integer');
import * as bi from 'big-integer';

// Used in @digitalcredentials/vc-status-list
import { Buffer } from '@craftzdog/react-native-buffer';

import * as ExpoCrypto from 'expo-crypto';

// eslint-disable-next-line no-undef
global.crypto = {};
// eslint-disable-next-line no-undef
global.Buffer = Buffer;

const subtle = {
digest: (algorithm, data)=>{