예제 #1
0
 def make_tcp_transport_notification( self, session_list, transport_id, obj_id, command_id, **kw ):
     request = tClientNotification(
         iface='test_iface',
         path=[TestModule.name, TestObject.class_name, obj_id],
         command_id=command_id,
         params=test_iface.get_request_params_type(command_id)(**kw),
         )
     log.info('Sending client notification:')
     pprint(tClientPacket, request)
     request_packet = tPacket(
         aux_info=tAuxInfo(requirements=[], type_modules=[], modules=[], routes=[], resources=[]),
         payload=self.encode_packet(transport_id, request, tClientPacket))
     request_packet_data = self.encode_packet(transport_id, request_packet, tPacket)
     transport_request = tTransportPacket(
         transport_id=transport_id,
         data=self.encrypt_packet(session_list, transport_id, request_packet_data))
     return transport_request
예제 #2
0
 def encode_pop_transport_request( self, transport_id, challenge, pop_records ):
     pop_packet = tProofOfPossessionPacket(challenge, pop_records)
     pop_packet_data = self.encode_packet(transport_id, pop_packet, tEncryptedPacket)
     return tTransportPacket(transport_id=transport_id, data=pop_packet_data)