Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messagePaul 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"
Post Follow-up to this messageI 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.