Package com.iizix.comm
Interface ICertificateUI
-
- All Known Implementing Classes:
CertificateUI
public interface ICertificateUI
Interface that must be implemented for Client Certificates when they are not loaded (e.g. from the Control Panel) in order to prompt the user with a message box or a certificate file password.- Author:
- Christopher Mindus
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description char[]
getCertificatePassword(java.lang.String certificate, java.lang.String msg)
Gets the password for a client certificate.char[]
getStorePassword(java.lang.String store, java.lang.String msg)
Gets the password for a certificate store.boolean
isApplet()
Checks if the owner is an Applet.boolean
isServerCertificateAccepted(java.lang.String server, java.lang.String certInfo, java.security.cert.X509Certificate certificate)
Asks the user if the server with the certificate is accepted.void
showCertificateMessage(java.lang.String msg)
Show a message box for a client certificate.void
showStoreMessage(java.lang.String msg)
Show a message box for a certificate store.
-
-
-
Method Detail
-
getStorePassword
char[] getStorePassword(java.lang.String store, java.lang.String msg)
Gets the password for a certificate store.Note: it may be called from any thread.
- Parameters:
store
- The certificate store "User Java key store" or "System Java key store".msg
- A message such as "Invalid password for client certificates in the [store] Java key store, please reenter." or null for none.- Returns:
- The password in a character array, or null for cancel.
-
showStoreMessage
void showStoreMessage(java.lang.String msg)
Show a message box for a certificate store.Note: it may be called from any thread.
- Parameters:
msg
- A message, such as "You have specified 3 invalid passwords for the client certificates in the [store] Java key store. These certificates will be ignored.".
-
getCertificatePassword
char[] getCertificatePassword(java.lang.String certificate, java.lang.String msg)
Gets the password for a client certificate.Note: it may be called from any thread.
- Parameters:
certificate
- The certificate type "Client certificate for [server]".msg
- A message such as "Enter the password for the Client Certificate." or "Incorrect Client Certificate password, please reenter.".- Returns:
- The password in a character array, or null for cancel.
-
showCertificateMessage
void showCertificateMessage(java.lang.String msg)
Show a message box for a client certificate.Note: it may be called from any thread.
- Parameters:
msg
- A message, such as "The file '[file]' is not a valid client certificate (i.e. PKCS#12 identity). The file is ignored." or "You have specified 3 invalid passwords for the client certificate file '[file]'.\n\nThe file is ignored.".
-
isApplet
boolean isApplet()
Checks if the owner is an Applet.
-
isServerCertificateAccepted
boolean isServerCertificateAccepted(java.lang.String server, java.lang.String certInfo, java.security.cert.X509Certificate certificate)
Asks the user if the server with the certificate is accepted.Note: it may be called from any thread.
- Parameters:
server
- The server host name.certInfo
- The certificate information string including validity, error, etc.certificate
- The X.509 certificate.- Returns:
- true to accept it, false otherwise.
-
-