Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
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)"