Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
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)"