summaryrefslogtreecommitdiffstats
path: root/include/crypto/keystore.h
blob: 29915854b85113cb5829b18828ef431144306a66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * Copyright (C) 2015 Pengutronix, Marc Kleine-Budde <kernel@pengutronix.de>
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License version 2 as published by the
 * Free Software Foundation.
 */

#ifndef __CRYPTO_KEYSTORE_H
#define __CRYPTO_KEYSTORE_H

#ifdef CONFIG_CRYPTO_KEYSTORE
int keystore_get_secret(const char *name, const u8 **secret, int *secret_len);
int keystore_set_secret(const char *name, const u8 *secret, int secret_len);
#else
static inline int keystore_get_secret(const char *name, const u8 **secret, int *secret_len)
{
	return -EINVAL;
}
static inline int keystore_set_secret(const char *name, const u8 *secret, int secret_len)
{
	return 0;
}
#endif

#endif