eu.xtreemos.xosd.security.rca.client
Class RCAClientProcessor
java.lang.Object
eu.xtreemos.xosd.security.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
|
Method Summary |
org.bouncycastle.jce.PKCS10CertificationRequest |
createCertRequest(java.security.KeyPair keyPair)
|
java.security.KeyPair |
generateKeyPair(int keylen)
|
java.lang.String |
generateVOCertFileName(java.lang.String vo,
boolean v3cert)
|
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)
|
void |
saveVOCertificate(java.security.cert.X509Certificate certificate,
java.lang.String path)
Saves the VO attribute certificate into the given folder. |
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 |
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
RCAClientProcessor
public RCAClientProcessor(java.lang.String cdaCertFile)
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
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
saveVOCertificate
public void saveVOCertificate(java.security.cert.X509Certificate certificate,
java.lang.String path)
throws java.io.FileNotFoundException,
java.io.IOException,
BadAttributeCertificateException
- Saves the VO attribute certificate into the given folder. The file name
of the certificate file is generated depending on the VO information
stored within the certificate.
- Parameters:
certificate
- The certificate containing the attributes of the VO.path
- The path to store the certificate into. The path needs
to exist before calling the method.
- Throws:
java.io.FileNotFoundException
java.io.IOException
BadAttributeCertificateException
generateVOCertFileName
public java.lang.String generateVOCertFileName(java.lang.String vo,
boolean v3cert)