Package com.iizigo.ssl
Class CertificateUI
java.lang.Object
com.iizigo.ssl.CertificateUI
- All Implemented Interfaces:
- ICertificateUI
The implementing class for Certificate UI callback for SSL.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescription- CertificateUI- (Shell shell) Constructs an instance of the Certificate UI for a shell.
- Method SummaryModifier and TypeMethodDescription- char[]- getCertificatePassword- (String certificate, String msg) Gets the password for a client certificate.- char[]Gets the last password the user has entered.- booleanGets the save-password flag, can be retrieved once the dialog is OK'ed.- getShell()Gets the shell, can be overridden to provide a shell.- char[]- getStorePassword- (String store, String msg) Gets the password for a certificate store.- boolean- isApplet()Checks if the owner is an Applet.- boolean- isServerCertificateAccepted- (String server, String certInfo, X509Certificate certificate) Asks the user if the server with the certificate is accepted.- voidShow a message box for a client certificate.- void- showStoreMessage- (String msg) Show a message box for a certificate store.
- Constructor Details- CertificateUIConstructs an instance of the Certificate UI for a shell.
 
- Method Details- getLastPasswordpublic char[] getLastPassword()Gets the last password the user has entered. When retrieved, it is immediately cleared.- Returns:
- null if the user didn't enter a password, otherwise the password character array.
 
- getSavePasswordpublic boolean getSavePassword()Gets the save-password flag, can be retrieved once the dialog is OK'ed.
- getShellGets the shell, can be overridden to provide a shell.
- getStorePasswordGets the password for a certificate store.- Note: it may be called from any thread. - Specified by:
- getStorePasswordin interface- ICertificateUI
- 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.
 
- showStoreMessageShow a message box for a certificate store.- Note: it may be called from any thread. - Specified by:
- showStoreMessagein interface- ICertificateUI
- 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.".
 
- getCertificatePasswordGets the password for a client certificate.- Note: it may be called from any thread. - Specified by:
- getCertificatePasswordin interface- ICertificateUI
- 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.
 
- showCertificateMessageShow a message box for a client certificate.- Note: it may be called from any thread. - Specified by:
- showCertificateMessagein interface- ICertificateUI
- 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.".
 
- isAppletpublic boolean isApplet()Checks if the owner is an Applet.- Specified by:
- isAppletin interface- ICertificateUI
 
- isServerCertificateAcceptedpublic boolean isServerCertificateAccepted- (String server, String certInfo, X509Certificate certificate) Asks the user if the server with the certificate is accepted.- Note: it may be called from any thread. - Specified by:
- isServerCertificateAcceptedin interface- ICertificateUI
- 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.