com.glub.secureftp.bean
Interface SSLSessionManager


public interface SSLSessionManager

The SSLSessionManager interface is responsible for dealing with SSL related events such as certificates being sent from the FTP server and randomization information.

Since:
2.0
Version:
$Revision: 47 $, $Date: 2009-05-16 10:10:12 -0700 (Sat, 16 May 2009) $

Field Summary
static short ALLOW_CERTIFICATE
          Used to signal certificate acceptance.
static short DENY_CERTIFICATE
          Used to signal certificate rejection.
static short SAVE_CERTIFICATE
          Used to signal certificate acceptance and that it should be saved in the certificate key store.
 
Method Summary
 boolean continueWithCertificateHostMismatch(SSLCertificate cert, String actualHost, String certHost)
          If the server sends a certificate which doesn't match the hostname, this method will be called.
 boolean continueWithExpiredCertificate(SSLCertificate cert)
          If the server sends an expired certificate, this method will be called.
 boolean continueWithInvalidCertificate(SSLCertificate cert)
          If the server sends an invalid certificate, this method will be called.
 boolean continueWithoutServerCertificate()
          If the server doesn't send a certificate, this method will be called.
 short newCertificateEncountered(SSLCertificate cert)
          If the certificate sent by the FTP server is not found in the key store, this method will be called.
 void randomSeedGenerated()
          When the random number generator is finished seeding, this method will be called.
 void randomSeedIsGenerating()
          If the random number generator is seeding and is not ready for setting up SSL sockets, this method will be called.
 short replaceCertificate(SSLCertificate oldCert, SSLCertificate newCert)
          If a certificate is found in the key store and a new one that matches the same name is sent from the FTP server, this method will be called.
 void setCurrentCertificate(SSLCertificate cert)
          When a certificate is encountered from the FTP server, this method will be called.
 

Field Detail

ALLOW_CERTIFICATE

static final short ALLOW_CERTIFICATE
Used to signal certificate acceptance.

See Also:
Constant Field Values

SAVE_CERTIFICATE

static final short SAVE_CERTIFICATE
Used to signal certificate acceptance and that it should be saved in the certificate key store.

See Also:
Constant Field Values

DENY_CERTIFICATE

static final short DENY_CERTIFICATE
Used to signal certificate rejection.

See Also:
Constant Field Values
Method Detail

setCurrentCertificate

void setCurrentCertificate(SSLCertificate cert)
When a certificate is encountered from the FTP server, this method will be called.

Parameters:
cert - the SSL (X509) certificate.

newCertificateEncountered

short newCertificateEncountered(SSLCertificate cert)
If the certificate sent by the FTP server is not found in the key store, this method will be called.

Parameters:
cert - the SSL (X509) certificate.
Returns:
a certificate acception/rejection code.
See Also:
ALLOW_CERTIFICATE, SAVE_CERTIFICATE, DENY_CERTIFICATE

replaceCertificate

short replaceCertificate(SSLCertificate oldCert,
                         SSLCertificate newCert)
If a certificate is found in the key store and a new one that matches the same name is sent from the FTP server, this method will be called.

Parameters:
oldCert - the known SSL (X509) certificate.
newCert - the new SSL (X509) certificate.
Returns:
a certificate acception/rejection code.
See Also:
ALLOW_CERTIFICATE, SAVE_CERTIFICATE, DENY_CERTIFICATE

continueWithoutServerCertificate

boolean continueWithoutServerCertificate()
If the server doesn't send a certificate, this method will be called.

Returns:
true to continue the connection.

continueWithExpiredCertificate

boolean continueWithExpiredCertificate(SSLCertificate cert)
If the server sends an expired certificate, this method will be called.

Parameters:
cert - the certificate sent from the FTP server.
Returns:
true to continue the connection.

continueWithInvalidCertificate

boolean continueWithInvalidCertificate(SSLCertificate cert)
If the server sends an invalid certificate, this method will be called. An invalid certificate can include a cert that is not yet vaild.

Parameters:
cert - the certificate sent from the FTP server.
Returns:
true to continue the connection.

continueWithCertificateHostMismatch

boolean continueWithCertificateHostMismatch(SSLCertificate cert,
                                            String actualHost,
                                            String certHost)
If the server sends a certificate which doesn't match the hostname, this method will be called.

Parameters:
cert - the certificate sent from the FTP server.
actualHost - the hostname of the server.
certHost - the hostname as specified in the certificate.
Returns:
true to continue the connection.

randomSeedIsGenerating

void randomSeedIsGenerating()
If the random number generator is seeding and is not ready for setting up SSL sockets, this method will be called.


randomSeedGenerated

void randomSeedGenerated()
When the random number generator is finished seeding, this method will be called.



Copyright © 2000-12 Glub Tech, Inc. All Rights Reserved.