You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Transaction data entry with index 0 is hashed using alg 'random'. However transaction data only allows alg values sha-256.",
229
+
"Transaction data entry with index 0 for presentation two with index 0 is hashed using alg 'random'. However transaction data only allows alg values sha-256.",
"Transaction data entry with index 0 is hashed using unsupported alg 'random'. This library only supports verification of transaction data hashes using alg values sha-256, sha-384, sha-512. Either verify the hashes outside of this library, or limit the allowed alg values to the ones supported by this library.",
270
+
"Transaction data entry with index 0 for presentation two with index 0 is hashed using unsupported alg 'random'. This library only supports verification of transaction data hashes using alg values sha-256, sha-384, sha-512. Either verify the hashes outside of this library, or limit the allowed alg values to the ones supported by this library.",
error_description: `Transaction data entry with index ${entry.transactionDataIndex} is hashed using alg '${alg}'. However transaction data only allows alg values ${allowedAlgs.join(', ')}.`,
error_description: `Transaction data entry with index ${entry.transactionDataIndex} is hashed using unsupported alg '${alg}'. This library only supports verification of transaction data hashes using alg values ${Object.values(HashAlgorithm).join(', ')}. Either verify the hashes outside of this library, or limit the allowed alg values to the ones supported by this library.`,
107
-
})
108
-
}
103
+
if(!allowedAlgs.includes(alg)){
104
+
thrownewOauth2ServerErrorResponseError({
105
+
error: Oauth2ErrorCodes.InvalidTransactionData,
106
+
error_description: `Transaction data entry with index ${entry.transactionDataIndex} for presentation ${credentialId} with index ${presentationIndex} is hashed using alg '${alg}'. However transaction data only allows alg values ${allowedAlgs.join(', ')}.`,
107
+
})
108
+
}
109
+
110
+
if(!hash){
111
+
// This is an error of this library.
112
+
thrownewOauth2ServerErrorResponseError({
113
+
error: Oauth2ErrorCodes.InvalidTransactionData,
114
+
error_description: `Transaction data entry with index ${entry.transactionDataIndex} for presentation ${credentialId} with index ${presentationIndex} is hashed using unsupported alg '${alg}'. This library only supports verification of transaction data hashes using alg values ${Object.values(HashAlgorithm).join(', ')}. Either verify the hashes outside of this library, or limit the allowed alg values to the ones supported by this library.`,
error_description: `Transaction data entry with index ${entry.transactionDataIndex} for presentation ${credentialId} with index ${presentationIndex} does not have a matching hash in the transaction_data_hashes`,
0 commit comments