|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
nl.nikhef.slcshttps.gui.SerialPanel
public class SerialPanel
Class to create a panel showing information about the serial number of the
client side certificate in use for the default SSLSocketFactory
for HttpsURLConnection
or HttxURLConnection
and and buttons to
change it. Note CAPanel
shows either one or two
SerialPanel
s, one for Https, one for Httx.
CAPanel
,
CAHttps.setSSLSocketFactory()
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
(package private) JButton |
actButton
Activate the certificate for client side authentication. |
(package private) CAHttps |
ca
The information for this SerialPanel is taken from here. |
(package private) JButton |
deactButton
Dectivate the certificate for client side authentication. |
private boolean |
maskHttps
whether or not Https is masked by CAPanel , what is actually
shown by this SerialPanel is determined by the parameter in
SerialPanel(CAHttps,boolean) , masking means: show only Httx
status, but update both Https and Httx. |
(package private) NonEditableDefaultTableModel |
serialModel
Contains the serialnumber, updated by actButton and deactButton . |
private boolean |
showBoth
whether or Https AND Httx status are shown by CAPanel ,
what is actually shown by this SerialPanel is determined by
the parameter in SerialPanel(CAHttps,boolean) . |
private boolean |
showHttx
whether or not the Httx is shown by CAPanel , what is actually
shown by this SerialPanel is determined by the parameter in
SerialPanel(CAHttps,boolean) . |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SerialPanel(CAHttps caHttps,
boolean httx)
Constructs a SerialPanel for either Httx or Https,
depending on the value of httx . |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent event)
Called when one of the buttons is pressed. |
private JPanel |
getButtonPanel(boolean cert,
boolean active)
Creates a JPanel containing the activate/deactivate buttons. |
private String |
getSerial(CAHttps caHttps,
boolean httx)
Gets the serial number from the CAHttps for
either HttxURLConnection (when
httx is true ) or
HttpsURLConnection (otherwise). |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
CAHttps ca
SerialPanel
is taken from here.
NonEditableDefaultTableModel serialModel
actButton
and deactButton
.
JButton actButton
JButton deactButton
private boolean showHttx
CAPanel
, what is actually
shown by this SerialPanel
is determined by the parameter in
SerialPanel(CAHttps,boolean)
.
private boolean showBoth
CAPanel
,
what is actually shown by this SerialPanel
is determined by
the parameter in SerialPanel(CAHttps,boolean)
.
private boolean maskHttps
CAPanel
, what is actually
shown by this SerialPanel
is determined by the parameter in
SerialPanel(CAHttps,boolean)
, masking means: show only Httx
status, but update both Https and Httx.
Constructor Detail |
---|
public SerialPanel(CAHttps caHttps, boolean httx) throws KeyStoreException
SerialPanel
for either Httx or Https,
depending on the value of httx
.
caHttps
- the CAHttps
to get the status, certificate
and settings from.httx
- whether this panel is for Httx (true
) or
Https (false
).
KeyStoreException
- when retrieval of certificate from
caHttps
fails (not when caHttps
is
null
).Method Detail |
---|
public void actionPerformed(ActionEvent event)
ca
to change the SSLSocketFactory
,
serialModel
to change the text and actButton
and deactButton
to set their status and label.
actionPerformed
in interface ActionListener
event
- type of event (which button has been pressed).private JPanel getButtonPanel(boolean cert, boolean active)
JPanel
containing the activate/deactivate buttons.
cert
- boolean
whether there is a certificate.active
- boolean
whether a certificate is active.
JPanel
containing the buttons.private String getSerial(CAHttps caHttps, boolean httx)
CAHttps
for
either HttxURLConnection
(when
httx
is true
) or
HttpsURLConnection
(otherwise).
caHttps
- CAHttps
to use.httx
- whether to return the value for Httx (true
) or
Https (false
).
String
representation of certificate serial number
in use.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
nl.nikhef.slcshttps | Mischa Sallé - msalle(AT)nikhef.nl |