Пример #1
0
 def rsps_anspubkey(self, p, contact):
     addr = contact.addr
     enc_capa, key = re.split(':', p.msg, 1)
     logger.debug('anspubkey: %s, %s, %s' % (repr(addr), enc_capa, key))
     cry.memo(addr, enc_capa, key)
     for msg in self.messages:
         if msg.io == 0 and msg.is_need_rsakey():
             msg.try_make_packet()
             if msg.is_ready():
                 engine.send_packet(msg.packet)
Пример #2
0
 def rsps_getpubkey(self, p, contact):
     addr = contact.addr
     cry.memo(addr, capa=p.msg)
     tag = c.IPMSG_ANSPUBKEY
     msg = cry.get_pubkey_raw(addr)
     engine.send(addr, tag, msg)