summaryrefslogtreecommitdiffstats
path: root/ncr-int.h
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-09-06 20:40:43 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-09-06 23:15:24 +0200
commit95496890180536231adfb983dc67c629f26f0caf (patch)
treed0cdb577dac177d42d2e048fe75544679c8a2d20 /ncr-int.h
parenta92443718f19ffc36fbe55d85a4785130a4b33c7 (diff)
downloadcryptodev-linux-95496890180536231adfb983dc67c629f26f0caf.tar.gz
cryptodev-linux-95496890180536231adfb983dc67c629f26f0caf.tar.xz
cryptodev-linux-95496890180536231adfb983dc67c629f26f0caf.zip
Rename CONFIG_AS*YM*METRIC, push into headers
Diffstat (limited to 'ncr-int.h')
-rw-r--r--ncr-int.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/ncr-int.h b/ncr-int.h
index 940adde..fd508d0 100644
--- a/ncr-int.h
+++ b/ncr-int.h
@@ -143,9 +143,18 @@ int ncr_key_generate(struct ncr_lists *lst, const struct ncr_key_generate *gen,
int ncr_key_get_info(struct ncr_lists *lst, struct ncr_out *out,
const struct ncr_key_get_info *info, struct nlattr *tb[]);
+#ifdef CONFIG_CRYPTO_USERSPACE_ASYMMETRIC
int ncr_key_generate_pair(struct ncr_lists *lst,
const struct ncr_key_generate_pair *gen,
struct nlattr *tb[]);
+#else
+static inline int ncr_key_generate_pair(struct ncr_lists *lst,
+ const struct ncr_key_generate_pair *gen,
+ struct nlattr *tb[])
+{
+ return -EOPNOTSUPP;
+}
+#endif
int ncr_key_get_public(struct ncr_lists *lst, void __user * arg);
int ncr_key_item_get_read(struct key_item_st **st, struct ncr_lists *lst,
@@ -165,10 +174,25 @@ int ncr_limits_add_and_check(uid_t uid, pid_t pid, limits_type_t type);
void ncr_limits_init(void);
void ncr_limits_deinit(void);
+#ifdef CONFIG_CRYPTO_USERSPACE_ASYMMETRIC
int ncr_key_wrap(struct ncr_lists *lst, const struct ncr_key_wrap *wrap,
struct nlattr *tb[]);
int ncr_key_unwrap(struct ncr_lists *lst, const struct ncr_key_unwrap *wrap,
struct nlattr *tb[]);
+#else
+static inline int ncr_key_wrap(struct ncr_lists *lst,
+ const struct ncr_key_wrap *wrap,
+ struct nlattr *tb[])
+{
+ return -EOPNOTSUPP;
+}
+static inline int ncr_key_unwrap(struct ncr_lists *lst,
+ const struct ncr_key_unwrap *wrap,
+ struct nlattr *tb[])
+{
+ return -EOPNOTSUPP;
+}
+#endif
int ncr_key_storage_wrap(struct ncr_lists *lst,
const struct ncr_key_storage_wrap *wrap,
struct nlattr *tb[]);