Using JDK 1.2 Final Release...Generating Certificate Sigining

Tony Kinnis (kinnist@rapidobject.com)
Thu, 04 Feb 1999 17:50:34 -0600

Date: Thu, 04 Feb 1999 17:50:34 -0600
From: Tony Kinnis <kinnist@rapidobject.com>
To: java-security@java.sun.com
Subject: Using JDK 1.2 Final Release...Generating Certificate Sigining

Hello,

USING JDK 1.2 Final Release

I have been searching for weeks for a way to generate a Certificate
Signing Request (CSR) for and X509 v3 certificate. I know that the
keytool does this, but I need to do it inside my source code, i.e. via
some API....Or at least I think I do. Since I am not sure what platforms
my application will run on I am skeptical about using the
java.lang.Runtime.exec() to generate the CSR from my application by
executing the keytool app. with the parameters needed to generate the
CSR. I have been able to utilize the keystore database for all other
areas of my application with the exception of this one. Please help.

P.S. I am also having a problem in verifying a certificate issued to me
using the CA's root certificate...Here is the code and the error that is
generated...

try
{
x509cert.verify(RootCert.getPublicKey());
}
catch(InvalidKeyException ike)
{
Errmsg = "Not a trusted certificate.";
return false;
}

Error : java.security.NoSuchAlgorithmException: Signature not available

Please help.

Thanks Tony