Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Issue with Generating Digital Signature Using Private Key
Hello,
I am currently facing an issue while attempting to generate a digital signature using a private key that is attached to a certificate. I have been using the following code snippet successfully for some time:
var signer = cert.createSigner({
certId: certId,
algorithm: cert.HashAlg.SHA256,
});
signer.update(hashedInvoice);
var digitalSignature = signer.sign();
However, suddenly the process stopped working and I am encountering the following error message:
{
"type": "error.SuiteScriptError",
"name": "SIGNING_ERROR",
"message": "An error has occurred during digital signature generation.",
"id": "",
"stack": [
"createError(N/error)",
"signDocument(/SuiteScripts/_az_einv_sa_testsignature.js:57)",
"afterSubmit(/SuiteScripts/_az_einv_sa_testsignature.js:9)"