Class SESecurityManagerImpl
java.lang.Object
com.biglybt.pifimpl.local.utils.security.SESecurityManagerImpl
- All Implemented Interfaces:
SESecurityManager
-
Field Summary
FieldsFields inherited from interface SESecurityManager
BLOCK_ENCRYPTION_AES, BLOCK_ENCRYPTION_NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCertificateListener(CertificateListener listener) voidaddPasswordListener(PasswordListener listener) byte[]calculateSHA1(byte[] data_in) returns the SHA1 hash of the input datacreateSelfSignedCertificate(String alias, String cert_dn, int strength) creates and installs a certificate capable of supporting SSL of type MD5withRSAbyte[]Gets this the client instance's unique random identitygetPublicKey(int key_type, int instance, String reason_resource) getPublicKey(int key_type, String reason_resource) Gets the public key for this az instance of the supplied key typegetSTSConnection(GenericMessageConnection connection, SEPublicKey my_public_key, SEPublicKeyLocator key_locator, String reason_resource, int block_crypto) Returns a proxy generic STS connection for incoming connection requestsInstalls the SSL certificate necessary to support the connectionvoidremoveCertificateListener(CertificateListener listener) voidremovePasswordListener(PasswordListener listener) voidrunWithAuthenticator(Authenticator authenticator, Runnable target)
-
Field Details
-
core
-
password_listeners
-
certificate_listeners
-
-
Constructor Details
-
SESecurityManagerImpl
-
-
Method Details
-
calculateSHA1
public byte[] calculateSHA1(byte[] data_in) Description copied from interface:SESecurityManagerreturns the SHA1 hash of the input data- Specified by:
calculateSHA1in interfaceSESecurityManager- Parameters:
data_in-- Returns:
-
runWithAuthenticator
- Specified by:
runWithAuthenticatorin interfaceSESecurityManager
-
addPasswordListener
- Specified by:
addPasswordListenerin interfaceSESecurityManager
-
removePasswordListener
- Specified by:
removePasswordListenerin interfaceSESecurityManager
-
addCertificateListener
- Specified by:
addCertificateListenerin interfaceSESecurityManager
-
removeCertificateListener
- Specified by:
removeCertificateListenerin interfaceSESecurityManager
-
installServerCertificate
Description copied from interface:SESecurityManagerInstalls the SSL certificate necessary to support the connection- Specified by:
installServerCertificatein interfaceSESecurityManager- Parameters:
url-
-
createSelfSignedCertificate
public Certificate createSelfSignedCertificate(String alias, String cert_dn, int strength) throws Exception Description copied from interface:SESecurityManagercreates and installs a certificate capable of supporting SSL of type MD5withRSA- Specified by:
createSelfSignedCertificatein interfaceSESecurityManager- Parameters:
alias- alias - e.g. "mycert"cert_dn- dn for the cert e.g. "CN=fred,OU=wap,O=wip,L=here,ST=there,C=GB"strength- keyt strength - e.g. 1024- Returns:
- Throws:
Exception
-
getIdentity
public byte[] getIdentity()Description copied from interface:SESecurityManagerGets this the client instance's unique random identity- Specified by:
getIdentityin interfaceSESecurityManager- Returns:
-
getPublicKey
Description copied from interface:SESecurityManagerGets the public key for this az instance of the supplied key type- Specified by:
getPublicKeyin interfaceSESecurityManager- Parameters:
key_type- see KEY_TYPE_x constants in SEPublicKeyreason_resource- a message text resource giving the reason for the key being required- Returns:
- Throws:
Exception
-
getPublicKey
public SEPublicKey getPublicKey(int key_type, int instance, String reason_resource) throws Exception - Specified by:
getPublicKeyin interfaceSESecurityManager- Throws:
Exception
-
getSTSConnection
public GenericMessageConnection getSTSConnection(GenericMessageConnection connection, SEPublicKey my_public_key, SEPublicKeyLocator key_locator, String reason_resource, int block_crypto) throws Exception Description copied from interface:SESecurityManagerReturns a proxy generic STS connection for incoming connection requests- Specified by:
getSTSConnectionin interfaceSESecurityManager- Parameters:
connection-my_public_key-key_locator-- Returns:
- Throws:
Exception
-