def create_certificate(payload, org_name=PUB_KEY_ORGANIZATION, signer=None):
    parameters = get_params()
    encryption_algorithm = get_encryption_algorithm(payload)

    key = generate_key()
    key_export = generate_key_export(key, encryption_algorithm)

    if not signer:
        signer = PubKeyClient().get_signer()
    cert = build_certificate(parameters, payload, key,
                             signer.get_public_key().as_hex(), org_name)

    return cert, key, key_export
Exemplo n.º 2
0
async def get_node_config(request):
    client = PubKeyClient()
    return {
        'node_public_key': client.get_public_key(),
    }
Exemplo n.º 3
0
async def get_node_config(request):
    client = PubKeyClient()
    return {
        'node_public_key': client.get_public_key(),
        'storage_public_key': client.get_setting_value(SETTINGS_STORAGE_PUB_KEY),
    }
Exemplo n.º 4
0
def get():
    client = PubKeyClient()
    return {'pubkey': client.get_public_key()}