📄 sesecuritymanager.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: SESecurityManager.java
package org.gudy.azureus2.core3.security;
import java.net.PasswordAuthentication;
import java.net.URL;
import java.security.KeyStore;
import java.security.cert.Certificate;
import javax.net.ssl.SSLServerSocketFactory;
import javax.net.ssl.SSLSocketFactory;
import org.gudy.azureus2.core3.security.impl.SESecurityManagerImpl;
// Referenced classes of package org.gudy.azureus2.core3.security:
// SEKeyDetails, SEPasswordListener, SECertificateListener
public class SESecurityManager
{
public static final String SSL_CERTS = ".certs";
public static final String SSL_KEYS = ".keystore";
public static final String SSL_PASSWORD = "changeit";
public static final String DEFAULT_ALIAS = "Azureus";
public SESecurityManager()
{
}
public static void initialise()
{
SESecurityManagerImpl.getSingleton().initialise();
}
public static void exitVM(int status)
{
SESecurityManagerImpl.getSingleton().exitVM(status);
}
public static void stopThread(Thread t)
{
SESecurityManagerImpl.getSingleton().stopThread(t);
}
public static void installAuthenticator()
{
SESecurityManagerImpl.getSingleton().installAuthenticator();
}
public static String getKeystoreName()
{
return SESecurityManagerImpl.getSingleton().getKeystoreName();
}
public static String getKeystorePassword()
{
return SESecurityManagerImpl.getSingleton().getKeystorePassword();
}
public static SSLServerSocketFactory getSSLServerSocketFactory()
throws Exception
{
return SESecurityManagerImpl.getSingleton().getSSLServerSocketFactory();
}
public static SSLSocketFactory getSSLSocketFactory()
{
return SESecurityManagerImpl.getSingleton().getSSLSocketFactory();
}
public static SSLSocketFactory installServerCertificates(URL https_url)
{
return SESecurityManagerImpl.getSingleton().installServerCertificates(https_url);
}
public static SSLSocketFactory installServerCertificates(String alias, String ip, int port)
{
return SESecurityManagerImpl.getSingleton().installServerCertificates(alias, ip, port);
}
public static Certificate createSelfSignedCertificate(String alias, String cert_dn, int strength)
throws Exception
{
return SESecurityManagerImpl.getSingleton().createSelfSignedCertificate(alias, cert_dn, strength);
}
public static SEKeyDetails getKeyDetails(String alias)
throws Exception
{
return SESecurityManagerImpl.getSingleton().getKeyDetails(alias);
}
public static KeyStore getKeyStore()
throws Exception
{
return SESecurityManagerImpl.getSingleton().getKeyStore();
}
public static KeyStore getTrustStore()
throws Exception
{
return SESecurityManagerImpl.getSingleton().getTrustStore();
}
public static PasswordAuthentication getPasswordAuthentication(String realm, URL tracker)
{
return SESecurityManagerImpl.getSingleton().getPasswordAuthentication(realm, tracker);
}
public static void setPasswordAuthenticationOutcome(String realm, URL tracker, boolean success)
{
SESecurityManagerImpl.getSingleton().setPasswordAuthenticationOutcome(realm, tracker, success);
}
public static void addPasswordListener(SEPasswordListener l)
{
SESecurityManagerImpl.getSingleton().addPasswordListener(l);
}
public static void removePasswordListener(SEPasswordListener l)
{
SESecurityManagerImpl.getSingleton().removePasswordListener(l);
}
public static void clearPasswords()
{
SESecurityManagerImpl.getSingleton().clearPasswords();
}
public static void setThreadPasswordHandler(SEPasswordListener l)
{
SESecurityManagerImpl.getSingleton().setThreadPasswordHandler(l);
}
public static void unsetThreadPasswordHandler()
{
SESecurityManagerImpl.getSingleton().unsetThreadPasswordHandler();
}
public static void setPasswordHandler(URL url, SEPasswordListener l)
{
SESecurityManagerImpl.getSingleton().setPasswordHandler(url, l);
}
public static void addCertificateListener(SECertificateListener l)
{
SESecurityManagerImpl.getSingleton().addCertificateListener(l);
}
public static void setCertificateHandler(URL url, SECertificateListener l)
{
SESecurityManagerImpl.getSingleton().setCertificateHandler(url, l);
}
public static void removeCertificateListener(SECertificateListener l)
{
SESecurityManagerImpl.getSingleton().removeCertificateListener(l);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -