|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.Service | +--com.rsa.certj.DatabaseService
This class represents a database service. All the database APIs,
such as insertCertificate
and
selectCertificateBySubject
are defined
as methods for this class. Create an object
of this class to perform database operations. The
bindService
method in the CertJ
class
creates an object of this class.
See Also
CertJ.bindService(int, java.lang.String)
Constructor Summary |
|
DatabaseService(CertJ certJ)
Constructs a |
Method Summary |
|
void |
deleteCertificate(X500Name issuerName,
byte[] serialNumber)
Deletes the certificate identified by the issuer name issuerName and serial number serialNumber from any databases bound to this object. |
void |
deleteCRL(X500Name issuerName,
Date lastUpdate)
Deletes the CRL identified by the specified issuerName and lastUpdate from any databases bound to this object. |
void |
deletePrivateKeyByCertificate(Certificate cert)
Deletes the private key identified by the specified cert from any database bound to this object. |
void |
deletePrivateKeyByPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey)
Deletes the private key identified by the specified matching public key publicKey from any databases bound to this object. |
firstCertificate()
Retrieves the first certificate from any databases bound to this object. |
|
firstCRL()
Retrieves the first CRL from any databases bound to this object. |
|
com.rsa.jsafe.JSAFE_PrivateKey |
firstPrivateKey()
Retrieves the first private key from any databases bound to this object. |
boolean |
hasMoreCertificates()
Indicates whether any more certificates are available. |
boolean |
hasMoreCRLs()
Indicates whether any more CRLs are available. |
boolean |
hasMorePrivateKeys()
Indicates whether any more private keys are available. |
void |
insertCertificate(Certificate cert)
Inserts cert into any databases bound to this object. |
void |
insertCertificates(Certificate[] certs)
Inserts certs into any databases bound to this object. |
void |
insertCRL(CRL crl)
Inserts crl into any databases bound to this object. |
void |
insertCRLs(CRL[] crls)
Inserts crls into any databases bound to this object. |
void |
insertPrivateKeyByCertificate(Certificate cert,
com.rsa.jsafe.JSAFE_PrivateKey privateKey)
Inserts privateKey into any databases bound to this object using cert as a key. |
void |
insertPrivateKeyByPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey,
com.rsa.jsafe.JSAFE_PrivateKey privateKey)
Inserts privateKey into any databases bound to this object using publicKey as a key. |
nextCertificate()
Retrieves the next certificate from any databases bound to this object. |
|
nextCRL()
Retrieves the next CRL from any databases bound to this object. |
|
com.rsa.jsafe.JSAFE_PrivateKey |
nextPrivateKey()
Retrieves the next private key from any databases bound to this object. |
int |
selectCertificateByExtensions(X500Name baseName,
X509V3Extensions extensions,
Vector certList)
Retrieves one or more certificates identified by the specified extensions and baseName from any databases bound to this object and adds a copy of each matching certificate to the certList. |
int |
selectCertificateByIssuerAndSerialNumber(X500Name issuerName,
byte[] serialNumber,
Vector certList)
Retrieves the certificate identified by the specified issuerName and serialNumber from the database(s) bound to this object and adds a copy of it to the certList. |
int |
selectCertificateBySubject(X500Name subjectName,
Vector certList)
Retrieves one or more certificates identified by the specified subjectName from any databases bound to this object and adds a copy of each matching certificate to the certList. |
int |
selectCRLByIssuerAndTime(X500Name issuerName,
Date time,
Vector crlList)
Retrieves the CRL identified by the specified issuerName and time from any databases bound to this object and adds a copy of the matching CRL to the crlList. |
com.rsa.jsafe.JSAFE_PrivateKey |
selectPrivateKeyByCertificate(Certificate cert)
Retrieves the private key identified by cert from any databases bound to this object. |
com.rsa.jsafe.JSAFE_PrivateKey |
selectPrivateKeyByPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey)
Retrieves the private key identified by the matching public key publicKey from any databases bound to this object. |
Methods inherited from class com.rsa.certj.Service |
getInstance, listProviderNames, toString, unbind |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DatabaseService(CertJ certJ)
DatabaseService
object for
certJ.Parameters
certJ | The |
Method Detail |
public void insertCertificate(Certificate cert) throws NoServiceException, DatabaseException
Parameters
cert | A |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public void insertCertificates(Certificate[] certs) throws NoServiceException, DatabaseException
Parameters
certs | An array of |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public void insertCRL(CRL crl) throws NoServiceException, DatabaseException
Parameters
crl | A |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public void insertCRLs(CRL[] crls) throws NoServiceException, DatabaseException
Parameters
crls | An array of |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public void insertPrivateKeyByCertificate(Certificate cert, com.rsa.jsafe.JSAFE_PrivateKey privateKey) throws NoServiceException, DatabaseException
Parameters
cert | A | ||
key | A |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.See Also
insertPrivateKeyByPublicKey(com.rsa.jsafe.JSAFE_PublicKey, com.rsa.jsafe.JSAFE_PrivateKey)
public void insertPrivateKeyByPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey, com.rsa.jsafe.JSAFE_PrivateKey privateKey) throws NoServiceException, DatabaseException
Parameters
publicKey | A | ||
privateKey | A |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.See Also
insertPrivateKeyByCertificate(com.rsa.certj.cert.Certificate, com.rsa.jsafe.JSAFE_PrivateKey)
public int selectCertificateByIssuerAndSerialNumber(X500Name issuerName, byte[] serialNumber, Vector certList) throws NoServiceException, DatabaseException
Parameters
issuerName | An | ||
serialNumber | A | ||
certList | A |
Returns
int
that indicates the number of
certificates added to the certList.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public int selectCertificateBySubject(X500Name subjectName, Vector certList) throws NoServiceException, DatabaseException
Parameters
subjectName | An | ||
certList | A |
Returns
int
that indicates the number of
certificates added to the certList.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public int selectCertificateByExtensions(X500Name baseName, X509V3Extensions extensions, Vector certList) throws NoServiceException, DatabaseException
Parameters
baseName | An | ||
extensions | An | ||
certList | A |
Returns
int
that indicates the number of
certificates added to the certList.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.See Also
(com.rsa.certj.cert.X509V3Extensions,
com.rsa.certj.cert.X509V3Extensions)
public Certificate firstCertificate() throws NoServiceException, DatabaseException
nextCertificate
calls, depending on
the underlying provider(s).
Returns
Certificate
object that is the first
certificate found.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public Certificate nextCertificate() throws NoServiceException, DatabaseException
firstCertificate
before calling this method.
Returns
Certificate
object that is the next
certificate found.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.See Also
firstCertificate()
public boolean hasMoreCertificates() throws NoServiceException, DatabaseException
Returns
true
if more certificates are available,
false
otherwise.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public int selectCRLByIssuerAndTime(X500Name issuerName, Date time, Vector crlList) throws NoServiceException, DatabaseException
Parameters
issuerName | An | ||
time | A | ||
crlList | A |
Returns
int
that indicates the number of CRLs
added to crlList.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public CRL firstCRL() throws NoServiceException, DatabaseException
nextCRL
, depending on the
underlying provider(s).
Returns
CRL
that is the first CRL found.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public CRL nextCRL() throws NoServiceException, DatabaseException
firstCRL
before calling this method.
Returns
CRL
that is the next CRL found.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public boolean hasMoreCRLs() throws NoServiceException, DatabaseException
Returns
true
if more CRLs are available,
false
otherwise.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public com.rsa.jsafe.JSAFE_PrivateKey selectPrivateKeyByCertificate(Certificate cert) throws NoServiceException, DatabaseException
Parameters
cert | A |
Returns
JSAFE_PrivateKey
matching cert.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public com.rsa.jsafe.JSAFE_PrivateKey selectPrivateKeyByPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey) throws NoServiceException, DatabaseException
Parameters
publicKey | A |
Returns
JSAFE_PrivateKey
matching
publicKey.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public com.rsa.jsafe.JSAFE_PrivateKey firstPrivateKey() throws NoServiceException, DatabaseException
Returns
JSAFE_PrivateKey
that is the first
private key found.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public com.rsa.jsafe.JSAFE_PrivateKey nextPrivateKey() throws NoServiceException, DatabaseException
firstPrivateKey
before calling this method.
Returns
JSAFE_PrivateKey
that is the next
private key found.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public boolean hasMorePrivateKeys() throws NoServiceException, DatabaseException
Returns
true
if more private keys are available,
false
otherwise.
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public void deleteCertificate(X500Name issuerName, byte[] serialNumber) throws NoServiceException, DatabaseException
Parameters
issuerName | An | ||
serialNumber | A |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public void deleteCRL(X500Name issuerName, Date lastUpdate) throws NoServiceException, DatabaseException
Parameters
issuerName | An | ||
lastUpdate | A |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public void deletePrivateKeyByCertificate(Certificate cert) throws NoServiceException, DatabaseException
Parameters
cert | A |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.public void deletePrivateKeyByPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey) throws NoServiceException, DatabaseException
Parameters
publicKey | A |
Throws
NoServiceException
- If no database
service provider is found that supports this method.
DatabaseException
- If a database
service provider throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |