Examples of SEPublicKeyLocator


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

                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

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

     
      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

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

                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
TOP
Copyright © 2018 www.massapi.com. 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.