Example #1
0
File: handler.py Project: yws/ipmsg
 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)
Example #2
0
File: handler.py Project: yws/ipmsg
 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)