Class SecurityDialog
java.lang.Object
net.adoptopenjdk.icedteaweb.client.parts.dialogs.security.SecurityDialog
Provides methods for showing security warning dialogs for a wide range of
JNLP security issues. Note that the security dialogs should be running in the
secure AppContext - this class should not be used directly from an applet or
application. See
SecurityDialogs for a way to show security dialogs.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AccessTypeThe type of access that this dialog is forprivate final X509Certificateprivate final CertVerifierprivate final SecurityDialogs.DialogTypeThe type of dialog we want to showprivate final Object[]An optional String array that's only necessary when a dialog label requires some parameters (e.g.private final JNLPFileThe application file associated with this security warningprivate booleanWhether or not this object has been fully initializedprivate static final Loggerprivate SecurityDialogPanelprivate booleanShould show signed JNLP file warningprivate DialogResultprivate ViwableDialog -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSecurityDialog(SecurityDialogs.DialogType dialogType, X509Certificate c) Create a SecurityWarningDialog to display information about a single certificateprivateSecurityDialog(SecurityDialogs.DialogType dialogType, AccessType accessType, JNLPFile file) Construct a SecurityDialog to display some sort of access warningprivateSecurityDialog(SecurityDialogs.DialogType dialogType, AccessType accessType, JNLPFile file, Object[] extras) Create a SecurityDialog to display some sort of access warning with more informationprivateSecurityDialog(SecurityDialogs.DialogType dialogType, AccessType accessType, JNLPFile file, CertVerifier certVerifier) Create a SecurityDialog to display a certificate-related warning(package private)SecurityDialog(SecurityDialogs.DialogType dialogType, AccessType accessType, JNLPFile file, CertVerifier JarCertVerifier, X509Certificate cert, Object[] extras) privateSecurityDialog(SecurityDialogs.DialogType dialogType, AccessType accessType, CertVerifier certVerifier) Create a SecurityDialog to display a certificate-related warning -
Method Summary
Modifier and TypeMethodDescriptionprivate Stringprivate static StringcreateTitle(SecurityDialogs.DialogType dtype, AccessType atype) getCert()(package private) DialogResult(package private) DialogResultgetFile()private SecurityDialogPanelgetPanel()(package private) static SecurityDialogPanel(package private) static SecurityDialogPanelgetPanel(SecurityDialogs.DialogType type, SecurityDialog sd) (package private) StringgetText()getValue()(package private) Stringprivate voidprivate voidbooleanReturns if this dialog has been fully initialized yet.(package private) DialogResultreadFromStdIn(String what) booleanprivate voidvoidsetValue(DialogResult value) static voidshowCertInfoDialog(CertVerifier certVerifier, Component parent) Displays CertPath information in a readable table format.static voidshowMoreInfoDialog(CertVerifier certVerifier, SecurityDialog parent) Shows more information regarding jar code signingstatic voidshowSingleCertInfoDialog(X509Certificate c, Window parent) Displays a single certificate's information.
-
Field Details
-
LOG
-
dialogType
The type of dialog we want to show -
accessType
The type of access that this dialog is for -
panel
-
file
The application file associated with this security warning -
certVerifier
-
cert
-
extras
An optional String array that's only necessary when a dialog label requires some parameters (e.g. showing which address an application is trying to connect to). -
initialized
private boolean initializedWhether or not this object has been fully initialized -
value
-
viwableDialog
-
requiresSignedJNLPWarning
private boolean requiresSignedJNLPWarningShould show signed JNLP file warning
-
-
Constructor Details
-
SecurityDialog
SecurityDialog(SecurityDialogs.DialogType dialogType, AccessType accessType, JNLPFile file, CertVerifier JarCertVerifier, X509Certificate cert, Object[] extras) -
SecurityDialog
Construct a SecurityDialog to display some sort of access warning -
SecurityDialog
private SecurityDialog(SecurityDialogs.DialogType dialogType, AccessType accessType, JNLPFile file, CertVerifier certVerifier) Create a SecurityDialog to display a certificate-related warning -
SecurityDialog
private SecurityDialog(SecurityDialogs.DialogType dialogType, AccessType accessType, CertVerifier certVerifier) Create a SecurityDialog to display a certificate-related warning -
SecurityDialog
private SecurityDialog(SecurityDialogs.DialogType dialogType, AccessType accessType, JNLPFile file, Object[] extras) Create a SecurityDialog to display some sort of access warning with more information -
SecurityDialog
Create a SecurityWarningDialog to display information about a single certificate
-
-
Method Details
-
isInitialized
public boolean isInitialized()Returns if this dialog has been fully initialized yet.- Returns:
- true if this dialog has been initialized, and false otherwise.
-
showMoreInfoDialog
Shows more information regarding jar code signing- Parameters:
certVerifier- the JarCertVerifier used to verify this applicationparent- the parent NumberOfArguments pane
-
showCertInfoDialog
Displays CertPath information in a readable table format.- Parameters:
certVerifier- the JarCertVerifier used to verify this applicationparent- the parent NumberOfArguments pane
-
showSingleCertInfoDialog
Displays a single certificate's information.- Parameters:
c- the X509 certificate.parent- the parent pane.
-
initDialog
private void initDialog() -
createTitle
-
createTitle
-
getAccessType
-
getFile
-
getCertVerifier
-
getCert
-
getPanel
-
getPanel
-
getPanel
-
installPanel
private void installPanel() -
selectDefaultButton
private void selectDefaultButton() -
setValue
-
getValue
-
requiresSignedJNLPWarning
public boolean requiresSignedJNLPWarning() -
getDefaultNegativeAnswer
DialogResult getDefaultNegativeAnswer() -
getDefaultPositiveAnswer
DialogResult getDefaultPositiveAnswer() -
getText
String getText() -
readFromStdIn
-
helpToStdIn
String helpToStdIn() -
getViwableDialog
-
getSecurityDialogPanel
-