From 688c12a1919fe2cc11bea308d65a3b38b39608b5 Mon Sep 17 00:00:00 2001 From: turnoffthiscomputer Date: Thu, 2 Jan 2025 11:58:49 +0100 Subject: [PATCH] fix genMockPassportData.test.ts --- common/tests/genMockPassportData.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/tests/genMockPassportData.test.ts b/common/tests/genMockPassportData.test.ts index ab238c6c..8d876676 100644 --- a/common/tests/genMockPassportData.test.ts +++ b/common/tests/genMockPassportData.test.ts @@ -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); } + } }