Framework Professional Edition Package


com.prosyst.mbs.framework.certmanager
Interface WriteableCertificateStorage


public interface WriteableCertificateStorage


Method Summary
 java.lang.String addCert(byte[] cert, boolean overwrite)
          Adds or overwrites the specified certificate to the store.
 int addCert(java.lang.String label, byte[] cert)
          Adds the specified certificate to the store under the given label.
 java.lang.String getSubjectDN(java.lang.String label)
          Returns the subject DN for the specified certificate label.
 int ocspCheck(java.lang.String uri, byte[] certs)
          Checks whether there is a revoked certificate in the chain.
 int ocspCheckCancel()
          Cancels a check that has not yet completed for a revoked certificate in the chain.
 int removeCert(java.lang.String label)
          Removes the specified certificate from the store.
 int updateCert(byte[] cert)
          Updates the specified certificate to the store if it exists.
 

Method Detail

addCert

java.lang.String addCert(byte[] cert,
                         boolean overwrite)
Adds or overwrites the specified certificate to the store. The label is extracted from the certificate data, depending on the presence of CN, O or OU, in this order. If the label exist and overwrite is not true, a new name is generated in the form "label (n)".

Parameters:
cert - byte array with certificate data
overwrite - whether to overwrite an existing certificate
Returns:
the label under which the certificate is added to the store

addCert

int addCert(java.lang.String label,
            byte[] cert)
Adds the specified certificate to the store under the given label.

Parameters:
label - the label under which the certificate should be added to the store
cert - byte array with certificate data
Returns:
zero if successful, non-zero otherwise

removeCert

int removeCert(java.lang.String label)
Removes the specified certificate from the store.

Parameters:
label - the label under which the certificate is added to the store
Returns:
zero if successful, non-zero otherwise

updateCert

int updateCert(byte[] cert)
Updates the specified certificate to the store if it exists.

Parameters:
cert - byte array with certificate data
Returns:
zero if successful, non-zero otherwise

getSubjectDN

java.lang.String getSubjectDN(java.lang.String label)
Returns the subject DN for the specified certificate label.

Parameters:
label - certificate label to be parsed for subject DN.
Returns:
the subject DN of the certificate

ocspCheck

int ocspCheck(java.lang.String uri,
              byte[] certs)
Checks whether there is a revoked certificate in the chain.

Parameters:
uri - OCSP server URI
certs - byte array with chain certificates data
Returns:
- positive if the certificates are not revoked - zero if a certificate is revoked - negative if there was an error

ocspCheckCancel

int ocspCheckCancel()
Cancels a check that has not yet completed for a revoked certificate in the chain.

Returns:
zero if successful, non-zero otherwise

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved