Class CertificateManager
java.lang.Object
org.kopi.ebics.certificate.CertificateManager
Simple manager for EBICS certificates.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Creates the certificates for the uservoidCreates the signature certificate.voidCreates the encryption certificate.voidCreates the authentication certificate.voidload(File path, PasswordCallback pwdCallBack) Loads user certificates from a given key storevoidsave(File directory, PasswordCallback pwdCallBack) Saves the certificates in PKCS12 formatvoidwritePKCS12Certificate(char[] password, OutputStream fos) Writes a the generated certificates into a PKCS12 key store.voidwritePKCS12Certificate(File file, char[] password) Writes a the generated certificates into a PKCS12 key store.
-
Constructor Details
-
CertificateManager
-
-
Method Details
-
create
Creates the certificates for the user- Throws:
GeneralSecurityExceptionIOException
-
createA005Certificate
Creates the signature certificate.- Parameters:
end- the expiration date of a the certificate.- Throws:
GeneralSecurityExceptionIOException
-
createX002Certificate
Creates the authentication certificate.- Parameters:
end- the expiration date of a certificate.- Throws:
GeneralSecurityExceptionIOException
-
createE002Certificate
Creates the encryption certificate.- Parameters:
end- the expiration date of a the certificate.- Throws:
GeneralSecurityExceptionIOException
-
save
public void save(File directory, PasswordCallback pwdCallBack) throws GeneralSecurityException, IOException Saves the certificates in PKCS12 format- Throws:
GeneralSecurityExceptionIOException
-
load
public void load(File path, PasswordCallback pwdCallBack) throws GeneralSecurityException, IOException Loads user certificates from a given key store- Parameters:
path- the key store pathpwdCallBack- the password call back- Throws:
GeneralSecurityExceptionIOException
-
writePKCS12Certificate
public void writePKCS12Certificate(File file, char[] password) throws GeneralSecurityException, IOException Writes a the generated certificates into a PKCS12 key store.- Parameters:
file- the key store filepassword- the key password- Throws:
IOExceptionGeneralSecurityException
-
writePKCS12Certificate
public void writePKCS12Certificate(char[] password, OutputStream fos) throws GeneralSecurityException, IOException Writes a the generated certificates into a PKCS12 key store.- Parameters:
password- the key store passwordfos- the output stream- Throws:
GeneralSecurityExceptionIOException
-