コード例 #1
0
def util_store_secret(obj, data, sec_uid, tokens, col_uid, verifiers):

    tokens = list(tokens)
    verifiers = list(verifiers)
    sec_uid, col_uid, verifiers = utilities.store_secret(data, sec_uid=sec_uid, tokens=tokens,
                                                         col_uid=col_uid, verifiers=verifiers,
                                                         conf=obj['conf'],
                                                         ac_server_names=[obj['srv_ac']],
                                                         storage_server_names=[obj['srv_storage']],
                                                         account_uid=obj['account_uid'],
                                                         client_uid=obj['client_uid'])
    verfiers = [str(v) for v in verifiers]
    msg = "Stored secret '{}' ".format(sec_uid)
    msg += "in collection '{}' ".format(col_uid)
    msg += "using verifiers {}".format(verfiers)
    click.echo(msg)
コード例 #2
0
ファイル: keys.py プロジェクト: taylorjandrews/FuseBox
def create_data():
    # Fetch the default verifier
    cfile = "./dropfuse.ini"
    config = ConfigParser.SafeConfigParser()
    config.read(cfile)

    ver = config.get('tutamen', 'verifier')

    # Temporary measure to create the key
    key = create_key()

    # Store the key in a collection and secret
    suuid, cuuid, verifiers = utilities.store_secret(key, verifiers=[ver])

    # Return the external metadata for new files
    return {"cuuid" : str(cuuid),  "suuid" : str(suuid), "size" : 0}