📄 isignsessionlocal.java
字号:
/* * Generated by XDoclet - Do not edit! */package org.ejbca.core.ejb.ca.sign;/** * Local interface for RSASignSession. */public interface ISignSessionLocal extends javax.ejb.EJBLocalObject{ /** * Retrieves the certificate chain for the signer. The returned certificate chain MUST have the RootCA certificate in the last position. * @param admin Information about the administrator or admin preforming the event. * @param caid is the issuerdn.hashCode() * @return The certificate chain, never null. */ public java.util.Collection getCertificateChain( org.ejbca.core.model.log.Admin admin,int caid ) ; /** * Creates a signed PKCS7 message containing the whole certificate chain, including the provided client certificate. * @param admin Information about the administrator or admin preforming the event. * @param cert client certificate which we want encapsulated in a PKCS7 together with certificate chain. * @return The DER-encoded PKCS7 message. * @throws CADoesntExistsException if the CA does not exist or is expired, or has an invalid cert * @throws SignRequestSignatureException if the certificate is not signed by the CA */ public byte[] createPKCS7( org.ejbca.core.model.log.Admin admin,java.security.cert.Certificate cert,boolean includeChain ) throws org.ejbca.core.model.ca.caadmin.CADoesntExistsException, org.ejbca.core.model.ca.SignRequestSignatureException; /** * Creates a signed PKCS7 message containing the whole certificate chain of the specified CA. * @param admin Information about the administrator or admin preforming the event. * @param caId CA for which we want a PKCS7 certificate chain. * @return The DER-encoded PKCS7 message. * @throws CADoesntExistsException if the CA does not exist or is expired, or has an invalid cert */ public byte[] createPKCS7( org.ejbca.core.model.log.Admin admin,int caId,boolean includeChain ) throws org.ejbca.core.model.ca.caadmin.CADoesntExistsException; /** * Requests for a certificate to be created for the passed public key with default key usage The method queries the user database for authorization of the user. * @param admin Information about the administrator or admin preforming the event. * @param username unique username within the instance. * @param password password for the user. * @param pk the public key to be put in the created certificate. * @return The newly created certificate or null. * @throws ObjectNotFoundException if the user does not exist. * @throws AuthStatusException If the users status is incorrect. * @throws AuthLoginException If the password is incorrect. * @throws IllegalKeyException if the public key is of wrong type. */ public java.security.cert.Certificate createCertificate( org.ejbca.core.model.log.Admin admin,java.lang.String username,java.lang.String password,java.security.PublicKey pk ) throws javax.ejb.ObjectNotFoundException, org.ejbca.core.model.ca.AuthStatusException, org.ejbca.core.model.ca.AuthLoginException, org.ejbca.core.model.ca.IllegalKeyException, org.ejbca.core.model.ca.caadmin.CADoesntExistsException; /** * Requests for a certificate to be created for the passed public key with the passed key usage. The method queries the user database for authorization of the user. CAs are only allowed to have certificateSign and CRLSign set. * @param admin Information about the administrator or admin preforming the event. * @param username unique username within the instance. * @param password password for the user. * @param pk the public key to be put in the created certificate. * @param keyusage integer with mask describing desired key usage in format specified by X509Certificate.getKeyUsage(). id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 } KeyUsage ::= BIT STRING { digitalSignature (0), nonRepudiation (1), keyEncipherment (2), dataEncipherment (3), keyAgreement (4), keyCertSign (5), cRLSign (6), encipherOnly (7), decipherOnly (8) } * @return The newly created certificate or null. * @throws ObjectNotFoundException if the user does not exist. * @throws AuthStatusException If the users status is incorrect. * @throws AuthLoginException If the password is incorrect. * @throws IllegalKeyException if the public key is of wrong type. */ public java.security.cert.Certificate createCertificate( org.ejbca.core.model.log.Admin admin,java.lang.String username,java.lang.String password,java.security.PublicKey pk,boolean[] keyusage ) throws javax.ejb.ObjectNotFoundException, org.ejbca.core.model.ca.AuthStatusException, org.ejbca.core.model.ca.AuthLoginException, org.ejbca.core.model.ca.IllegalKeyException, org.ejbca.core.model.ca.caadmin.CADoesntExistsException; /** * Requests for a certificate to be created for the passed public key with the passed key usage. The method queries the user database for authorization of the user. CAs are only allowed to have certificateSign and CRLSign set. * @param admin Information about the administrator or admin preforming the event. * @param username unique username within the instance. * @param password password for the user. * @param pk the public key to be put in the created certificate. * @param keyusage integer with bit mask describing desired keys usage, overrides keyUsage from CertificateProfiles if allowed. Bit mask is packed in in integer using constants from CertificateData. -1 means use default keyUsage from CertificateProfile. ex. int keyusage = CertificateData.digitalSignature | CertificateData.nonRepudiation; gives digitalSignature and nonRepudiation. ex. int keyusage = CertificateData.keyCertSign | CertificateData.cRLSign; gives keyCertSign and cRLSign * @return The newly created certificate or null. * @throws ObjectNotFoundException if the user does not exist. * @throws AuthStatusException If the users status is incorrect. * @throws AuthLoginException If the password is incorrect. * @throws IllegalKeyException if the public key is of wrong type. */ public java.security.cert.Certificate createCertificate( org.ejbca.core.model.log.Admin admin,java.lang.String username,java.lang.String password,java.security.PublicKey pk,int keyusage ) throws javax.ejb.ObjectNotFoundException, org.ejbca.core.model.ca.AuthStatusException, org.ejbca.core.model.ca.AuthLoginException, org.ejbca.core.model.ca.IllegalKeyException, org.ejbca.core.model.ca.caadmin.CADoesntExistsException; /** * Requests for a certificate to be created for the passed public key with the passed key usage. The method queries the user database for authorization of the user. CAs are only allowed to have certificateSign and CRLSign set. * @param admin Information about the administrator or admin preforming the event. * @param username unique username within the instance. * @param password password for the user. * @param pk the public key to be put in the created certificate. * @param keyusage integer with bit mask describing desired keys usage, overrides keyUsage from CertificateProfiles if allowed. Bit mask is packed in in integer using constants from CertificateData. -1 means use default keyUsage from CertificateProfile. ex. int keyusage = CertificateData.digitalSignature | CertificateData.nonRepudiation; gives digitalSignature and nonRepudiation. ex. int keyusage = CertificateData.keyCertSign | CertificateData.cRLSign; gives keyCertSign and cRLSign * @param notAfter an optional validity to set in the created certificate, if the profile allows validity override, null if the profiles default validity should be used. * @return The newly created certificate or null. * @throws ObjectNotFoundException if the user does not exist. * @throws AuthStatusException If the users status is incorrect. * @throws AuthLoginException If the password is incorrect. * @throws IllegalKeyException if the public key is of wrong type. */ public java.security.cert.Certificate createCertificate( org.ejbca.core.model.log.Admin admin,java.lang.String username,java.lang.String password,java.security.PublicKey pk,int keyusage,java.util.Date notBefore,java.util.Date notAfter ) throws javax.ejb.ObjectNotFoundException, org.ejbca.core.model.ca.AuthStatusException, org.ejbca.core.model.ca.AuthLoginException, org.ejbca.core.model.ca.IllegalKeyException, org.ejbca.core.model.ca.caadmin.CADoesntExistsException; /** * Requests for a certificate of the specified type to be created for the passed public key. The method queries the user database for authorization of the user. * @param admin Information about the administrator or admin preforming the event. * @param username unique username within the instance. * @param password password for the user. * @param certType integer type of certificate taken from CertificateData.CERT_TYPE_XXX. the type CertificateData.CERT_TYPE_ENCRYPTION gives keyUsage keyEncipherment, dataEncipherment. the type CertificateData.CERT_TYPE_SIGNATURE gives keyUsage digitalSignature, non-repudiation. all other CERT_TYPES gives the default keyUsage digitalSignature, keyEncipherment * @param pk the public key to be put in the created certificate. * @return The newly created certificate or null. * @throws ObjectNotFoundException if the user does not exist. * @throws AuthStatusException If the users status is incorrect. * @throws AuthLoginException If the password is incorrect. * @throws IllegalKeyException if the public key is of wrong type. */ public java.security.cert.Certificate createCertificate( org.ejbca.core.model.log.Admin admin,java.lang.String username,java.lang.String password,int certType,java.security.PublicKey pk ) throws javax.ejb.ObjectNotFoundException, org.ejbca.core.model.ca.AuthStatusException, org.ejbca.core.model.ca.AuthLoginException, org.ejbca.core.model.ca.IllegalKeyException, org.ejbca.core.model.ca.caadmin.CADoesntExistsException; /** * Requests for a certificate to be created for the passed public key wrapped in a self-signed certificate. Verification of the signature (proof-of-possesion) on the request is performed, and an exception thrown if verification fails. The method queries the user database for authorization of the user. * @param admin Information about the administrator or admin preforming the event. * @param username unique username within the instance. * @param password password for the user. * @param incert a certificate containing the public key to be put in the created certificate. Other (requested) parameters in the passed certificate can be used, such as DN, Validity, KeyUsage etc. Currently only KeyUsage is considered! * @return The newly created certificate or null. * @throws ObjectNotFoundException if the user does not exist. * @throws AuthStatusException If the users status is incorrect. * @throws AuthLoginException If the password is incorrect. * @throws IllegalKeyException if the public key is of wrong type. * @throws SignRequestSignatureException if the provided client certificate was not signed by the CA. */ public java.security.cert.Certificate createCertificate( org.ejbca.core.model.log.Admin admin,java.lang.String username,java.lang.String password,java.security.cert.Certificate incert ) throws javax.ejb.ObjectNotFoundException, org.ejbca.core.model.ca.AuthStatusException, org.ejbca.core.model.ca.AuthLoginException, org.ejbca.core.model.ca.IllegalKeyException, org.ejbca.core.model.ca.SignRequestSignatureException, org.ejbca.core.model.ca.caadmin.CADoesntExistsException; /**
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -