Exemple #1
0
 def setup0_request(self):
     setup_req = session_pb2.SessionData()
     setup_req.sec_ver = session_pb2.SecScheme1
     self.__generate_key()
     setup_req.sec1.sc0.client_pubkey = self.client_public_key
     self._print_verbose("client_public_key:\t" +
                         setup_req.sec1.sc0.client_pubkey.encode('hex'))
     return setup_req.SerializeToString()
Exemple #2
0
 def setup0_request(self):
     # Form SessionCmd0 request packet using client public key
     setup_req = session_pb2.SessionData()
     setup_req.sec_ver = session_pb2.SecScheme1
     self.__generate_key()
     setup_req.sec1.sc0.client_pubkey = self.client_public_key
     self._print_verbose('Client Public Key:\t' + utils.str_to_hexstr(self.client_public_key.decode('latin-1')))
     return setup_req.SerializeToString().decode('latin-1')
Exemple #3
0
 def setup0_request(self):
     setup_req = session_pb2.SessionData()
     setup_req.sec_ver = session_pb2.SecScheme1
     self.__generate_key()
     setup_req.sec1.sc0.client_pubkey = self.client_public_key.public_bytes(
     )
     self._print_verbose(
         "Client Public Key:\t" +
         utils.bytes_to_hexstr(setup_req.sec1.sc0.client_pubkey))
     return setup_req.SerializeToString()