Exemplo n.º 1
0
def get_key_static(keytype, key_path):
    with open(key_path, 'w') as f:
        f.write("[%s]\n" % (gatherkeys.keytype_identity(keytype)))
        f.write("key=fred\n")
Exemplo n.º 2
0
def get_key_static(keytype, key_path):
    with file(key_path, 'w') as f:
        f.write("[%s]\n" % (gatherkeys.keytype_identity(keytype)))
        f.write("key=fred\n")
Exemplo n.º 3
0
def get_key_dynamic(keytype, key_path):
    with open(key_path, 'w', 0o600) as f:
        f.write("[%s]\n" % (gatherkeys.keytype_identity(keytype)))
        f.write("key='%s'" % (new.generate_auth_key()))
Exemplo n.º 4
0
def get_key_dynamic(keytype, key_path):
    with open(key_path, 'w', 0600) as f:
        f.write("[%s]\n" % (gatherkeys.keytype_identity(keytype)))
        f.write("key='%s'" % (new.generate_auth_key()))