Skip to content

Commit

Permalink
fix genMockPassportData.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
remicolin committed Jan 2, 2025
1 parent 9973af2 commit 688c12a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/tests/genMockPassportData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ function verify(passportData: PassportData): boolean {
const signature = Buffer.from(encryptedDigest).toString('binary');

if (signatureAlgorithm === 'rsapss') {
const saltLenght = (publicKeyDetails as PublicKeyDetailsRSAPSS).saltLength;
const pss = forge.pss.create({
md: forge.md[hashAlgorithm].create(),
mgf: forge.mgf.mgf1.create(forge.md[hashAlgorithm].create()),
saltLength: saltLenght,
saltLength: parseInt((publicKeyDetails as PublicKeyDetailsRSAPSS).saltLength),
});
return publicKey.verify(md.digest().bytes(), signature, pss);
} else {
return publicKey.verify(md.digest().bytes(), signature);
}

}
}

Expand Down

0 comments on commit 688c12a

Please sign in to comment.