📄 icertificatestoresessionlocal.java
字号:
/* * Generated by XDoclet - Do not edit! */package org.ejbca.core.ejb.ca.store;/** * Local interface for CertificateStoreSession. */public interface ICertificateStoreSessionLocal extends javax.ejb.EJBLocalObject{ /** * Stores a certificate. * @param incert The certificate to be stored. * @param cafp Fingerprint (hex) of the CAs certificate. * @param username username of end entity owning the certificate. * @param status Status of the certificate (from CertificateData). * @param type Type of certificate (CERTTYPE_ENDENTITY etc from CertificateDataBean). * @return true if storage was successful. */ public boolean storeCertificate( org.ejbca.core.model.log.Admin admin,java.security.cert.Certificate incert,java.lang.String username,java.lang.String cafp,int status,int type ) ; /** * Stores a CRL * @param incrl The DER coded CRL to be stored. * @param cafp Fingerprint (hex) of the CAs certificate. * @param number CRL number. * @return true if storage was successful. */ public boolean storeCRL( org.ejbca.core.model.log.Admin admin,byte[] incrl,java.lang.String cafp,int number ) ; /** * Lists fingerprint (primary key) of ALL certificates in the database. NOTE: Caution should be taken with this method as execution may be very heavy indeed if many certificates exist in the database (imagine what happens if there are millinos of certificates in the DB!). Should only be used for testing purposes. * @param admin Administrator performing the operation * @param issuerdn the dn of the certificates issuer. * @return Collection of fingerprints, i.e. Strings, reverse ordered by expireDate where last expireDate is first in array. */ public java.util.Collection listAllCertificates( org.ejbca.core.model.log.Admin admin,java.lang.String issuerdn ) ; /** * Lists fingerprint (primary key) of ALL certificates in the database. NOTE: Caution should be taken with this method as execution may be very heavy indeed if many certificates exist in the database (imagine what happens if there are millinos of certificates in the DB!). Should only be used for testing purposes. * @param admin Administrator performing the operation * @param issuerdn the dn of the certificates issuer. * @return Collection of fingerprints, i.e. Strings, reverse ordered by expireDate where last expireDate is first in array. */ public java.util.Collection listRevokedCertificates( org.ejbca.core.model.log.Admin admin,java.lang.String issuerdn ) ; /** * Lists certificates for a given subject signed by the given issuer. * @param admin Administrator performing the operation * @param subjectDN the DN of the subject whos certificates will be retrieved. * @param issuerDN the dn of the certificates issuer. * @return Collection of Certificates (java.security.cert.Certificate) in no specified order or an empty Collection. * @throws EJBException if a communication or other error occurs. */ public java.util.Collection findCertificatesBySubjectAndIssuer( org.ejbca.core.model.log.Admin admin,java.lang.String subjectDN,java.lang.String issuerDN ) ; /** * Lists certificates for a given subject. * @param admin Administrator performing the operation * @param subjectDN the DN of the subject whos certificates will be retrieved. * @return Collection of Certificates (java.security.cert.Certificate) in no specified order or an empty Collection. */ public java.util.Collection findCertificatesBySubject( org.ejbca.core.model.log.Admin admin,java.lang.String subjectDN ) ; public java.util.Collection findCertificatesByExpireTime( org.ejbca.core.model.log.Admin admin,java.util.Date expireTime ) ; /** * Finds usernames of users having certificate(s) expiring within a specified time and that has status active. */ public java.util.Collection findCertificatesByExpireTimeWithLimit( org.ejbca.core.model.log.Admin admin,java.util.Date expiretime ) ; /** * Finds a certificate specified by issuer DN and serial number. * @param admin Administrator performing the operation * @param issuerDN issuer DN of the desired certificate. * @param serno serial number of the desired certificate! * @return Certificate if found or null */ public java.security.cert.Certificate findCertificateByIssuerAndSerno( org.ejbca.core.model.log.Admin admin,java.lang.String issuerDN,java.math.BigInteger serno ) ; /** * Implements ICertificateStoreSession::findCertificatesByIssuerAndSernos. <p/> The method retrives all certificates from a specific issuer which are identified by list of serial numbers. The collection will be empty if the issuerDN is <tt>null</tt>/empty or the collection of serial numbers is empty. * @param admin * @param issuerDN the subjectDN of a CA certificate * @param sernos a collection of certificate serialnumbers * @return Collection a list of certificates; never <tt>null</tt> */ public java.util.Collection findCertificatesByIssuerAndSernos( org.ejbca.core.model.log.Admin admin,java.lang.String issuerDN,java.util.Collection sernos ) ; /** * Finds certificate(s) for a given serialnumber. * @param admin Administrator performing the operation * @param serno the serialnumber of the certificate(s) that will be retrieved * @return Certificate or null if none found. */ public java.util.Collection findCertificatesBySerno( org.ejbca.core.model.log.Admin admin,java.math.BigInteger serno ) ; /** * Finds username for a given certificate serial number. * @param admin Administrator performing the operation * @param serno the serialnumber of the certificate to find username for. * @return username or null if none found. */ public java.lang.String findUsernameByCertSerno( org.ejbca.core.model.log.Admin admin,java.math.BigInteger serno,java.lang.String issuerdn ) ; /** * Finds certificate(s) for a given usernaem. * @param admin Administrator performing the operation * @param username the usernaem of the certificate(s) that will be retrieved * @return Collection of Certificates (in no specified order) or null if none found. */ public java.util.Collection findCertificatesByUsername( org.ejbca.core.model.log.Admin admin,java.lang.String username ) ; public org.ejbca.core.model.ca.store.CertificateInfo getCertificateInfo( org.ejbca.core.model.log.Admin admin,java.lang.String fingerprint ) ; public java.security.cert.Certificate findCertificateByFingerprint( org.ejbca.core.model.log.Admin admin,java.lang.String fingerprint ) ; /** * Lists all active (status = 20) certificates of a specific type and if given from a specific issuer. <p/> The type is the bitwise OR value of the types listed int {@link org.ejbca.core.ejb.ca.store.CertificateDataBean}:<br> <ul> <li><tt>CERTTYPE_ENDENTITY</tt><br> An user or machine certificate, which identifies a subject. </li> <li><tt>CERTTYPE_CA</tt><br> A CA certificate which is <b>not</b> a root CA. </li> <li><tt>CERTTYPE_ROOTCA</tt><br> A Root CA certificate. </li> </ul> <p/> Usage examples:<br> <ol> <li>Get all root CA certificates <p/> <code> ... ICertificateStoreSessionRemote itf = ... Collection certs = itf.findCertificatesByType(adm, CertificateDataBean.CERTTYPE_ROOTCA, null); ... </code> </li> <li>Get all subordinate CA certificates for a specific Root CA. It is assumed that the <tt>subjectDN</tt> of the Root CA certificate is located in the variable <tt>issuer</tt>. <p/> <code> ... ICertificateStoreSessionRemote itf = ... Certficate rootCA = ... String issuer = rootCA.getSubjectDN(); Collection certs = itf.findCertificatesByType(adm, CertificateDataBean.CERTTYPE_SUBCA, issuer); ... </code> </li> <li>Get <b>all</b> CA certificates. <p/> <code> ... ICertificateStoreSessionRemote itf = ... Collection certs = itf.findCertificatesByType(adm, CertificateDataBean.CERTTYPE_SUBCA + CERTTYPE_ROOTCA, null); ... </code> </li> </ol> * @param admin * @param issuerDN get all certificates issued by a specific issuer. If <tt>null</tt> or empty return certificates regardless of the issuer. * @param type CERTTYPE_* types from CertificateDataBean * @return Collection Collection of X509Certificate, never <tt>null</tt> */ public java.util.Collection findCertificatesByType( org.ejbca.core.model.log.Admin admin,int type,java.lang.String issuerDN ) ; /** * Set the status of certificates of given dn to revoked. * @param admin Administrator performing the operation * @param username the username of user to revoke certificates. * @param publishers and array of publiserids (Integer) of publishers to revoke the certificate in. * @param reason the reason of the revokation. (One of the RevokedCertInfo.REVOKATION_REASON constants.) */ public void setRevokeStatus( org.ejbca.core.model.log.Admin admin,java.lang.String username,java.util.Collection publishers,int reason ) ; /** * Set the status of certificate with given serno to revoked. * @param admin Administrator performing the operation * @param serno the serno of certificate to revoke. * @param publishers and array of publiserids (Integer) of publishers to revoke the certificate in. * @param reason the reason of the revokation. (One of the RevokedCertInfo.REVOKATION_REASON constants.) */ public void setRevokeStatus( org.ejbca.core.model.log.Admin admin,java.lang.String issuerdn,java.math.BigInteger serno,java.util.Collection publishers,int reason ) ; /** * Revokes a certificate (already revoked by the CA), in the database * @param cert The DER coded Certificate that has been revoked. * @param publishers and array of publiserids (Integer) of publishers to revoke the certificate in. */ public void revokeCertificate( org.ejbca.core.model.log.Admin admin,java.security.cert.Certificate cert,java.util.Collection publishers,int reason ) ; /** * Method revoking all certificates generated by the specified issuerdn. Sets revokedate to current time. Should only be called by CAAdminBean when a CA is about to be revoked. * @param admin the administrator performing the event. * @param issuerdn the dn of CA about to be revoked * @param reason the reason of revokation. */ public void revokeAllCertByCA( org.ejbca.core.model.log.Admin admin,java.lang.String issuerdn,int reason ) ; /** * Method that checks if a users all certificates have been revoked. * @param admin Administrator performing the operation * @param username the username to check for. * @return returns true if all certificates are revoked.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -