File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -419,7 +419,8 @@ async function _verifyOBv3LegacySignature(credential,
419419 * @param {string|Date } [options.now] - A string representing date time in
420420 * ISO 8601 format or an instance of Date. Defaults to current date time.
421421 * @param {number } [options.version = 2.0] - The VC context version to use.
422- * @param {boolean } [options.verify=true]
422+ * @param {boolean } [options.verify=true] - If set to true, throw verification
423+ * errors for individual VCs (such as when the VC is expired, etc).
423424 *
424425 * @throws {TypeError } If verifiableCredential param is missing.
425426 * @throws {Error } If the credential (or the presentation params) are missing
@@ -439,11 +440,15 @@ export function createPresentation({
439440 } ;
440441 if ( verifiableCredential ) {
441442 const credentials = [ ] . concat ( verifiableCredential ) ;
442- // ensure all credentials are valid
443- for ( const credential of credentials ) {
444- _checkCredential (
445- { credential, now, mode : verify ? 'verify' : 'do not force verify' } ) ;
443+
444+ if ( verify ) {
445+ // ensure all credentials are valid and verified
446+ for ( const credential of credentials ) {
447+ _checkCredential (
448+ { credential, now, mode : verify ? 'verify' : 'do not force verify' } ) ;
449+ }
446450 }
451+
447452 presentation . verifiableCredential = credentials ;
448453 }
449454 if ( id ) {
You can’t perform that action at this time.
0 commit comments