org.gudy.azureus2.core3.security
Class SESecurityManager

java.lang.Object
  extended by org.gudy.azureus2.core3.security.SESecurityManager

public class SESecurityManager
extends Object


Field Summary
static String DEFAULT_ALIAS
           
static String SSL_CERTS
           
static String SSL_KEYS
           
static String SSL_PASSWORD
           
 
Constructor Summary
SESecurityManager()
           
 
Method Summary
static void addCertificateListener(SECertificateListener l)
           
static void addPasswordListener(SEPasswordListener l)
           
static void clearPasswords()
           
static Certificate createSelfSignedCertificate(String alias, String cert_dn, int strength)
           
static void exitVM(int status)
           
static TrustManager[] getAllTrustingTrustManager()
           
static TrustManager[] getAllTrustingTrustManager(X509TrustManager delegate)
           
static Class[] getClassContext()
           
static SEKeyDetails getKeyDetails(String alias)
           
static KeyStore getKeyStore()
           
static String getKeystoreName()
           
static String getKeystorePassword()
           
static PasswordAuthentication getPasswordAuthentication(String realm, URL tracker)
           
static SSLServerSocketFactory getSSLServerSocketFactory()
           
static SSLSocketFactory getSSLSocketFactory()
           
static TrustManagerFactory getTrustManagerFactory()
           
static KeyStore getTrustStore()
           
static void initialise()
           
static void installAuthenticator()
           
static SSLSocketFactory installServerCertificates(String alias, String ip, int port)
           
static SSLSocketFactory installServerCertificates(URL https_url)
           
static void removeCertificateListener(SECertificateListener l)
           
static void removePasswordListener(SEPasswordListener l)
           
static boolean resetTrustStore(boolean test_only)
           
static void setCertificateHandler(URL url, SECertificateListener l)
           
static void setPasswordAuthenticationOutcome(String realm, URL tracker, boolean success)
           
static void setPasswordHandler(URL url, SEPasswordListener l)
           
static void setThreadPasswordHandler(SEPasswordListener l)
           
static void stopThread(Thread t)
           
static void unsetThreadPasswordHandler()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SSL_CERTS

public static final String SSL_CERTS
See Also:
Constant Field Values

SSL_KEYS

public static final String SSL_KEYS
See Also:
Constant Field Values

SSL_PASSWORD

public static final String SSL_PASSWORD
See Also:
Constant Field Values

DEFAULT_ALIAS

public static final String DEFAULT_ALIAS
See Also:
Constant Field Values
Constructor Detail

SESecurityManager

public SESecurityManager()
Method Detail

initialise

public static void initialise()

exitVM

public static void exitVM(int status)

stopThread

public static void stopThread(Thread t)

installAuthenticator

public static void installAuthenticator()

resetTrustStore

public static boolean resetTrustStore(boolean test_only)

getKeystoreName

public static String getKeystoreName()

getKeystorePassword

public static String getKeystorePassword()

getSSLServerSocketFactory

public static SSLServerSocketFactory getSSLServerSocketFactory()
                                                        throws Exception
Throws:
Exception

getTrustManagerFactory

public static TrustManagerFactory getTrustManagerFactory()

getAllTrustingTrustManager

public static TrustManager[] getAllTrustingTrustManager()

getAllTrustingTrustManager

public static TrustManager[] getAllTrustingTrustManager(X509TrustManager delegate)

getSSLSocketFactory

public static SSLSocketFactory getSSLSocketFactory()

installServerCertificates

public static SSLSocketFactory installServerCertificates(URL https_url)

installServerCertificates

public static SSLSocketFactory installServerCertificates(String alias,
                                                         String ip,
                                                         int port)

createSelfSignedCertificate

public static Certificate createSelfSignedCertificate(String alias,
                                                      String cert_dn,
                                                      int strength)
                                               throws Exception
Throws:
Exception

getKeyDetails

public static SEKeyDetails getKeyDetails(String alias)
                                  throws Exception
Throws:
Exception

getKeyStore

public static KeyStore getKeyStore()
                            throws Exception
Throws:
Exception

getTrustStore

public static KeyStore getTrustStore()
                              throws Exception
Throws:
Exception

getPasswordAuthentication

public static PasswordAuthentication getPasswordAuthentication(String realm,
                                                               URL tracker)

setPasswordAuthenticationOutcome

public static void setPasswordAuthenticationOutcome(String realm,
                                                    URL tracker,
                                                    boolean success)

addPasswordListener

public static void addPasswordListener(SEPasswordListener l)

removePasswordListener

public static void removePasswordListener(SEPasswordListener l)

clearPasswords

public static void clearPasswords()

setThreadPasswordHandler

public static void setThreadPasswordHandler(SEPasswordListener l)

unsetThreadPasswordHandler

public static void unsetThreadPasswordHandler()

setPasswordHandler

public static void setPasswordHandler(URL url,
                                      SEPasswordListener l)

addCertificateListener

public static void addCertificateListener(SECertificateListener l)

setCertificateHandler

public static void setCertificateHandler(URL url,
                                         SECertificateListener l)

removeCertificateListener

public static void removeCertificateListener(SECertificateListener l)

getClassContext

public static Class[] getClassContext()