cgl.narada.service.security.securityprovider
Class CertificateSigner

java.lang.Object
  extended by cgl.narada.service.security.securityprovider.CertificateSigner

public class CertificateSigner
extends Object

Certificate Signing Utility class.
Acknowledgement: Part of the jCertServices package

A Class to sign certificate requests. It uses the Legion of The Boucy Castle JCE provider (jce-jdk13-117.jar) available at http://www.bouncycastle.org/


Constructor Summary
CertificateSigner()
           
 
Method Summary
static void save(X509Certificate _signedCert, OutputStream os)
          Save a signed certificate (PEM encoded)
static X509Certificate signCertificate(CertificateManager certMan, InputStream inCertRq, String caPwd)
          Signs a Cert request (CSR)
static X509Certificate signCertificate(CertificateManager certMan, String certRqPath, String caPwd)
          CertSigner Constructor: Reads a cert request and signs it with a set of CA certs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CertificateSigner

public CertificateSigner()
Method Detail

signCertificate

public static X509Certificate signCertificate(CertificateManager certMan,
                                              String certRqPath,
                                              String caPwd)
                                       throws Exception
CertSigner Constructor: Reads a cert request and signs it with a set of CA certs

Parameters:
certRqPath - Full path to the CSR (Cert request)
caCertPath - Full path to the CA cert (PEM)
caKeyPath - Full path to the CA key (PEM)
caPwd - CA password
Throws:
IOException
NoSuchAlgorithmException
NoSuchProviderException
InvalidKeyException
GeneralSecurityException
Exception

signCertificate

public static X509Certificate signCertificate(CertificateManager certMan,
                                              InputStream inCertRq,
                                              String caPwd)
                                       throws Exception
Signs a Cert request (CSR)

Parameters:
inCertRq - CSR Input stream
caPwd - CA password
Throws:
IOException
NoSuchAlgorithmException
NoSuchProviderException
InvalidKeyException
GeneralSecurityException
Exception

save

public static void save(X509Certificate _signedCert,
                        OutputStream os)
                 throws IOException,
                        CertificateEncodingException
Save a signed certificate (PEM encoded)

Parameters:
os - Stream where the cert is to be saved
Throws:
IOException - if a save error occurs
CertificateEncodingException - if a PEM encoding error occurs


For comments and suggestions please send e-mail to The NaradaBrokering Project