How to sign  PDF with a smart card or USB token in C# through IAC ?

Hi,
My goal is to apply a certification signature (MDP) to a PDF document with a smart card (Belgium identity card) from a C# application.
I start Acrobat through IAC.
The JavaScript object apparently can only sign with PKCS12 file (.pfx)...
To sign a PDF with a smart card I need to develop a plug-in if I am right?
The samples in the SDK are to get a certificate from the windows certificate store or to write a Third party handler.
I already get the certificate context (an HCRYPPROV object from windows certificate store)
How can I create a signature field but mostly sign it? With DigSig I guess, but I’m lost in the API… does
I have to use DigSigSignDoc ?
Syntax : void DigSigSignDoc(PDDoc pdDoc, CosObj sigField, ASAtom filterKey)
The filterKey value for the windows certificate store is “Adobe.PPKMS” but how can I choose my certificate?
I also have to build a signature reference dictionary i guess?
What does i have to do and in which order? I can't find any documentation on this.
There is a more simple way?
Thank you,
Goffin
Fabian

Hi,
-download the JDK sample "sdkAddSignature.js"
-change the sign methode like this :
Sign = app.trustedFunction (
    function( sigField, DigSigHandlerName )
   try {
   app.beginPriv();
   //the diSigHandler is "Adobe.PPKLite"
   var myEngine = security.getHandler(DigSigHandlerName);
   var ids = myEngine.digitalIDs;
   //choose an id which is installed in the microsoft store
  var oCert = ids.certs[3];
  // for (var i=0; i<ids.certs.length; i++)
  //  console.println("certificat n°"+ i + " " +ids.certs[i]);
  var oParams = {cPassword:"0000" , oEndUserSignCert:oCert }
  if(myEngine.login({cPassword:"0000",oParams:oParams,bUI:false}))
   console.println("OK");
  else
   console.println("Error");
  console.println("sigfield :" + sigField);
sigField.signatureSign({oSig: myEngine,oInfo: { password: "0000",reason: ACROSDK.sigReason,location: ACROSDK.sigLocation,contactInfo: ACROSDK.sigContactInfo}}); 
app.endPriv
   } catch (e) {
   console.println("An error occurred: " + e);
-perform some test using the javascript debugger
-and finally use IAC to execute the script

Similar Messages

  • How do i get on my apple account on the desktop without signing up with a credit card or Itunes card, i already have an account it just won't let me sign in without giving the desktop version a credit card

    How do i get on my apple account on the desktop without signing up with a credit card or Itunes card, i already have an account it just won't let me sign in without giving the desktop version a credit card

    SEARCH!
    http://lmgtfy.com/?q=itunes+account+without+credit+card

  • How to create PDF with Form Builder (T-Code:SPF) and how to use it?

    How to create PDF with Form Builder (T-Code:SPF) and how to use it? Is there anyone can show me some doc. or PA material ? << removed >>  Thank you very much!!
    Edited by: Rob Burbank on Nov 11, 2010 1:04 PM

    PDF forms also known as Adobe From or Interactive Forms.
    Check this link -
    Interactive Forms
    REG:ADOBE FORM
    Adobe forms
    Regards,
    Amit

  • Compression with Java/Smart Cards

    I am a Software Development Student. I am currently researching the area of data ZIP compression in conjunction with Java/Smart cards. Just wondering if anyone has come across a similar project and if so where?
    Thanks.

    We can't deal with real compression, as you known the jcvm is composed of the converter and the jcre
    the compression is related to the converter.jar
    There are many ways to produce compressed code compared to an original not optimisez code.
    Real comresion is not really possible on a such support, the processor is not enought fast. In my mind, the only compression possible can be the rle. Not very brilliant if it is not used for images...
    (sorry for my english writting...)

  • Why unable to sign PDF with certificate after applying Nitro PDF password protection? (despite it explicitly allowing signing with certificates)

    I used Adobe Reader XI to sign PDFs with certificate, which worked perfectly. Except that the PDF could still be edited by other programs (for example, Nitro PDF) after the signing (but not the fill out fields and the signature). To apply password protection makes sense to avoid changes in the PDF being made after it has been signed. So I applied password protection via Nitro PDF that allows only enter fill-out fields and signing. But when I open it with Adobe Reader, the filling out works fine, but the signing part is not available to click on it (all of the buttons under "Sign" tab are grey). When I go on the Security properties with Adobe Reader, I can explicitly see that signing of this PDF is allowed and yet the option is not open to use for me anymore.
    Any ideas on why it is the case and what I could do about that?
    Many thanks!
    O.

    Actually yes, I just asked my colleague to assist me with this, he password-protected the PDF with Acrobat 8, explicitly allowing for signing and fill-out functions, it also appears in Adobe Reader under security properties as "allowed", but it is not open to use in the Reader for me anymore (grey buttons).

  • Do I have to sign up with a credit card just to listen to iTunes radio?

    Do I have to sign up with a credit card just to listen to iTunes radio?

    To my knowledge, no, but you do need an iTunes Store account and that requires either a payment method or that you follow a precise procedure. Take a look here:
    http://support.apple.com/kb/HT2534
    Read the steps carefully as the order in which you follow them is  critical. Note that you can do this only when creating a new Apple ID. You cannot use an existing ID. 
    You will of course not be able to get anything other than the ad-supported version of iTunes Radio or the free apps without entering in some sort of payment method (credit card, prepaid iTunes card, gift certificate, etc.)
    Regards.

  • How to sign in with different apple id

    how to sign in with different apple id?

    I would also caution you to make sure that you understand the implications of signing in with another Apple ID. If you changed your Apple ID, go to Settings>iTunes & App Store>Apple ID. Tap the old ID and sign out, then sign in with the new ID. Read this as well.
    What to do after you change your Apple ID email address or password - Apple Support
    If you want to sign into another Apple ID so that you can download purchased content with that other ID without paying for it, that will lock you out of your own ID for 90 days. Read this for more information.
    Manage your associated devices in iTunes - Apple Support

  • 41N3004 compatibility with v2 smart cards

    Hello,
    Can someone let me know if 41N3004 is compatible with V2 smart cards. Not sure if V2 smart cards are ISO 7816 complaint.
    Thanks, Anand

    I don't know off the top of my head however this article may answer:
    About the SD and SDXC card slot - Apple Support

  • My iphoto on my MacBook Pro will not let me import my photos from my canon t3i. It is blurred over both import all, and import selected showing that I cant choose those options. I've tried with the memory card and usb cord. Please help!

    My iphoto on my MacBook Pro will not let me import my photos from my canon t3i. It is blurred over both import all, and import selected showing that I cant choose those options. I've tried with the memory card and usb cord. Please help!

    What version of iPhoto?
    Can you access the images with Image Capture (in your Applications Folder) ?

  • Form edit a signed pdf with Acrobat X

    I would like to know how to convert an already signed pdf into a form and add more fields to it, please.
    I know Acrobat 9 can do this, but X cannot.

    I'm afraid so. My best bet is to pdf-print it and insert fields again. The problem with this is that whatever other field/bookmark gets lost.
    I find this puzzling because Acrobat 9 allows playing more with the fields, and if doubt arrises, then you can always highlight the fields. Anyhow, thanks for the reply and I hope the guys at Adobe get something effective for every instance.
    cheers,
    Alex

  • Logon with Virtual Smart Card Breaks Run As Administrator

    I've been testing the Virtual Smart Card (VSC) capability on a Surface Pro 2 and Dell Latitude E7240.
    This may be by design however, I have noticed that if I login using the VSC I am unable to use "Run As Administrator" functionality - for example:
    Command Prompt from Start Screen
    Task Manager
    I'm prompted for a username / password or the VSC PIN.
    In my environment the Administrative user does not have a VSC, so it is a username/password. When using Run As Administrator I'm therefore always entering a username and password.
    Once the credentials are entered the prompt goes away but the application never runs.
    If I lock/unlock the session and login using username/password for the non-admin user, instead of the VSC and PIN, I am able to elevate using Run As.
    I have noticed that I can use the workaround as specified in this article:
    http://support.microsoft.com/kb/2013976
    To work around this issue, start the application using the Run as different user right-click context menu option and select the smart card reader of choice.
    Click Start, select Programs, and locate the shortcut item in the Programs menu or the application folder for the application you want to run
    Hold down the SHIFT key while you right-click the shortcut item, and select Run as different user.
    Enter the username, password and the domain name or choose a smart card logon.
    Seems a little odd... maybe I am missing something. If anyone can assist that would be great.
    Thanks, Chris
    MCTS 70-640 | MCTS 70-642 | Prince2 Practitioner| ITIL Foundation v3 | http://www.cb-net.co.uk

    Hi Chris,
    I also have this issue. I think it is a known issue for Windows.
    I did some more research in web and found what I was looking for.
    RUNAS /SMARTCARD Only Supports a Single Smart Card Reader
    http://support.microsoft.com/kb/2013976
    How Smart Card Logon Works in Windows
    http://technet.microsoft.com/en-us/library/ff404285(v=WS.10).aspx
    Guidelines for enabling smart card logon with third-party certification authorities
    http://support.microsoft.com/kb/281245
    Thanks

  • Create and sign PDF with IAC?

    Hello, does anybody know, how to create simple PDF and sign it with X509Certificate from .NET managed application? It seems to me, that it is not possible with Acrobat Interapplication Communication API. Do I really need LiveCycle for this operation?
    Thank you for help.

    When you say "create", do you really mean "convert some other format to PDF" or did you want to start with a blank page and then do things like "draw string", "draw line", etc?
    Will this be a desktop or server-based application?

  • How to load .cap on a smart card

    Hi everybody!
    I am very confused with java cards. I wrote an applet for java card. Tried it in Eclipse+JCWDE. Send some APDUs to it with apdutool.bat. Works fine!
    However, I want to go further and try it on a real smart card. The only problem is I do not know how to load .cap file onto my card. I tried to find some forums, references or something like that, but all I found was "I tried to load, but get error" or something like that.
    I use JCOP tool for Eclipse (if that to any help)
    Can someone explaine to me how loading works in princip? Is their any classes that can be used to simplify the task?
    Any help is appreciated
    /L

    Yes, of course. Absolutely normal .zip file.
    I can print the content of file load.jcsh here:
    # /set-var path d:/Wi-Fi/javacard/download/eappsk32k
    #Switch trace mode on and connect to a PC/SC smart card reader
    /mode trace=on
    /terminal
    #Reset the card (request ATR) and select the CardManager
    /card
    #Set the keys in key set 255 of the JCShell for authentication later on
    set-key 255/1/DES-ECB/404142434445464748494A4B4C4D4E4F
    set-key 255/2/DES-ECB/404142434445464748494A4B4C4D4E4F
    set-key 255/3/DES-ECB/404142434445464748494A4B4C4D4E4F
    #Begin authentication using the appropriate key set
    init-update 255
    #Complete authentication
    ext-auth
    #Display the card registry to check if the applet is loaded and installed
    card-info
    #delete 11223344556601
    #delete 112233445566
    card-info
    #Upload the package holding the applet
    upload ${path}openeapsmartcard.cap
    #Install the applet in the package
    install 112233445566 11223344556601
    #Display the card registry to check if the applet is loaded and installed
    card-info You should make some substitutes for your project.

  • HT2731 how to sign in with apple store without filling payment information

    how to sign in apple store without filling payment information

    There are instructions on this page for how to create an account without giving a credit card number : http://support.apple.com/kb/HT2534 i.e. select a free app and create an account when 'buying' it.

  • Programming multiple smart cards with multiple smart card readers in a PC causes a PCSCException in a smart card that is in progress

    Hi,
    I develop a Java code using smartcardio API to program a smart card. My GUI allows to add at most 5 smart card readers that will wait for card present, then do authentication and program the smart card with an application, then wait for card removal. This is a separate thread running in a loop for each smart card reader added as programmer.
    The problem occurs when a certain smart card is in progress and I inserted another smart card to another smart card reader.  Both smart card reader halts and throw sun.security.smartcardio.PCSCException: Unknown error 0x8010002f.
    I also observed that every time there is an attempt to insert/remove a smart card in the smart card reader that is connected to the USB port would cause the programming in progress to be interrupted and throw the PCSCException.
    These are some exceptions I got during my testing:
    sun.security.smartcardio.PCSCException: Unknown error 0x8010002f
      at sun.security.smartcardio.PCSC.SCardTransmit(Native Method)
      at sun.security.smartcardio.ChannelImpl.doTransmit(ChannelImpl.java:171)
    java.lang.Exception: Loader Record Failed: 6E | 0 //Sometimes I got this return code SW1 0x6E SW2 0x00 which means an APDU with an invalid 'CLA' bytes was received. I had check the command before it was sent and it was correct.
    Help me understand this issue. I think the CardTerminal.isCardPresent(), CardTerminal.waitForCardPresent(0), and CardTerminal.waitForCardAbsent(0) cause this issue that CardChannel.transmit(apduCommand) is interrupted or the smart card insertion/removal causes the CardChannel.transmit(apduCommand) is interrupted.
    Regards,
    Knivez

    Hi,
    when you work with one smartcard reader only usually you address the slot -1 that means "the first found".
    But to deal with multiple readers you have to use slots of course since one reader will be slot 0, next reader will be slot 1 and so on...
    So a credential object will be identified on a system by a couple
    <slot,alias>
    After that, the way to address slots (I mean the syntax) depends on the classes you are using...
    Bye

Maybe you are looking for

  • Satellite C660 - need help with fresh Win7 installation

    After a problem with my SatC 660 i decided to Nuke the hard drive and do a fresh install using a W7 32 Bit disk created from the web ( there is a free library of Windows 7 iso images (Sorry forgot name). So i had the disk in and the disk drive which

  • Attachment can't be opened in Acrobat

    I'm using the Adobe PDF library to add an attachment to a document that already has attachments, so I add 2 new entries (for the name and for the embedded file) to the end of the /Names array under /EmbeddedFiles. When I save out the PDF and open it

  • Read from Scanner

    Hi friends... I want to build a document archiving system, My system should read an Image from Scanner and then save it on a file server, any one have an idea.. where I should go? thanx in advance

  • Negative margins

    We have had a new website produced and being tested at http://opie.monkeyshrine.com/ Firstly any comments of any kind warmly welcomed. More importantly there is a bug with the coding, as suggested in the title, due to the negative margins used in the

  • Is is okay to run R12 rapidwiz with upgrade option when 11i instance is up?

    Hello, Is it okay to run R12 rapidwiz with option "Upgrade oracle applications" while 11i DB/Apps are up and functional which is to lay down the R12 applications code tree as part of R12 pre-upgrade steps? Can you please clarify if running R12 Rapidw