Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Getting rsa key and x509 cert into keystore
I would like to create an RSA key pair and an X509 cert and store both
of them in a JCA/JCE Key Store in Java2 SDK 1_4_2. I intend to use
them in another program to sign and encrypt xml documents.

I have figured out how to generate the RSA key pair using the
java.security package but I can't see any way to use it to create the
X509 cert.

Optionally, I can create the key pair and cert using openssl. Then I
can see how to import the cert from a file but not how to import the
RSA key pair from a file.

Sort of a catch22 here. I must be missing something very basic. Can
someone give me some guidance or point me to the correct place in any
documentation.

Thanks,
Paul

Report this thread to moderator Post Follow-up to this message
Old Post
Paul
09-23-04 08:59 PM


Re: Getting rsa key and x509 cert into keystore
Paul wrote:

> I would like to create an RSA key pair and an X509 cert and store both
> of them in a JCA/JCE Key Store in Java2 SDK 1_4_2. I intend to use
> them in another program to sign and encrypt xml documents.
>
> I have figured out how to generate the RSA key pair using the
> java.security package but I can't see any way to use it to create the
> X509 cert.
>
> Optionally, I can create the key pair and cert using openssl. Then I
> can see how to import the cert from a file but not how to import the
> RSA key pair from a file.
>
> Sort of a catch22 here. I must be missing something very basic. Can
> someone give me some guidance or point me to the correct place in any
> documentation.
>
> Thanks,
> Paul

Use the KeyTool that comes as part of the Java SDK (possibly also the
JRE) to create your X.509 cert

Rogan
--
Rogan Dawes

*ALL* messages to discard@dawes.za.net will be dropped, and added
to my blacklist. Please respond to "nntp AT dawes DOT za DOT net"

Report this thread to moderator Post Follow-up to this message
Old Post
Rogan Dawes
10-04-04 02:09 PM


Re: Getting rsa key and x509 cert into keystore
I am using JDKPKCS12KeyStore from bouncy Castle
and for me it works fine

http://www.bouncycastle.org/docs/docs1.4/index.html

KeyStore ks = KeyStore.getInstance("PKCS12");
should create it.

Hope it helps

Paul wrote:
> I would like to create an RSA key pair and an X509 cert and store both
> of them in a JCA/JCE Key Store in Java2 SDK 1_4_2. I intend to use
> them in another program to sign and encrypt xml documents.
>
> I have figured out how to generate the RSA key pair using the
> java.security package but I can't see any way to use it to create the
> X509 cert.
>
> Optionally, I can create the key pair and cert using openssl. Then I
> can see how to import the cert from a file but not how to import the
> RSA key pair from a file.
>
> Sort of a catch22 here. I must be missing something very basic. Can
> someone give me some guidance or point me to the correct place in any
> documentation.
>
> Thanks,
> Paul

Report this thread to moderator Post Follow-up to this message
Old Post
Sebastian Hentschel
12-15-04 09:00 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Security archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:25 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.