Package com.biglybt.pif.utils.security
Interface SESecurityManager
- All Known Implementing Classes:
SESecurityManagerImpl
public interface SESecurityManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCertificateListener
(CertificateListener listener) void
addPasswordListener
(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_encryption) Returns a proxy generic STS connection for incoming connection requestsInstalls the SSL certificate necessary to support the connectionvoid
removeCertificateListener
(CertificateListener listener) void
removePasswordListener
(PasswordListener listener) void
runWithAuthenticator
(Authenticator authenticator, Runnable task)
-
Field Details
-
BLOCK_ENCRYPTION_NONE
static final int BLOCK_ENCRYPTION_NONE- See Also:
-
BLOCK_ENCRYPTION_AES
static final int BLOCK_ENCRYPTION_AES- See Also:
-
-
Method Details
-
runWithAuthenticator
-
addPasswordListener
-
removePasswordListener
-
addCertificateListener
-
removeCertificateListener
-
calculateSHA1
byte[] calculateSHA1(byte[] data_in) returns the SHA1 hash of the input data- Parameters:
data_in
-- Returns:
-
installServerCertificate
Installs the SSL certificate necessary to support the connection- Parameters:
url
-
-
createSelfSignedCertificate
Certificate createSelfSignedCertificate(String alias, String cert_dn, int strength) throws Exception creates and installs a certificate capable of supporting SSL of type MD5withRSA- 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
byte[] getIdentity()Gets this the client instance's unique random identity- Returns:
-
getPublicKey
Gets the public key for this az instance of the supplied key type- 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
- Throws:
Exception
-
getSTSConnection
GenericMessageConnection getSTSConnection(GenericMessageConnection connection, SEPublicKey my_public_key, SEPublicKeyLocator key_locator, String reason_resource, int block_encryption) throws Exception Returns a proxy generic STS connection for incoming connection requests- Parameters:
connection
-my_public_key
-key_locator
-- Returns:
- Throws:
Exception
-