org.ssonet.net
Interface CertificateListener

All Known Implementing Classes:
AnimatedCatalogDialog, AnimatedOrderDialog, KeyExchangeTest.TestListener, MerchantServer, TestClient, TestJigsaw, TestServer

public interface CertificateListener

When a SSONETClientSocket connects to a SSONETServerSocket, Certificates are exchanged. When a certificate arrives, the listeners method checkCertificate is called to determine, whether the certificate is accepted or not. A CertificateListener implementation may return:

There may be multiple CertificateListeners listening to one SSONETContext. A certificate is considered valid, if at least one CertificateListener returned VALID and none returned INVALID, otherwise it is considered to be invalid, ad the connection is rejected.

Author:
Sebastian Clauß, Thomas Kriegelstein

Field Summary
static int INVALID
          Constant, which must be returned by a CertificateListener implementation, if the certificate was testet, and it was found to be invalid.
static int NOT_TESTED
          Constant, which must be returned by a CertificateListener implementation, if certificate was not testet, and so no decition about the validity of the certificate was possible.
static int VALID
          Constant, which must be returned by a CertificateListener implementation, if the certificate was testet, and it was found to be valid.
 
Method Summary
 int checkCertificate(org.ssonet.net.SSONETContext context, java.security.cert.X509Certificate certificate)
           
 

Field Detail

VALID

public static final int VALID
Constant, which must be returned by a CertificateListener implementation, if the certificate was testet, and it was found to be valid.

See Also:
Constant Field Values

INVALID

public static final int INVALID
Constant, which must be returned by a CertificateListener implementation, if the certificate was testet, and it was found to be invalid.

See Also:
Constant Field Values

NOT_TESTED

public static final int NOT_TESTED
Constant, which must be returned by a CertificateListener implementation, if certificate was not testet, and so no decition about the validity of the certificate was possible.

See Also:
Constant Field Values
Method Detail

checkCertificate

public int checkCertificate(org.ssonet.net.SSONETContext context,
                            java.security.cert.X509Certificate certificate)
Parameters:
context - The Context in which the Certificate ha to be evaluated.
certificate - The Certificate to be evaluated.
Returns:
VALID, INVALID or NOT TESTED.


Copyright © 2003 DRIM Team. All Rights Reserved.