Class SESecurityManagerImpl
java.lang.Object
com.biglybt.core.security.impl.SESecurityManagerImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static booleanprivate static booleanprotected final CopyOnWriteList<SECertificateListener> protected booleanprivate Constructorprivate booleanprivate booleanprotected Stringprotected static Stringprivate static final LogIDsprotected final CopyOnWriteList<SEPasswordListener> protected static final SESecurityManagerImpl(package private) final Listprotected final AEMonitorprivate static final ThreadLocal<Object> protected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidaddCertToKeyStore(String alias, Key public_key, Certificate[] certChain) protected SSLSocketFactoryaddCertToTrustStore(String alias, Certificate cert, boolean update_https_factory) voidprotected booleanprotected booleanvoidprivate SSLSocketcreateInstallServerCertificatesSocket(TrustManager[] trustAllCerts, String host, int port, boolean sni_hack, boolean use_proxy) createSelfSignedCertificate(String alias, String cert_dn, int strength) protected booleanensureStoreExists(String name) voidexitVM(int status) booleanfilterNetworkInterfaces(List<NetworkInterface> interfaces) getAllTrustingTrustManager(X509TrustManager delegate) getAuthentication(String realm, String protocol, String host, int port) Class<?>[]getKeyDetails(String alias) getPasswordAuthentication(String realm, URL tracker) static SESecurityManagerImplprivate KeyStoreprivate KeyStoregetTrustStore(boolean attempt_recovery) private voidvoidvoidprotected voidinstallServerCertificates(String alias, String host, int port) private SSLSocketFactoryinstallServerCertificates(String alias, String host, int port, boolean sni_hack, boolean use_proxy) installServerCertificates(URL https_url) private SSLSocketFactoryinstallServerCertificates(URL https_url, boolean sni_hack, boolean dh_hack, boolean use_proxy) protected booleanprivate KeyStoreprivate KeyStoreloadKeyStore(KeyManagerFactory keyManagerFactory) static voidvoidvoidbooleanresetTrustStore(boolean test_only) private booleanresetTrustStore(boolean test_only, boolean recovering) voidvoidsetPasswordAuthenticationOutcome(String realm, URL tracker, boolean success) voidsetPasswordHandler(URL url, SEPasswordListener l) voidvoidstopThread(Thread t) void
-
Field Details
-
LOGID
-
singleton
-
KEYSTORE_TYPE
-
auto_install_certs
private static boolean auto_install_certs -
auto_decline_certs
private static boolean auto_decline_certs -
keystore_name
-
truststore_name
-
certificate_listeners
-
password_listeners
-
tls
-
password_handlers
-
certificate_handlers
-
exit_vm_permitted
protected boolean exit_vm_permitted -
my_sec_man
-
store_mon
-
initialized
private boolean initialized -
stoppable_threads
-
hack_constructor_tried
private boolean hack_constructor_tried -
hack_constructor
-
-
Constructor Details
-
SESecurityManagerImpl
public SESecurityManagerImpl()
-
-
Method Details
-
getSingleton
-
initialise
public void initialise() -
initEmptyTrustStore
private void initEmptyTrustStore() -
resetTrustStore
public boolean resetTrustStore(boolean test_only) -
resetTrustStore
private boolean resetTrustStore(boolean test_only, boolean recovering) -
getKeystoreName
-
getKeystorePassword
-
installSecurityManager
protected void installSecurityManager() -
isStoppableThread
protected boolean isStoppableThread() -
stopThread
-
canExitVM
protected boolean canExitVM() -
exitVM
public void exitVM(int status) -
installAuthenticator
public void installAuthenticator() -
getAuthentication
public PasswordAuthentication getAuthentication(String realm, String protocol, String host, int port) -
checkKeyStoreHasEntry
protected boolean checkKeyStoreHasEntry() -
ensureStoreExists
-
getTrustStore
-
getTrustStore
-
loadKeyStore
-
loadKeyStore
- Throws:
Exception
-
getSSLServerSocketFactory
- Throws:
Exception
-
getKeyDetails
- Throws:
Exception
-
createSelfSignedCertificate
public Certificate createSelfSignedCertificate(String alias, String cert_dn, int strength) throws Exception - Throws:
Exception
-
getTrustManagerFactory
-
getSSLSocketFactory
-
getAllTrustingTrustManager
-
getAllTrustingTrustManager
-
installServerCertificates
-
installServerCertificates
-
createInstallServerCertificatesSocket
private SSLSocket createInstallServerCertificatesSocket(TrustManager[] trustAllCerts, String host, int port, boolean sni_hack, boolean use_proxy) throws Throwable - Throws:
Throwable
-
installServerCertificates
private SSLSocketFactory installServerCertificates(URL https_url, boolean sni_hack, boolean dh_hack, boolean use_proxy) throws Throwable - Throws:
Throwable
-
installServerCertificates
private SSLSocketFactory installServerCertificates(String alias, String host, int port, boolean sni_hack, boolean use_proxy) throws Throwable - Throws:
Throwable
-
addCertToKeyStore
protected void addCertToKeyStore(String alias, Key public_key, Certificate[] certChain) throws Exception - Throws:
Exception
-
addCertToTrustStore
protected SSLSocketFactory addCertToTrustStore(String alias, Certificate cert, boolean update_https_factory) throws Exception - Throws:
Exception
-
getPasswordAuthentication
-
setPasswordAuthenticationOutcome
-
addPasswordListener
-
removePasswordListener
-
clearPasswords
public void clearPasswords() -
setThreadPasswordHandler
-
unsetThreadPasswordHandler
public void unsetThreadPasswordHandler() -
setPasswordHandler
-
addCertificateListener
-
setCertificateHandler
-
removeCertificateListener
-
getClassContext
-
filterNetworkInterfaces
-
main
-