Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Smart card selection for digital signature
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Smart card selection for digital signature

 Post Reply Post Reply
Author
Max View Drop Down
New Member
New Member
Avatar

Joined: 27 Nov 2015
Points: 1
Post Options Post Options   Quote Max Quote  Post ReplyReply Direct Link To This Post Topic: Smart card selection for digital signature
    Posted: 03 Dec 2015 at 4:22pm
Hi to all,

I am mantaining a VB6 Windows application which digitally signs PDF documents by launching a JS file, located in the Javascripts subfolder of Acrobat 9.0. Now my Customer wants to plug another smart card reader to the PC which hosts the application, with its own smart card containing certificates related to a second person who will sign certain type of documents.

My question is: how can I programmatically choose, from my JavaScript code, the smart card reader I want?
In my JavaScript code I do the following:

//Initialize the signature handler
var myEngine = security.getHandler("Adobe.PPKLite");

//Obtain the available certificates
var ids = myEngine.digitalIDs;
var myCerts = ids.certs;

//Find the certificate I want to use to sign
for(var j=0; j<myCerts.length; j++)
{
if(myCerts[j].subjectCN == "SMITH JOHN")
{
oCert = myCerts[j];
break;
}
}

//Log to the signature engine by passing the certificate I want to use to sign //and the slot where the smart card reader containing that certificate is //plugged
myEngine.login( { oParams: { cDIPath: ACROSDK.sigDigitalIDPath,
cPassword: ACROSDK.sigUserPwd,
iSlotID: 1,
oEndUserSignCert: oCert 
} );

//Digitally sign the document with the certificate I chose
sigField.signatureSign({oSig: myEngine,
bUI: false,
oInfo: { password: ACROSDK.sigUserPwd,
location: ACROSDK.sigLocation,
reason: ACROSDK.sigReason,
contactInfo: ACROSDK.sigContactInfo,
appearance: "FirmaRPPR"
}
});

Why do I receive a General Error when executing signatureSign? Which is the correct way to assign the iSlotID parameter when logging to the signature engine or, alternatively, the cTokenLabel parameter?

Thanks in advance for your help and suggestions!
Back to Top
Sponsored Links


Back to Top
paulnevinthomas View Drop Down
New Member
New Member


Joined: 04 Mar 2016
Points: 1
Post Options Post Options   Quote paulnevinthomas Quote  Post ReplyReply Direct Link To This Post Posted: 04 Mar 2016 at 12:04pm
Thanks for accessing the website of the Directorate of Commercial Taxes, West Bengal. Now the dealers registered under West Bengal Value Added Tax Act, 2003 will be provided with the Digital Signature Certificate service in website of the Directorate of Commercial Taxes, West Bengal. However, initially this facility is available only to the Registered Dealers who have been selected for the purpose.You can write a short C program against the PKCS#11 and use C_GetSlotList and C_GetSlotInfoto find out the slot id's and token labels, here is an example of that. It should not be a problem to port that code over to VB. Also there is NCryptoki that you can use to interface the PKCS#11 DLL.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.016 seconds.