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); } + } }