|
|||||||||
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 |
java.security.cert.Certificate |
createSelfSignedCertificate(java.lang.String alias,
java.lang.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 |
java.security.KeyStore |
getKeyStore()
|
SEPublicKey |
getPublicKey(int key_type,
java.lang.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,
java.lang.String reason_resource,
int block_crypto)
Returns a proxy generic STS connection for incoming connection requests |
java.security.KeyStore |
getTrustStore()
|
javax.net.ssl.SSLSocketFactory |
installServerCertificate(java.net.URL url)
Installs the SSL certificate necessary to support the connection |
void |
removeCertificateListener(CertificateListener listener)
|
void |
removePasswordListener(PasswordListener listener)
|
void |
runWithAuthenticator(java.net.Authenticator authenticator,
java.lang.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(java.net.Authenticator authenticator, java.lang.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 javax.net.ssl.SSLSocketFactory installServerCertificate(java.net.URL url)
SESecurityManager
installServerCertificate
in interface SESecurityManager
public java.security.KeyStore getKeyStore() throws java.lang.Exception
getKeyStore
in interface SESecurityManager
java.lang.Exception
public java.security.KeyStore getTrustStore() throws java.lang.Exception
getTrustStore
in interface SESecurityManager
java.lang.Exception
public java.security.cert.Certificate createSelfSignedCertificate(java.lang.String alias, java.lang.String cert_dn, int strength) throws java.lang.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
java.lang.Exception
public byte[] getIdentity()
SESecurityManager
getIdentity
in interface SESecurityManager
public SEPublicKey getPublicKey(int key_type, java.lang.String reason_resource) throws java.lang.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
java.lang.Exception
public SEPublicKey decodePublicKey(byte[] encoded)
decodePublicKey
in interface SESecurityManager
public GenericMessageConnection getSTSConnection(GenericMessageConnection connection, SEPublicKey my_public_key, SEPublicKeyLocator key_locator, java.lang.String reason_resource, int block_crypto) throws java.lang.Exception
SESecurityManager
getSTSConnection
in interface SESecurityManager
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |