Solved

Code Signing *.jars using DoD PKI Hard token

Posted on 2012-12-28
1
1,894 Views
Last Modified: 2013-01-05
I am at my wits end and will try Experts Exchange for once. Is there any guidance on how to code sign *.jar files using DoD PKI hard card.  The Code Signing certificate is embedded in the card once I get it, however, how do I use the card to sign my *.jar files?
0
Comment
Question by:raychamp
1 Comment
 
LVL 61

Accepted Solution

by:
btan earned 500 total points
ID: 38728828
maybe of interest - see "Java Keystore". it uses jarsigner and pfx to sign .jar file. however, CAC (or smart card) is not supposed to have private key exported hence you will not have pfx.  

http://www.ewert-technologies.ca/blog/articles/cross-platform-code-signing

challenge is how to create and link the keystore used for signing to CAC.
there is an old article series (see pg1,2 and 3)  on smart card in general using pkcs#11 which you should take a look first for general smartcard

Pg1-http://www.developer.com/java/other/article.php/3587361/Java-Applet-for-Signing-with-a-Smart-Card.htm
Pg2-http://www.developer.com/java/other/article.php/10936_3587361_2/Java-Applet-for-Signing-with-a-Smart-Card.htm
pg3-http://www.developer.com/java/other/article.php/10936_3587361_3/Java-Applet-for-Signing-with-a-Smart-Card.htm

Specifically the pkcs#11 is using Sun java library seems to be the common way for java. Closest I can find for such java codes (2 links) to CAC are stated below which can be useful ref.

//Create our certificates from our CAC Card
         String configName = "card.config";
         Provider p = new sun.security.pkcs11.SunPKCS11(configName);
         Security.addProvider(p);

http://stackoverflow.com/questions/752890/how-to-connect-to-https-server-using-common-access-card/753129#753129

http://stackoverflow.com/questions/544056/common-access-card-cac-authentication-using-java

You can check this out this section "Signing and Verification with the On-Card Certificate" for the signing as well, but it will be rather similar as above (pg1-3) links

http://rostislav-matl.blogspot.sg/2012/04/using-smart-card-as-keystore-in-java.html

Hope it helps...Personally never done that ....
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now