eu.xtreemos.xosd.vo.rca.client
Class RCAClientProcessor

java.lang.Object
  extended by eu.xtreemos.xosd.vo.rca.client.RCAClientProcessor

public class RCAClientProcessor
extends java.lang.Object

The class that implements the processing done by the Resourse Certification Authority client. This includes generation of a new machine's identity certificate public and private key.

Author:
matej.artac@xlab.si

Field Summary
protected  java.security.cert.X509Certificate cdaCert
           
static java.lang.String cipher
           
 java.lang.String COMMA
           
(package private) static org.apache.log4j.Logger logger
           
static java.lang.String pemWriterAlgorithm
           
 
Constructor Summary
RCAClientProcessor(java.lang.String cdaCertFile)
           
 
Method Summary
 org.bouncycastle.jce.PKCS10CertificationRequest createCertRequest(java.security.KeyPair keyPair)
           
 java.security.KeyPair generateKeyPair(int keylen)
           
 void init(java.lang.String cdaCertFile)
           
 void saveCertificate(org.bouncycastle.x509.X509AttributeCertificate cert, java.lang.String fileName)
           
 void saveCertificate(java.security.cert.X509Certificate cert, java.lang.String fileName)
           
 void savePrivateKey(java.security.PrivateKey key, char[] passphrase, java.lang.String keyFileName)
           
 boolean verifyCertificate(java.security.cert.X509Certificate cert)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger

cipher

public static java.lang.String cipher

pemWriterAlgorithm

public static java.lang.String pemWriterAlgorithm

COMMA

public final java.lang.String COMMA
See Also:
Constant Field Values

cdaCert

protected java.security.cert.X509Certificate cdaCert
Constructor Detail

RCAClientProcessor

public RCAClientProcessor(java.lang.String cdaCertFile)
                   throws java.io.IOException,
                          java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException
Method Detail

init

public void init(java.lang.String cdaCertFile)
          throws java.io.IOException,
                 java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException

generateKeyPair

public java.security.KeyPair generateKeyPair(int keylen)
                                      throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

savePrivateKey

public void savePrivateKey(java.security.PrivateKey key,
                           char[] passphrase,
                           java.lang.String keyFileName)
                    throws java.io.IOException,
                           java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException

createCertRequest

public org.bouncycastle.jce.PKCS10CertificationRequest createCertRequest(java.security.KeyPair keyPair)
                                                                  throws java.security.InvalidKeyException,
                                                                         java.security.SignatureException,
                                                                         java.lang.Exception
Throws:
java.security.InvalidKeyException
java.security.SignatureException
java.lang.Exception

verifyCertificate

public boolean verifyCertificate(java.security.cert.X509Certificate cert)

saveCertificate

public void saveCertificate(java.security.cert.X509Certificate cert,
                            java.lang.String fileName)
                     throws java.io.FileNotFoundException,
                            java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

saveCertificate

public void saveCertificate(org.bouncycastle.x509.X509AttributeCertificate cert,
                            java.lang.String fileName)
                     throws java.io.FileNotFoundException,
                            java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException