This commit is contained in:
Deepak Prabhakara 2022-03-02 21:37:16 +00:00
parent b514f9d4bb
commit b024b30f6e

View File

@ -66,8 +66,9 @@ const hasValidSignature = async (xml: string, certificate: string): Promise<bool
const signed = new SignedXml();
signed.keyInfoProvider = {
file: '',
getKey: function getKey(keyInfo: any) {
return certToPEM(certificate);
return Buffer.from(certToPEM(certificate), 'utf8');
},
getKeyInfo: function getKeyInfo(key: any) {
return '<X509Data></X509Data>';