Sha256: f5853914df619b9213feac0d8a4b8334b4a71f6daea043a27e1cf95b1141a711

Contents?: true

Size: 1.32 KB

Versions: 54

Compression:

Stored size: 1.32 KB

Contents

# Trisul Remote Protocol TRP Demo script
# Akhil.M & Dhinesh.K (c) 2010 Unleash Networks
# Testing change 
require 'rubygems'
require './helper'
include TrisulRP::Protocol
include TrisulRP::Guids

class TestTrisulrp < Test::Unit::TestCase

  def setup
    @conn = TrisulRP::Protocol.connect("127.0.0.1",12001,"Demo_Client.crt","Demo_Client.key") 
  end

  def teardown
  end

  def test_flows_for_host

    target_key =  "0A.01.3C.BB"
	
    tmarr  = TrisulRP::Protocol.get_available_time(@conn)

    req = TrisulRP::Protocol.mk_request(TRP::Message::Command::KEY_SESS_ACTIVITY_REQUEST,
        								  :key => target_key ,
										  :time_interval => mk_time_interval(tmarr))

    TrisulRP::Protocol.get_response(@conn,req) do |resp|
		print_session_details(@conn,resp.sessions)
    end

  end

  # test flows for ssh
  # note we need to convert the "ssh" into a key first
  def test_flows_for_appname

    target  =  "ssh"
	target_key =  mk_trisul_key(@conn,CG_APP,target)
	
    tmarr  = TrisulRP::Protocol.get_available_time(@conn)

    req = TrisulRP::Protocol.mk_request(TRP::Message::Command::KEY_SESS_ACTIVITY_REQUEST,
        								  :key => target_key ,
										  :time_interval => mk_time_interval(tmarr))

    TrisulRP::Protocol.get_response(@conn,req) do |resp|
		print_session_details(@conn,resp.sessions)
    end

  end

end


Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
trisulrp-3.2.43 test/test_key_flows.rb
trisulrp-3.2.42 test/test_key_flows.rb
trisulrp-3.2.41 test/test_key_flows.rb
trisulrp-3.2.40 test/test_key_flows.rb
trisulrp-3.2.39 test/test_key_flows.rb
trisulrp-3.2.38 test/test_key_flows.rb
trisulrp-3.2.37 test/test_key_flows.rb
trisulrp-3.2.36 test/test_key_flows.rb
trisulrp-3.2.35 test/test_key_flows.rb
trisulrp-3.2.34 test/test_key_flows.rb
trisulrp-3.2.32 test/test_key_flows.rb
trisulrp-3.2.31 test/test_key_flows.rb
trisulrp-3.2.27 test/test_key_flows.rb
trisulrp-3.2.26 test/test_key_flows.rb
trisulrp-3.2.16 test/test_key_flows.rb
trisulrp-3.2.15 test/test_key_flows.rb
trisulrp-3.2.14 test/test_key_flows.rb
trisulrp-3.2.13 test/test_key_flows.rb
trisulrp-3.2.9 test/test_key_flows.rb
trisulrp-3.2.8 test/test_key_flows.rb