-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: PatStLouis <[email protected]>
- Loading branch information
1 parent
f697c16
commit 02e8740
Showing
2 changed files
with
66 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
// /*! | ||
// * Copyright 2023 Digital Bazaar, Inc. | ||
// * SPDX-License-Identifier: BSD-3-Clause | ||
// */ | ||
// import { | ||
// checkDataIntegrityProofFormat | ||
// } from 'data-integrity-test-suite-assertion'; | ||
// import {endpoints} from 'vc-test-suite-implementations'; | ||
// import {getSuiteConfig} from './test-config.js'; | ||
/*! | ||
* Copyright 2023 Digital Bazaar, Inc. | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
import { | ||
checkDataIntegrityProofFormat | ||
} from 'data-integrity-test-suite-assertion'; | ||
import {endpoints} from 'vc-test-suite-implementations'; | ||
import {getSuiteConfig} from './test-config.js'; | ||
|
||
// const {tags} = getSuiteConfig('ecdsa-sd-2023'); | ||
// const {match} = endpoints.filterByTag({ | ||
// tags: [...tags], | ||
// property: 'issuers' | ||
// }); | ||
const {tags} = getSuiteConfig('ecdsa-sd-2023'); | ||
const {match} = endpoints.filterByTag({ | ||
tags: [...tags], | ||
property: 'issuers' | ||
}); | ||
|
||
// checkDataIntegrityProofFormat({ | ||
// implemented: match, | ||
// isEcdsaTests: true, | ||
// testDescription: 'Data Integrity (ecdsa-sd-2023 issuers)', | ||
// cryptosuiteName: 'ecdsa-sd-2023' | ||
// }); | ||
checkDataIntegrityProofFormat({ | ||
implemented: match, | ||
isEcdsaTests: true, | ||
testDescription: 'Data Integrity (ecdsa-sd-2023 issuers)', | ||
cryptosuiteName: 'ecdsa-sd-2023' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
// /*! | ||
// * Copyright 2023-24 Digital Bazaar, Inc. | ||
// * SPDX-License-Identifier: BSD-3-Clause | ||
// */ | ||
// import * as ecdsaSd2023Cryptosuite from | ||
// '@digitalbazaar/ecdsa-sd-2023-cryptosuite'; | ||
// import { | ||
// checkDataIntegrityProofVerifyErrors | ||
// } from 'data-integrity-test-suite-assertion'; | ||
// import {endpoints} from 'vc-test-suite-implementations'; | ||
// import {filterVerifiers} from './helpers.js'; | ||
// import {getMultiKey} from './vc-generator/key-gen.js'; | ||
// import {getSuiteConfig} from './test-config.js'; | ||
/*! | ||
* Copyright 2023-24 Digital Bazaar, Inc. | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
import * as ecdsaSd2023Cryptosuite from | ||
'@digitalbazaar/ecdsa-sd-2023-cryptosuite'; | ||
import { | ||
checkDataIntegrityProofVerifyErrors | ||
} from 'data-integrity-test-suite-assertion'; | ||
import {endpoints} from 'vc-test-suite-implementations'; | ||
import {filterVerifiers} from './helpers.js'; | ||
import {getMultiKey} from './vc-generator/key-gen.js'; | ||
import {getSuiteConfig} from './test-config.js'; | ||
|
||
// const {tags, credentials, vectors} = getSuiteConfig('ecdsa-sd-2023'); | ||
const {tags, credentials, vectors} = getSuiteConfig('ecdsa-sd-2023'); | ||
|
||
// for(const vcVersion of vectors.vcTypes) { | ||
// const key = await getMultiKey({keyType: 'P-256'}); | ||
// const { | ||
// document, | ||
// mandatoryPointers, | ||
// selectivePointers | ||
// } = credentials.verify.subjectHasArrays[vcVersion]; | ||
// const {match} = endpoints.filter({ | ||
// filter: filterVerifiers.bind({ | ||
// vc: { | ||
// version: vcVersion, | ||
// default: '2.0' | ||
// }, | ||
// tags | ||
// }) | ||
// }); | ||
// // options for the DI Verifier Suite | ||
// checkDataIntegrityProofVerifyErrors({ | ||
// implemented: match, | ||
// testDescription: | ||
// `Data Integrity (ecdsa-sd-2023 verifiers) VC ${vcVersion}`, | ||
// testDataOptions: { | ||
// suiteName: 'ecdsa-sd-2023', | ||
// cryptosuite: ecdsaSd2023Cryptosuite, | ||
// key, | ||
// testVector: document, | ||
// mandatoryPointers, | ||
// selectivePointers, | ||
// keyType: 'P-256' | ||
// } | ||
// }); | ||
// } | ||
for(const vcVersion of vectors.vcTypes) { | ||
const key = await getMultiKey({keyType: 'P-256'}); | ||
const { | ||
document, | ||
mandatoryPointers, | ||
selectivePointers | ||
} = credentials.verify.subjectHasArrays[vcVersion]; | ||
const {match} = endpoints.filter({ | ||
filter: filterVerifiers.bind({ | ||
vc: { | ||
version: vcVersion, | ||
default: '2.0' | ||
}, | ||
tags | ||
}) | ||
}); | ||
// options for the DI Verifier Suite | ||
checkDataIntegrityProofVerifyErrors({ | ||
implemented: match, | ||
testDescription: | ||
`Data Integrity (ecdsa-sd-2023 verifiers) VC ${vcVersion}`, | ||
testDataOptions: { | ||
suiteName: 'ecdsa-sd-2023', | ||
cryptosuite: ecdsaSd2023Cryptosuite, | ||
key, | ||
testVector: document, | ||
mandatoryPointers, | ||
selectivePointers, | ||
keyType: 'P-256' | ||
} | ||
}); | ||
} |