org.ssonet.net
Class CheckCertificateDialog

java.lang.Object
  |
  +--org.ssonet.net.CheckCertificateDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class CheckCertificateDialog
extends java.lang.Object
implements java.awt.event.ActionListener

This dialog can be used to show a certificate to the user, so that he can accept or reject it.


Field Summary
 javax.swing.JDialog dialog
           
 
Constructor Summary
CheckCertificateDialog(java.lang.String certificateName, java.security.cert.X509Certificate certificate, javax.swing.JFrame parentFrame)
          tests interactively a certificate
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          This method performs actions according to the buttons pressed.
static boolean getAnswer(java.lang.String certificateName, java.security.cert.X509Certificate certificate)
          tests interactively a certificate.
static boolean getAnswer(java.lang.String certificateName, java.security.cert.X509Certificate certificate, javax.swing.JFrame parentFrame)
          tests interactively a certificate The dialog is shown under the given parent frame.
static long getInteractiveTime()
          Returns the time the dialog was showing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dialog

public javax.swing.JDialog dialog
Constructor Detail

CheckCertificateDialog

public CheckCertificateDialog(java.lang.String certificateName,
                              java.security.cert.X509Certificate certificate,
                              javax.swing.JFrame parentFrame)
tests interactively a certificate

Parameters:
certificateName - description of the certificate
certificate - communications partner certificate
parentFrame - parent frame
Method Detail

getAnswer

public static boolean getAnswer(java.lang.String certificateName,
                                java.security.cert.X509Certificate certificate)
tests interactively a certificate. Creates a JFrame by itsself to show the dialog.

Parameters:
certificateName - description of the certificate
certificate - communications partner certificate
Returns:
boolean true if identity os OK, otherwise false

getAnswer

public static boolean getAnswer(java.lang.String certificateName,
                                java.security.cert.X509Certificate certificate,
                                javax.swing.JFrame parentFrame)
tests interactively a certificate The dialog is shown under the given parent frame.

Parameters:
certificateName - description of the certificate
certificate - communications partner certificate
parentFrame - parent frame
Returns:
boolean true if identity os OK, otherwise false

getInteractiveTime

public static long getInteractiveTime()
Returns the time the dialog was showing. This can be usefull for performance measurements.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
This method performs actions according to the buttons pressed.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
event - the ActionEvent generated by the buttons


Copyright © 2003 DRIM Team. All Rights Reserved.