summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/misc.c
diff options
context:
space:
mode:
authortobez <tobez@FreeBSD.org>2005-03-29 11:44:17 +0000
committertobez <tobez@FreeBSD.org>2005-03-29 11:44:17 +0000
commit33bcab28052aed309c71543e4d9db75259feffda (patch)
tree3649da480656bca08f4c722336ccea910c49eb2f /usr.sbin/mtree/misc.c
parent5f6d29a6e04fc4f90eea3974de0b53b8d24b2e87 (diff)
downloadFreeBSD-src-33bcab28052aed309c71543e4d9db75259feffda.zip
FreeBSD-src-33bcab28052aed309c71543e4d9db75259feffda.tar.gz
Adds sha256 support. While it is a good idea to also add sha384 and
sha512, I did not do that since it is not entirely clear where "the one true place" to hold their implementations is going to be. Sha256 is different since mtree already links against libmd. Make recommended procedure for integrity checking in the manpage consistent. Fix a bug with -f spec1 -f spec2 comparison, which prevented test/tes03.sh from running successfully. Reviewed by: phk, cperciva
Diffstat (limited to 'usr.sbin/mtree/misc.c')
-rw-r--r--usr.sbin/mtree/misc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/mtree/misc.c b/usr.sbin/mtree/misc.c
index cc211f0..8f5344e 100644
--- a/usr.sbin/mtree/misc.c
+++ b/usr.sbin/mtree/misc.c
@@ -72,6 +72,9 @@ static KEY keylist[] = {
#ifdef SHA1
{"sha1digest", F_SHA1, NEEDVALUE},
#endif
+#ifdef SHA256
+ {"sha256digest", F_SHA256, NEEDVALUE},
+#endif
{"size", F_SIZE, NEEDVALUE},
{"time", F_TIME, NEEDVALUE},
{"type", F_TYPE, NEEDVALUE},
OpenPOWER on IntegriCloud