diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-08-27 09:32:48 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-08-27 09:32:48 +0200 |
commit | 9cab3a1a9660ed5f798b063aa7e827eb0c95ba94 (patch) | |
tree | fb5dadde55ce30a6634f113bb6ca35682833ecf3 /crypto/userspace/ncr-dh.c | |
parent | a6d3a923924a7b751981d93ade82854985abebba (diff) | |
parent | 3d758323280763fe59b1f61d4f86aa2a29fe3775 (diff) | |
download | kernel-crypto-9cab3a1a9660ed5f798b063aa7e827eb0c95ba94.tar.gz kernel-crypto-9cab3a1a9660ed5f798b063aa7e827eb0c95ba94.tar.xz kernel-crypto-9cab3a1a9660ed5f798b063aa7e827eb0c95ba94.zip |
Merge branch 'standalone-master' into standalone-rename
Conflicts:
TODO
crypto.4
examples/Makefile
examples/ncr.c
examples/pk.c
examples/speed.c
include/linux/cryptodev.h
userspace/setkey.c
Diffstat (limited to 'crypto/userspace/ncr-dh.c')
-rw-r--r-- | crypto/userspace/ncr-dh.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/crypto/userspace/ncr-dh.c b/crypto/userspace/ncr-dh.c index 235d021fae4..bc45723fe3e 100644 --- a/crypto/userspace/ncr-dh.c +++ b/crypto/userspace/ncr-dh.c @@ -27,7 +27,6 @@ #include <linux/slab.h> #include <linux/random.h> #include <linux/uaccess.h> -#include "cryptodev.h" #include <linux/scatterlist.h> #include <ncr.h> #include <ncr-int.h> @@ -281,3 +280,15 @@ fail: return ret; } + +int ncr_pk_get_dh_size( dh_key* key) +{ +int ret; + ret = mp_count_bits(&key->p); + if (ret <= 0) { + err(); + return -EINVAL; + } + + return ret; +} |