Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   Create certificates using Java (http://www.programmingforums.org/showthread.php?t=11587)

smith.norton Oct 15th, 2006 9:52 AM

Create certificates using Java
 
Can I create a certificate, that is, .cer and .pfx files using Java?

If so, can you please give me names of the classes from where I can start working?

smith.norton Oct 15th, 2006 11:42 AM

please help

Polyphemus_ Oct 15th, 2006 12:57 PM

Be patient, my boy. Find information about the file formats (structure, etcetera). Classes you will need are those to read and write files - probably in binary format, I don't know anything about .cer and .pfx files.

DaWei Oct 15th, 2006 1:24 PM

Starting place.

Arevos Oct 15th, 2006 6:00 PM

DaWei gives a good starting point. Try googling around for keytool and openssl - those are the programs most commonly used for this sort of thing. I'll warn you now, though, it's not an easy or intuitive process, and you can find yourself wondering why the hell your certificate isn't being validated.

Yes, I've had some bad experience with this :)

smith.norton Oct 16th, 2006 5:05 AM

Thank you everyone for replying. Actually, I know the concepts of CA, CA chains, certificates, PKCS #12, etc.

I have also tried to solve my problem with keytool before posting this. With keytool I could generate a self-signed CA certificate. But I couldn't create other certificates (web-site certificate as well as personal certificates for client authentication) signed with this CA certificate. So, I thought I would write my own Java program that would create these CA signed certificates.

I still couldn't figure how to do it using keytool or Java?

Arevos Oct 16th, 2006 6:27 AM

I'd be tempted to use OpenSSL. It's a little more reliable at certificate generation than keytool.

Eoin Oct 16th, 2006 6:37 AM

I second OpenSSL, on windows the prebuilt binaries by Shining Light Productions together with some web resources should be all you need.


All times are GMT -5. The time now is 1:10 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC