Skip to main content
Participant
February 18, 2020
Question

SignatureSign Microsoft Certificate Store

  • February 18, 2020
  • 0 replies
  • 231 views

Hi,

 

We have a java script function that signs a document from a pfx file.  This uses the signatureSign method.  It works using a .pfx file at the moment.  We are about to purchase a USB token device to sign documents.  This does not have a .pfx file and will import the signature into the Microsft Certificate Store.  I cannot find any examples of using the SignatureSign method with the Microsoft Certificate Store only with a .pfx file.  I have spoken to various people and they all seem to think it is possible, but do not know how to do it themseleves.

 

How do I use the signatureSign method to sign from the certificate store or if you know another way to do it how do you do that?

 

The code below is for the Pfx file.  It is a function in the javascript folder that you pass the signatures password and pfx file location to and it signs.

 

DATL_SignFunc = app.trustedFunction( function (nPwd, nSigLoc, nAppearance)
{

// Additional code may appear above
app.beginPriv(); // Explicitly raise privilege
var myEngine = security.getHandler( "Adobe.PPKLite" );
myEngine.login( nPwd, nSigLoc );

b = this.addField("DATL_Sign", "signature", 0, [52, 172, 205, 150]);
b.required = true;
b.userName = "DATL_Sign";
b.signatureSign( myEngine,
{password: nPwd,// provide password
reason: "I am approving this document",
appearance: nAppearance});
app.endPriv();
// Additional code may appear below.

})

 

Darryl

 

This topic has been closed for replies.