diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-08-27 09:31:07 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-08-27 09:31:07 +0200 |
commit | 3d758323280763fe59b1f61d4f86aa2a29fe3775 (patch) | |
tree | f195a8cb4aa2ff6fbb5a51e0e6c13df1968401b6 /ncr-dh.c | |
parent | 40b5088d61e6f0830302b253ad407d06e46364b6 (diff) | |
parent | dd5317620d70e6b438e40370163257e47ca385a3 (diff) | |
download | kernel-crypto-3d758323280763fe59b1f61d4f86aa2a29fe3775.tar.gz kernel-crypto-3d758323280763fe59b1f61d4f86aa2a29fe3775.tar.xz kernel-crypto-3d758323280763fe59b1f61d4f86aa2a29fe3775.zip |
Merge remote branch 'standalone/master' into standalone-master
Conflicts:
cryptodev_main.c
ncr-int.h
ncr.c
Diffstat (limited to 'ncr-dh.c')
-rw-r--r-- | ncr-dh.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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; +} |