Module Name: src Committed By: nia Date: Tue Oct 12 17:24:37 UTC 2021
Modified Files: src/external/apache2: Makefile src/lib/libcrypt: Makefile src/tests/usr.bin: Makefile src/usr.bin/pwhash: pwhash.1 Removed Files: src/external/apache2/argon2: Makefile src/external/apache2/argon2/lib: Makefile src/external/apache2/argon2/lib/libargon2: Makefile src/external/apache2/argon2/usr.bin: Makefile src/external/apache2/argon2/usr.bin/argon2: Makefile src/tests/usr.bin/argon2: Makefile t_argon2.sh Log Message: Fix release builds with MKARGON2=yes This changes argon2 from a separately built library into a private dependency of libcrypt and removes the argon2(1) utility (we already have pwhash(1)). Giving libcrypt more library dependencies complicates things (e.g. libcrypt is a dependency of openssl). pthreads support gets disabled in argon2 for similar reasons. For testing argon2, we rely on the libcrypt test suite. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/apache2/Makefile cvs rdiff -u -r1.1 -r0 src/external/apache2/argon2/Makefile cvs rdiff -u -r1.1 -r0 src/external/apache2/argon2/lib/Makefile cvs rdiff -u -r1.2 -r0 src/external/apache2/argon2/lib/libargon2/Makefile cvs rdiff -u -r1.1 -r0 src/external/apache2/argon2/usr.bin/Makefile cvs rdiff -u -r1.2 -r0 src/external/apache2/argon2/usr.bin/argon2/Makefile cvs rdiff -u -r1.27 -r1.28 src/lib/libcrypt/Makefile cvs rdiff -u -r1.34 -r1.35 src/tests/usr.bin/Makefile cvs rdiff -u -r1.1 -r0 src/tests/usr.bin/argon2/Makefile cvs rdiff -u -r1.3 -r0 src/tests/usr.bin/argon2/t_argon2.sh cvs rdiff -u -r1.9 -r1.10 src/usr.bin/pwhash/pwhash.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/apache2/Makefile diff -u src/external/apache2/Makefile:1.3 src/external/apache2/Makefile:1.4 --- src/external/apache2/Makefile:1.3 Mon Nov 11 22:44:57 2019 +++ src/external/apache2/Makefile Tue Oct 12 17:24:36 2021 @@ -1,11 +1,7 @@ -# $NetBSD: Makefile,v 1.3 2019/11/11 22:44:57 joerg Exp $ +# $NetBSD: Makefile,v 1.4 2021/10/12 17:24:36 nia Exp $ .include <bsd.own.mk> -.if (defined(MKARGON2) && ${MKARGON2} != "no") -SUBDIR+= argon2 -.endif - .if (${MKLLVM} != "no" || ${MKLLVMRT} != "no") SUBDIR+= llvm .endif Index: src/lib/libcrypt/Makefile diff -u src/lib/libcrypt/Makefile:1.27 src/lib/libcrypt/Makefile:1.28 --- src/lib/libcrypt/Makefile:1.27 Wed Mar 25 17:11:06 2020 +++ src/lib/libcrypt/Makefile Tue Oct 12 17:24:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.27 2020/03/25 17:11:06 christos Exp $ +# $NetBSD: Makefile,v 1.28 2021/10/12 17:24:36 nia Exp $ .include <bsd.own.mk> @@ -14,9 +14,18 @@ SRCS= crypt.c md5crypt.c bcrypt.c crypt- SRCS+= hmac_sha1.c .if defined(HAVE_ARGON2) +ARGON2DIR= ${NETBSDSRCDIR}/external/apache2/argon2 +.PATH: ${ARGON2DIR}/dist/phc-winner-argon2/src \ + ${ARGON2DIR}/dist/phc-winner-argon2/src/blake2 \ + ${ARGON2DIR}/dist/phc-winner-argon2/include +CPPFLAGS+= -DHAVE_ARGON2 -DARGON2_NO_THREADS +CPPFLAGS+= -I${ARGON2DIR}/dist/phc-winner-argon2/include SRCS+= crypt-argon2.c -CFLAGS+= -DHAVE_ARGON2 -I../../external/apache2/argon2/dist/phc-winner-argon2/include/ -LDADD+= -largon2 +# libargon2 sources +. for src in argon2.c core.c blake2b.c encoding.c ref.c +SRCS+= ${src} +COPTS.${src}+= -Wno-error +. endfor .endif WARNS?= 5 Index: src/tests/usr.bin/Makefile diff -u src/tests/usr.bin/Makefile:1.34 src/tests/usr.bin/Makefile:1.35 --- src/tests/usr.bin/Makefile:1.34 Sun Nov 1 22:28:32 2020 +++ src/tests/usr.bin/Makefile Tue Oct 12 17:24:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.34 2020/11/01 22:28:32 christos Exp $ +# $NetBSD: Makefile,v 1.35 2021/10/12 17:24:36 nia Exp $ # .include <bsd.own.mk> @@ -16,8 +16,4 @@ TESTS_SUBDIRS= awk basename bzip2 cc cmp TESTS_SUBDIRS+= c++ .endif -.if (defined(MKARGON2) && ${MKARGON2} != "no") -TESTS_SUBDIRS+= argon2 -.endif - .include <bsd.test.mk> Index: src/usr.bin/pwhash/pwhash.1 diff -u src/usr.bin/pwhash/pwhash.1:1.9 src/usr.bin/pwhash/pwhash.1:1.10 --- src/usr.bin/pwhash/pwhash.1:1.9 Mon Oct 21 02:36:48 2019 +++ src/usr.bin/pwhash/pwhash.1 Tue Oct 12 17:24:37 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: pwhash.1,v 1.9 2019/10/21 02:36:48 jhigh Exp $ +.\" $NetBSD: pwhash.1,v 1.10 2021/10/12 17:24:37 nia Exp $ .\" $OpenBSD: encrypt.1,v 1.16 2000/11/09 17:52:07 aaron Exp $ .\" .\" Copyright (c) 1996, Jason Downs. All rights reserved. @@ -79,12 +79,15 @@ Following the required .Ar variant name, three optional comma-delimited parameters may be provided, -t=n Specify the number of iterations to n. The default is 3. +t=n Specify the number of iterations to n. +The default is 3. -m=n Specify the memory usage in KB to n. The default is 4096. - -p=n Specify the number of threads to n. The default is 1. +m=n Specify the memory usage in KB to n. +The default is 4096. +p=n Specify the number of threads to n. +This is currently ignored. +The default is 1. .It Fl s Ar salt Encrypt the string using DES, with the specified .Ar salt .