FileDocCategorySizeDatePackage
SESecurityManager.javaAPI DocAzureus 3.0.3.43995Wed Jun 21 06:44:50 BST 2006org.gudy.azureus2.plugins.utils.security

SESecurityManager

public interface SESecurityManager
author
parg

Fields Summary
public static final int
BLOCK_ENCRYPTION_NONE
public static final int
BLOCK_ENCRYPTION_AES
Constructors Summary
Methods Summary
public voidaddCertificateListener(CertificateListener listener)

public voidaddPasswordListener(PasswordListener listener)

public byte[]calculateSHA1(byte[] data_in)
returns the SHA1 hash of the input data

param
data_in
return

public java.security.cert.CertificatecreateSelfSignedCertificate(java.lang.String alias, java.lang.String cert_dn, int strength)
creates and installs a certificate capable of supporting SSL of type MD5withRSA

param
alias alias - e.g. "mycert"
param
cert_dn dn for the cert e.g. "CN=fred,OU=wap,O=wip,L=here,ST=there,C=GB"
param
strength keyt strength - e.g. 1024
return
throws
Exception

public SEPublicKeydecodePublicKey(byte[] encoded)

public byte[]getIdentity()
Gets this azureus instance's unique random identity

return

public java.security.KeyStoregetKeyStore()

public SEPublicKeygetPublicKey(int key_type, java.lang.String reason_resource)
Gets the public key for this az instance of the supplied key type

param
key_type see KEY_TYPE_x constants in SEPublicKey
param
reason_resource a message text resource giving the reason for the key being required
return

public org.gudy.azureus2.plugins.messaging.generic.GenericMessageConnectiongetSTSConnection(org.gudy.azureus2.plugins.messaging.generic.GenericMessageConnection connection, SEPublicKey my_public_key, SEPublicKeyLocator key_locator, java.lang.String reason_resource, int block_encryption)
Returns a proxy generic STS connection for incoming connection requests

param
connection
param
my_public_key
param
key_locator
return
throws
Exception

public java.security.KeyStoregetTrustStore()

public javax.net.ssl.SSLSocketFactoryinstallServerCertificate(java.net.URL url)
Installs the SSL certificate necessary to support the connection

param
url

public voidremoveCertificateListener(CertificateListener listener)

public voidremovePasswordListener(PasswordListener listener)

public voidrunWithAuthenticator(java.net.Authenticator authenticator, java.lang.Runnable task)