Package org.gudy.azureus2.plugins.utils.security

Examples of org.gudy.azureus2.plugins.utils.security.SEPublicKeyLocator


   *
   * @since 3.0.0.7
   */
  private boolean nextUpdate() {
    if (iterDownloaders.hasNext()) {
      ResourceDownloader downloader = (ResourceDownloader) iterDownloaders.next();
      downloader.addListener(this);
      downloader.asyncDownload();
      return true;
    }
    return false;
  }
View Full Code Here


              }
             
              setProgress( 0 );
             
              downloader.addListener(
                new ResourceDownloaderAdapter()
                {
                  public void
                  reportPercentComplete(
                    ResourceDownloader  downloader,
                    int          percentage )
View Full Code Here

                if ( use_sts ){
                 
                  connection = sec_man.getSTSConnection(
                      connection,
                      my_key,
                      new SEPublicKeyLocator()
                      {
                        public boolean
                        accept(
                          Object    context,
                          SEPublicKey  other_key )
                        {
                          System.out.println( "acceptKey" );
                         
                          return( true );
                        }
                      },
                      "test",
                      block_crypto );
                }
                   
                connection.addListener(
                  new GenericMessageConnectionListener()
                  {
                    public void
                    connected(
                      GenericMessageConnection  connection )
                    {
                    }
                   
                    public void
                    receive(
                      GenericMessageConnection  connection,
                      PooledByteBuffer      message )
                   
                      throws MessageException
                    {
                      System.out.println( "receive: " + message.toByteArray().length );
                     
                      PooledByteBuffer  reply =
                        plugin_interface.getUtilities().allocatePooledByteBuffer(
                            new byte[connection.getMaximumMessageSize()]);
                     
                      connection.send( reply );
                    }
                   
                    public void
                    failed(
                      GenericMessageConnection  connection,
                      Throwable           error )
                   
                      throws MessageException
                    {
                      System.out.println( "Responder connection error:" );

                      error.printStackTrace();
                   
                  });
               
              }catch( Throwable e ){
               
                connection.close();
               
                e.printStackTrace();
              }
             
              return( true );
            }
          });
     
      InetSocketAddress  tcp_target = new InetSocketAddress( "127.0.0.1",     6889 );
      InetSocketAddress  udp_target = new InetSocketAddress( "212.159.18.92",   6881 );
     
      GenericMessageEndpoint  endpoint = reg.createEndpoint( tcp_target );
     
      endpoint.addTCP( tcp_target );
      endpoint.addUDP( udp_target );
     
      while( true ){
       
        try{
          for (int i=0;i<1000;i++){
           
            System.out.println( "Test: initiating connection" );
           
            final AESemaphore  sem = new AESemaphore( "wait!" );
           
            GenericMessageConnection  con = reg.createConnection( endpoint );
           
            if ( use_sts ){
             
              con = sec_man.getSTSConnection(
                con, my_key,
                new SEPublicKeyLocator()
                {
                  public boolean
                  accept(
                    Object      context,
                    SEPublicKey    other_key )
View Full Code Here

     
      con = sec_man.getSTSConnection(
          con,
          sec_man.getPublicKey( SEPublicKey.KEY_TYPE_ECC_192, reason ),
 
          new SEPublicKeyLocator()
          {
            public boolean
            accept(
              Object      context,
              SEPublicKey    other_key )
View Full Code Here

                connection =
                  sec_man.getSTSConnection(
                      connection,
                      sec_man.getPublicKey( SEPublicKey.KEY_TYPE_ECC_192, reason ),
                      new SEPublicKeyLocator()
                      {
                        public boolean
                        accept(
                          Object    context,
                          SEPublicKey  other_key )
View Full Code Here

    props         = new propertyWrapper(_props );
    pluginDir       = _pluginDir;
    config         = new PluginConfigImpl(this,pluginConfigKey);
    given_plugin_id      = _plugin_id;
    plugin_version    = _plugin_version;
    ipc_interface      = new IPCInterfaceImpl( initialiser, plugin );
    state                 = new PluginStateImpl(this, initialiser);
   
    boolean verified   = false;
    boolean bad    = false;
   
View Full Code Here

  }
 
  public IPFilter
  getIPFilter()
  {
    return( new IPFilterImpl());
  }
View Full Code Here

 
  public Logger getLogger()
  {
    if ( logger == null ){
     
      logger = new LoggerImpl( this );
    }
   
    return( logger );
  }
View Full Code Here

    else {
      plug_msg = new MessageAdapter( message )//core created
    }
   
    RawMessage raw_plug = plug_encoder.encodeMessage( plug_msg );
    return new com.aelitis.azureus.core.networkmanager.RawMessage[]{ new RawMessageAdapter( raw_plug )};
  }
View Full Code Here

    return config;
  }


  public PluginConfigUIFactory getPluginConfigUIFactory() {
    return new PluginConfigUIFactoryImpl(config,pluginConfigKey);
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.plugins.utils.security.SEPublicKeyLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.