public class CertServiceImpl extends DefaultComponent implements CertService
| Modifier and Type | Field and Description |
|---|---|
protected X509Certificate |
rootCertificate |
protected RootService |
rootService |
lastModified| Constructor and Description |
|---|
CertServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected X509Certificate |
createCertificateFromCSR(org.bouncycastle.jce.PKCS10CertificationRequest csr) |
protected org.bouncycastle.asn1.pkcs.CertificationRequest |
generateCSR(KeyPair keyPair,
UserInfo userInfo) |
protected Date |
getCertEndDate() |
protected X509Certificate |
getCertificate(KeyPair keyPair,
UserInfo userInfo) |
X509Certificate |
getCertificate(KeyStore ks,
String certificateAlias)
Retrieves an existing certificate from a keystore using keystore's certificate alias.
|
String |
getCertificateEmail(X509Certificate certificate)
Extracts the email address from a certificate
|
protected Date |
getCertStartDate() |
KeyPair |
getKeyPair(KeyStore ks,
String keyAlias,
String certAlias,
String keyPassword)
Retrieves existing private and public key from a KeyStore.
|
KeyStore |
getKeyStore(InputStream keystoreIS,
String password)
Retrieves a KeyStore object from a supplied InputStream.
|
X509Certificate |
getRootCertificate()
Retrieves the root certificate.
|
protected RootService |
getRootService() |
KeyStore |
initializeUser(UserInfo userInfo,
String suppliedPassword)
Generates a private key and a public certificate for a user whose X.509 field information was enclosed in a
UserInfo parameter.
|
void |
setRootService(RootService rootService)
Sets up a root service to be used for CA-related services like certificate request signing and certificate
revocation.
|
void |
storeCertificate(KeyStore keystore,
OutputStream os,
String keystorePassword)
Wraps a certificate object into an OutputStream object secured by a keystore password
|
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, registerExtension, setLastModified, setModifiedNow, unregisterContribution, unregisterExtensionprotected RootService rootService
protected X509Certificate rootCertificate
public CertServiceImpl()
public void setRootService(RootService rootService)
CertServicesetRootService in interface CertServiceprotected X509Certificate createCertificateFromCSR(org.bouncycastle.jce.PKCS10CertificationRequest csr) throws CertException
CertExceptionpublic X509Certificate getRootCertificate() throws CertException
CertServicegetRootCertificate in interface CertServiceCertExceptionprotected Date getCertStartDate()
protected Date getCertEndDate()
public KeyStore initializeUser(UserInfo userInfo, String suppliedPassword) throws CertException
CertServiceinitializeUser in interface CertServiceCertExceptionpublic KeyPair getKeyPair(KeyStore ks, String keyAlias, String certAlias, String keyPassword) throws CertException
CertServicegetKeyPair in interface CertServiceCertExceptionpublic X509Certificate getCertificate(KeyStore ks, String certificateAlias) throws CertException
CertServicegetCertificate in interface CertServiceCertExceptionprotected X509Certificate getCertificate(KeyPair keyPair, UserInfo userInfo) throws CertException
CertExceptionprotected org.bouncycastle.asn1.pkcs.CertificationRequest generateCSR(KeyPair keyPair, UserInfo userInfo) throws CertException
CertExceptionpublic KeyStore getKeyStore(InputStream keystoreIS, String password) throws CertException
CertServicegetKeyStore in interface CertServiceCertExceptionpublic String getCertificateEmail(X509Certificate certificate) throws CertException
CertServicegetCertificateEmail in interface CertServiceCertExceptionpublic void storeCertificate(KeyStore keystore, OutputStream os, String keystorePassword) throws CertException
CertServicestoreCertificate in interface CertServiceCertExceptionprotected RootService getRootService() throws CertException
CertExceptionCopyright © 2016 Nuxeo SA. All rights reserved.