it.sistematica.isharedoc.service.keyring
Interface CertificateService

All Known Implementing Classes:
CertificateServiceImpl

public interface CertificateService

The Interface CertificateService.


Field Summary
static java.math.BigInteger CA_CERT_SERIAL
          The Constant CA_CERT_SERIAL.
 
Method Summary
 java.io.InputStream generateCACRL()
          Generate cacrl.
 void generateCAKeyStoreAndCertificate()
          Generate ca key store and certificate.
 Certificate generateUserCertificate(it.neverworks.security.User user, java.security.PublicKey userPublicKey, org.bouncycastle.asn1.x509.KeyUsage keyUsage)
          Generate user certificate.
 java.security.KeyStore getIsharedocCAKeyStore()
          Gets the isharedoc ca key store.
 java.security.PrivateKey getIsharedocCAPrivateKey(java.security.KeyStore rootKeyStore)
          Gets the isharedoc ca private key.
 Certificate getIsharedocCAX509Certificate()
          Gets the isharedoc ca x509 certificate.
 java.security.cert.X509Certificate getIsharedocCAX509Certificate(java.security.KeyStore rootKeyStore)
          Gets the isharedoc ca x509 certificate.
 org.bouncycastle.asn1.x509.X509Name getIsharedocCAX509Name()
          Gets the isharedoc ca x509 name.
 org.bouncycastle.asn1.x509.X509Name getUserX509Name(it.neverworks.security.User user)
          Gets the user x509 name.
 void revokeUserCertificate(Certificate userCert, int reason)
          Revoke user certificate.
 

Field Detail

CA_CERT_SERIAL

static final java.math.BigInteger CA_CERT_SERIAL
The Constant CA_CERT_SERIAL.

Method Detail

getIsharedocCAX509Name

org.bouncycastle.asn1.x509.X509Name getIsharedocCAX509Name()
Gets the isharedoc ca x509 name.

Returns:
the isharedoc ca x509 name

getIsharedocCAKeyStore

java.security.KeyStore getIsharedocCAKeyStore()
Gets the isharedoc ca key store.

Returns:
the isharedoc ca key store

getIsharedocCAX509Certificate

java.security.cert.X509Certificate getIsharedocCAX509Certificate(java.security.KeyStore rootKeyStore)
Gets the isharedoc ca x509 certificate.

Parameters:
rootKeyStore - the root key store
Returns:
the isharedoc ca x509 certificate

getIsharedocCAPrivateKey

java.security.PrivateKey getIsharedocCAPrivateKey(java.security.KeyStore rootKeyStore)
Gets the isharedoc ca private key.

Parameters:
rootKeyStore - the root key store
Returns:
the isharedoc ca private key

getIsharedocCAX509Certificate

Certificate getIsharedocCAX509Certificate()
Gets the isharedoc ca x509 certificate.

Returns:
the isharedoc ca x509 certificate

generateCAKeyStoreAndCertificate

void generateCAKeyStoreAndCertificate()
Generate ca key store and certificate.


generateCACRL

java.io.InputStream generateCACRL()
Generate cacrl.

Returns:
the input stream

getUserX509Name

org.bouncycastle.asn1.x509.X509Name getUserX509Name(it.neverworks.security.User user)
Gets the user x509 name.

Parameters:
user - the user
Returns:
the user x509 name

generateUserCertificate

Certificate generateUserCertificate(it.neverworks.security.User user,
                                    java.security.PublicKey userPublicKey,
                                    org.bouncycastle.asn1.x509.KeyUsage keyUsage)
Generate user certificate.

Parameters:
user - the user
userPublicKey - the user public key
keyUsage - the key usage
Returns:
the certificate

revokeUserCertificate

void revokeUserCertificate(Certificate userCert,
                           int reason)
Revoke user certificate.

Parameters:
userCert - the user cert
reason - the reason