Esempio n. 1
0
def add_key(name, public_key):
    global pub_keys_db
    if pub_keys_db.has_key(name):
        return
    pub_keys_db[name] = keys.Key.fromString( public_key )
    transport_control.log('ssh', 'add public key to db for ' + name)
    dhnio.Dprint(10, "transport_ssh.add_key for " + name)
Esempio n. 2
0
def remove_key(name):
    global pub_keys_db
    transport_control.log('ssh', 'remove public key of ' + name)
    if (pub_keys_db.has_key(name)):
        pub_keys_db.pop(name)