|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.local.utils.security.SESecurityManagerImpl
public class SESecurityManagerImpl
Field Summary |
---|
Fields inherited from interface org.gudy.azureus2.plugins.utils.security.SESecurityManager |
---|
BLOCK_ENCRYPTION_AES, BLOCK_ENCRYPTION_NONE |
Constructor Summary | |
---|---|
SESecurityManagerImpl(AzureusCore _core)
|
Method Summary | |
---|---|
void |
addCertificateListener(CertificateListener listener)
|
void |
addPasswordListener(PasswordListener listener)
|
byte[] |
calculateSHA1(byte[] data_in)
returns the SHA1 hash of the input data |
Certificate |
createSelfSignedCertificate(String alias,
String cert_dn,
int strength)
creates and installs a certificate capable of supporting SSL of type MD5withRSA |
SEPublicKey |
decodePublicKey(byte[] encoded)
|
byte[] |
getIdentity()
Gets this azureus instance's unique random identity |
KeyStore |
getKeyStore()
|
SEPublicKey |
getPublicKey(int key_type,
String reason_resource)
Gets the public key for this az instance of the supplied key type |
GenericMessageConnection |
getSTSConnection(GenericMessageConnection connection,
SEPublicKey my_public_key,
SEPublicKeyLocator key_locator,
String reason_resource,
int block_crypto)
Returns a proxy generic STS connection for incoming connection requests |
KeyStore |
getTrustStore()
|
SSLSocketFactory |
installServerCertificate(URL url)
Installs the SSL certificate necessary to support the connection |
void |
removeCertificateListener(CertificateListener listener)
|
void |
removePasswordListener(PasswordListener listener)
|
void |
runWithAuthenticator(Authenticator authenticator,
Runnable target)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SESecurityManagerImpl(AzureusCore _core)
Method Detail |
---|
public byte[] calculateSHA1(byte[] data_in)
SESecurityManager
calculateSHA1
in interface SESecurityManager
public void runWithAuthenticator(Authenticator authenticator, Runnable target)
runWithAuthenticator
in interface SESecurityManager
public void addPasswordListener(PasswordListener listener)
addPasswordListener
in interface SESecurityManager
public void removePasswordListener(PasswordListener listener)
removePasswordListener
in interface SESecurityManager
public void addCertificateListener(CertificateListener listener)
addCertificateListener
in interface SESecurityManager
public void removeCertificateListener(CertificateListener listener)
removeCertificateListener
in interface SESecurityManager
public SSLSocketFactory installServerCertificate(URL url)
SESecurityManager
installServerCertificate
in interface SESecurityManager
public KeyStore getKeyStore() throws Exception
getKeyStore
in interface SESecurityManager
Exception
public KeyStore getTrustStore() throws Exception
getTrustStore
in interface SESecurityManager
Exception
public Certificate createSelfSignedCertificate(String alias, String cert_dn, int strength) throws Exception
SESecurityManager
createSelfSignedCertificate
in interface SESecurityManager
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
Exception
public byte[] getIdentity()
SESecurityManager
getIdentity
in interface SESecurityManager
public SEPublicKey getPublicKey(int key_type, String reason_resource) throws Exception
SESecurityManager
getPublicKey
in interface SESecurityManager
key_type
- see KEY_TYPE_x constants in SEPublicKeyreason_resource
- a message text resource giving the reason for the key being required
Exception
public SEPublicKey decodePublicKey(byte[] encoded)
decodePublicKey
in interface SESecurityManager
public GenericMessageConnection getSTSConnection(GenericMessageConnection connection, SEPublicKey my_public_key, SEPublicKeyLocator key_locator, String reason_resource, int block_crypto) throws Exception
SESecurityManager
getSTSConnection
in interface SESecurityManager
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |