aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/eli/pkcs5v2.c
diff options
context:
space:
mode:
authorAllan Jude <allanjude@FreeBSD.org>2016-01-07 05:47:34 +0000
committerAllan Jude <allanjude@FreeBSD.org>2016-01-07 05:47:34 +0000
commit4332feca4b8144d1842c7ecf98ac4f17bac3c1c6 (patch)
tree3dee209dce2cba23281f42b63e0a9028867952ff /sys/geom/eli/pkcs5v2.c
parentb875c2e96d79d6174c20232829d7b84c0c3c8ca0 (diff)
downloadsrc-4332feca4b8144d1842c7ecf98ac4f17bac3c1c6.tar.gz
src-4332feca4b8144d1842c7ecf98ac4f17bac3c1c6.zip
Make additional parts of sys/geom/eli more usable in userspace
The upcoming GELI support in the loader reuses parts of this code Some ifdefs are added, and some code is moved outside of existing ifdefs The HMAC parts of GELI are broken out into their own file, to separate them from the kernel crypto/openssl dependant parts that are replaced in the boot code. Passed the GELI regression suite (tools/regression/geom/eli) Files=20 Tests=14996 Result: PASS Reviewed by: pjd, delphij MFC after: 1 week Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4699
Notes
Notes: svn path=/head/; revision=293306
Diffstat (limited to 'sys/geom/eli/pkcs5v2.c')
-rw-r--r--sys/geom/eli/pkcs5v2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/geom/eli/pkcs5v2.c b/sys/geom/eli/pkcs5v2.c
index 05677c1b76f1..6992801958ce 100644
--- a/sys/geom/eli/pkcs5v2.c
+++ b/sys/geom/eli/pkcs5v2.c
@@ -83,6 +83,7 @@ pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt,
}
#ifndef _KERNEL
+#ifndef _STAND
/*
* Return the number of microseconds needed for 'interations' iterations.
*/
@@ -120,4 +121,5 @@ pkcs5v2_calculate(int usecs)
}
return (((intmax_t)iterations * (intmax_t)usecs) / v);
}
+#endif /* !_STAND */
#endif /* !_KERNEL */