Beispiel #1
0
Datei: pbp.py Projekt: fpletz/pbp
def mpecdh_end_handler(id, self, infile = None, outfile = None, basedir = None):
    ctx = ecdh.MPECDH(id, me = self, basedir = basedir)
    ctx.load()
    keychain = ctx.mpecdh2(ecdh.load_dh_keychain(infile))
    if keychain:
        ecdh.save_dh_keychain(outfile, keychain)
    return ctx.secret
Beispiel #2
0
def mpecdh_end_handler(id, self, infile=None, outfile=None, basedir=None):
    ctx = ecdh.MPECDH(id, me=self, basedir=basedir)
    ctx.load()
    keychain = ctx.mpecdh2(ecdh.load_dh_keychain(infile))
    if keychain:
        ecdh.save_dh_keychain(outfile, keychain)
    return ctx.secret
Beispiel #3
0
Datei: pbp.py Projekt: fpletz/pbp
def mpecdh_start_handler(id, peer_count, self, infile = None, outfile = None, basedir = None):
    ctx = ecdh.MPECDH(id, peers = peer_count, me = self, basedir = basedir)
    keychain = ctx.mpecdh1(ecdh.load_dh_keychain(infile))
    if not hasattr(ctx,'secret'):
        ctx.save()
    clearmem(ctx.key)
    ctx.key=None
    ecdh.save_dh_keychain(outfile, keychain)
    if hasattr(ctx,'secret'):
        return ctx.secret
Beispiel #4
0
def mpecdh_start_handler(id,
                         peer_count,
                         self,
                         infile=None,
                         outfile=None,
                         basedir=None):
    ctx = ecdh.MPECDH(id, peers=peer_count, me=self, basedir=basedir)
    keychain = ctx.mpecdh1(ecdh.load_dh_keychain(infile))
    if not hasattr(ctx, 'secret'):
        ctx.save()
    clearmem(ctx.key)
    ctx.key = None
    ecdh.save_dh_keychain(outfile, keychain)
    if hasattr(ctx, 'secret'):
        return ctx.secret