SignatureSign Microsoft Certificate Store

New Here ,
Feb 18, 2020

Copy link to clipboard

Copied

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

 

TOPICS
Acrobat SDK and JavaScript

Views

27

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

SignatureSign Microsoft Certificate Store

New Here ,
Feb 18, 2020

Copy link to clipboard

Copied

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

 

TOPICS
Acrobat SDK and JavaScript

Views

28

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 18, 2020 0

Have something to add?

Join the conversation