![]() |
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? |
please help
|
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 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 :) |
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? |
I'd be tempted to use OpenSSL. It's a little more reliable at certificate generation than keytool.
|
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