From nobody Wed Aug 3 20:18:56 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lyjr03B3dz4Yd8j; Wed, 3 Aug 2022 20:19:12 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lyjqz2t4yz3Jbh; Wed, 3 Aug 2022 20:19:11 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-ej1-x62b.google.com with SMTP id tl27so15537801ejc.1; Wed, 03 Aug 2022 13:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=eGcsu/Pa0LoDIeKlhrMLUtRk+qqjyoGi8GYKyQbLV7E=; b=gcW3eAnR/qZ1Uk9NMZBbpu3nsKK4gZqvKolA1tY9h+DRLcw8UJ7oNkPwCYoEw4HFAd ARpqJASMvDcGNL06SctEzK05Cy6m49ppFVHwNFR26y1gtaRnUzNPH37O7UxvWwBOrVoS v++qK1z3i2pphpO27Gq2tVEevj75BdmdmlZM9xe6rowvaMp7dWEz0HSzXRxy9OfypyZE 4j7tIthuKtb9nJfw18D0EswHzqKIkBbA9j1DRAj4sVOsyXp36xR5x9ZInWtuyFF+hFHm tTy6WWCP/XhLyGIj5ba7LHS9FH/IUyaEt2bJzkfpSL5XO+TQljhr3yHsOI+RytiwhAXN 58og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=eGcsu/Pa0LoDIeKlhrMLUtRk+qqjyoGi8GYKyQbLV7E=; b=vXyGVSUBUMG++CHkSP0vRZUyjR21JYkAAUa1PejXTTOH8IsqXOdEH5rK7Wk+DUGz3s IK1iEnalfAA1q0lE8ToPJDlFiOqHl4SZRMl1QRB1P8LVeXNKDqQPvYiYAryNrwFPvO7q 7lDvVEcZv886hyKjWybl7MKivA3BTb8baZuU3I4KheQsKtXtT+PNG1YUdaSSSPA1Kgnu Gy6WgxiysiZ3+cK3GALFfGpGy71z7VG5tXdG6cA/W6hWVJd27ptz8h1FIOAqMdMfHVAX 6RaeSIlNcD3AlVCB0w7/A9EWdX3e8I7Go0kDaJSGFsKQK08Tav2hh/IfbWFV96WkxE2D Zzag== X-Gm-Message-State: AJIora82W1GhUWfrNV89VVLBPxKPPxjsLDkvcZM2mtyTuS5mQtJXcZyX Xk9Mk+4yJSEVvO86t89i8Q6MKLMEryy0tTtFdGCVMoFBqss= X-Google-Smtp-Source: AGRyM1vJfzS8TnQY9/oOn0SstnsGY96pBKrV236j9GsjW9yvpuSc0/IOtcK8Quq/lxZ87okK9Z8x0H45yC482kEU8z4= X-Received: by 2002:a17:907:1b0e:b0:72f:9b43:b98c with SMTP id mp14-20020a1709071b0e00b0072f9b43b98cmr21247131ejc.710.1659557949209; Wed, 03 Aug 2022 13:19:09 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202208031925.273JPBMo049062@gitrepo.freebsd.org> In-Reply-To: <202208031925.273JPBMo049062@gitrepo.freebsd.org> From: Xin LI Date: Wed, 3 Aug 2022 13:18:56 -0700 Message-ID: Subject: Re: git: c7a8e8d372b2 - main - xinstall: make md5 and ripemd160 conditional To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: "src-committers@freebsd.org" , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000000c02b505e55bf253" X-Rspamd-Queue-Id: 4Lyjqz2t4yz3Jbh X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=gcW3eAnR; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of delphij@gmail.com designates 2a00:1450:4864:20::62b as permitted sender) smtp.mailfrom=delphij@gmail.com X-Spamd-Result: default: False [-3.98 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; NEURAL_HAM_SHORT(-0.98)[-0.982]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEFALL_USER(0.00)[delphij]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62b:from]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --0000000000000c02b505e55bf253 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Can we also make SHA1 optional too? On Wed, Aug 3, 2022 at 12:25 PM Dag-Erling Sm=C3=B8rgrav = wrote: > The branch main has been updated by des: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dc7a8e8d372b212c97dde6ce2731db27= aa0b2201c > > commit c7a8e8d372b212c97dde6ce2731db27aa0b2201c > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2022-08-03 19:20:47 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2022-08-03 19:24:07 +0000 > > xinstall: make md5 and ripemd160 conditional > > Sponsored by: Klara, Inc. > --- > usr.bin/xinstall/Makefile | 3 ++- > usr.bin/xinstall/xinstall.c | 32 ++++++++++++++++++++++++++++++++ > 2 files changed, 34 insertions(+), 1 deletion(-) > > diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile > index ce70cb882190..9969ef104e98 100644 > --- a/usr.bin/xinstall/Makefile > +++ b/usr.bin/xinstall/Makefile > @@ -14,7 +14,8 @@ MAN=3D install.1 > CFLAGS+=3D -I${SRCTOP}/contrib/mtree > CFLAGS+=3D -I${SRCTOP}/lib/libnetbsd > > -LIBADD=3D md > +LIBADD=3D md > +CFLAGS+=3D -DWITH_MD5 -DWITH_RIPEMD160 > > HAS_TESTS=3D > SUBDIR.${MK_TESTS}+=3D tests > diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c > index ddad7ba9115e..a236838c8fd1 100644 > --- a/usr.bin/xinstall/xinstall.c > +++ b/usr.bin/xinstall/xinstall.c > @@ -57,10 +57,14 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef WITH_MD5 > #include > +#endif > #include > #include > +#ifdef WITH_RIPEMD160 > #include > +#endif > #include > #include > #include > @@ -100,8 +104,12 @@ __FBSDID("$FreeBSD$"); > #define BACKUP_SUFFIX ".old" > > typedef union { > +#ifdef WITH_MD5 > MD5_CTX MD5; > +#endif > +#ifdef WITH_RIPEMD160 > RIPEMD160_CTX RIPEMD160; > +#endif > SHA1_CTX SHA1; > SHA256_CTX SHA256; > SHA512_CTX SHA512; > @@ -109,8 +117,12 @@ typedef union { > > static enum { > DIGEST_NONE =3D 0, > +#ifdef WITH_MD5 > DIGEST_MD5, > +#endif > +#ifdef WITH_RIPEMD160 > DIGEST_RIPEMD160, > +#endif > DIGEST_SHA1, > DIGEST_SHA256, > DIGEST_SHA512, > @@ -288,10 +300,14 @@ main(int argc, char *argv[]) > if (digest !=3D NULL) { > if (strcmp(digest, "none") =3D=3D 0) { > digesttype =3D DIGEST_NONE; > +#ifdef WITH_MD5 > } else if (strcmp(digest, "md5") =3D=3D 0) { > digesttype =3D DIGEST_MD5; > +#endif > +#ifdef WITH_RIPEMD160 > } else if (strcmp(digest, "rmd160") =3D=3D 0) { > digesttype =3D DIGEST_RIPEMD160; > +#endif > } else if (strcmp(digest, "sha1") =3D=3D 0) { > digesttype =3D DIGEST_SHA1; > } else if (strcmp(digest, "sha256") =3D=3D 0) { > @@ -402,10 +418,14 @@ digest_file(const char *name) > { > > switch (digesttype) { > +#ifdef WITH_MD5 > case DIGEST_MD5: > return (MD5File(name, NULL)); > +#endif > +#ifdef WITH_RIPEMD160 > case DIGEST_RIPEMD160: > return (RIPEMD160_File(name, NULL)); > +#endif > case DIGEST_SHA1: > return (SHA1_File(name, NULL)); > case DIGEST_SHA256: > @@ -424,12 +444,16 @@ digest_init(DIGEST_CTX *c) > switch (digesttype) { > case DIGEST_NONE: > break; > +#ifdef WITH_MD5 > case DIGEST_MD5: > MD5Init(&(c->MD5)); > break; > +#endif > +#ifdef WITH_RIPEMD160 > case DIGEST_RIPEMD160: > RIPEMD160_Init(&(c->RIPEMD160)); > break; > +#endif > case DIGEST_SHA1: > SHA1_Init(&(c->SHA1)); > break; > @@ -449,12 +473,16 @@ digest_update(DIGEST_CTX *c, const char *data, > size_t len) > switch (digesttype) { > case DIGEST_NONE: > break; > +#ifdef WITH_MD5 > case DIGEST_MD5: > MD5Update(&(c->MD5), data, len); > break; > +#endif > +#ifdef WITH_RIPEMD160 > case DIGEST_RIPEMD160: > RIPEMD160_Update(&(c->RIPEMD160), data, len); > break; > +#endif > case DIGEST_SHA1: > SHA1_Update(&(c->SHA1), data, len); > break; > @@ -472,10 +500,14 @@ digest_end(DIGEST_CTX *c, char *buf) > { > > switch (digesttype) { > +#ifdef WITH_MD5 > case DIGEST_MD5: > return (MD5End(&(c->MD5), buf)); > +#endif > +#ifdef WITH_RIPEMD160 > case DIGEST_RIPEMD160: > return (RIPEMD160_End(&(c->RIPEMD160), buf)); > +#endif > case DIGEST_SHA1: > return (SHA1_End(&(c->SHA1), buf)); > case DIGEST_SHA256: > --0000000000000c02b505e55bf253 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Can we also make SHA1 optional too?

On Wed, Aug 3, 2022 = at 12:25 PM Dag-Erling Sm=C3=B8rgrav <des@freebsd.org> wrote:
The branch main has been updated by des:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3Dc7a8e8d372b212c97dde6ce2731db27aa0b2201c
commit c7a8e8d372b212c97dde6ce2731db27aa0b2201c
Author:=C2=A0 =C2=A0 =C2=A0Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.org>=
AuthorDate: 2022-08-03 19:20:47 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.org>=
CommitDate: 2022-08-03 19:24:07 +0000

=C2=A0 =C2=A0 xinstall: make md5 and ripemd160 conditional

=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0Klara, Inc.
---
=C2=A0usr.bin/xinstall/Makefile=C2=A0 =C2=A0|=C2=A0 3 ++-
=C2=A0usr.bin/xinstall/xinstall.c | 32 ++++++++++++++++++++++++++++++++
=C2=A02 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile
index ce70cb882190..9969ef104e98 100644
--- a/usr.bin/xinstall/Makefile
+++ b/usr.bin/xinstall/Makefile
@@ -14,7 +14,8 @@ MAN=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 install.1
=C2=A0CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-I${SRCTOP}/contrib/mtree
=C2=A0CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-I${SRCTOP}/lib/libnetbsd

-LIBADD=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 md
+LIBADD=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 md
+CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-DWITH_MD5 -DWITH_RIPEMD160

=C2=A0HAS_TESTS=3D
=C2=A0SUBDIR.${MK_TESTS}+=3D tests
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index ddad7ba9115e..a236838c8fd1 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -57,10 +57,14 @@ __FBSDID("$FreeBSD$");
=C2=A0#include <fcntl.h>
=C2=A0#include <grp.h>
=C2=A0#include <libgen.h>
+#ifdef WITH_MD5
=C2=A0#include <md5.h>
+#endif
=C2=A0#include <paths.h>
=C2=A0#include <pwd.h>
+#ifdef WITH_RIPEMD160
=C2=A0#include <ripemd.h>
+#endif
=C2=A0#include <sha.h>
=C2=A0#include <sha256.h>
=C2=A0#include <sha512.h>
@@ -100,8 +104,12 @@ __FBSDID("$FreeBSD$");
=C2=A0#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 BACKUP_SUFFIX=C2=A0 =C2=A0".o= ld"

=C2=A0typedef union {
+#ifdef WITH_MD5
=C2=A0 =C2=A0 =C2=A0 =C2=A0 MD5_CTX=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MD5; +#endif
+#ifdef WITH_RIPEMD160
=C2=A0 =C2=A0 =C2=A0 =C2=A0 RIPEMD160_CTX=C2=A0 =C2=A0RIPEMD160;
+#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 SHA1_CTX=C2=A0 =C2=A0 =C2=A0 =C2=A0 SHA1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 SHA256_CTX=C2=A0 =C2=A0 =C2=A0 SHA256;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 SHA512_CTX=C2=A0 =C2=A0 =C2=A0 SHA512;
@@ -109,8 +117,12 @@ typedef union {

=C2=A0static enum {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 DIGEST_NONE =3D 0,
+#ifdef WITH_MD5
=C2=A0 =C2=A0 =C2=A0 =C2=A0 DIGEST_MD5,
+#endif
+#ifdef WITH_RIPEMD160
=C2=A0 =C2=A0 =C2=A0 =C2=A0 DIGEST_RIPEMD160,
+#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 DIGEST_SHA1,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 DIGEST_SHA256,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 DIGEST_SHA512,
@@ -288,10 +300,14 @@ main(int argc, char *argv[])
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (digest !=3D NULL) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (strcmp(digest, = "none") =3D=3D 0) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 digesttype =3D DIGEST_NONE;
+#ifdef WITH_MD5
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } else if (strcmp(d= igest, "md5") =3D=3D 0) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0digesttype =3D DIGEST_MD5;
+#endif
+#ifdef WITH_RIPEMD160
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } else if (strcmp(d= igest, "rmd160") =3D=3D 0) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 digesttype =3D DIGEST_RIPEMD160;
+#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } else if (strcmp(d= igest, "sha1") =3D=3D 0) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 digesttype =3D DIGEST_SHA1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } else if (strcmp(d= igest, "sha256") =3D=3D 0) {
@@ -402,10 +418,14 @@ digest_file(const char *name)
=C2=A0{

=C2=A0 =C2=A0 =C2=A0 =C2=A0 switch (digesttype) {
+#ifdef WITH_MD5
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_MD5:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (MD5File(nam= e, NULL));
+#endif
+#ifdef WITH_RIPEMD160
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_RIPEMD160:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (RIPEMD160_F= ile(name, NULL));
+#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_SHA1:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (SHA1_File(n= ame, NULL));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_SHA256:
@@ -424,12 +444,16 @@ digest_init(DIGEST_CTX *c)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 switch (digesttype) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_NONE:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
+#ifdef WITH_MD5
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_MD5:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 MD5Init(&(c->= ;MD5));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
+#endif
+#ifdef WITH_RIPEMD160
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_RIPEMD160:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 RIPEMD160_Init(&= ;(c->RIPEMD160));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
+#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_SHA1:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 SHA1_Init(&(c-&= gt;SHA1));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
@@ -449,12 +473,16 @@ digest_update(DIGEST_CTX *c, const char *data, size_t= len)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 switch (digesttype) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_NONE:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
+#ifdef WITH_MD5
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_MD5:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 MD5Update(&(c-&= gt;MD5), data, len);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
+#endif
+#ifdef WITH_RIPEMD160
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_RIPEMD160:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 RIPEMD160_Update(&a= mp;(c->RIPEMD160), data, len);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
+#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_SHA1:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 SHA1_Update(&(c= ->SHA1), data, len);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
@@ -472,10 +500,14 @@ digest_end(DIGEST_CTX *c, char *buf)
=C2=A0{

=C2=A0 =C2=A0 =C2=A0 =C2=A0 switch (digesttype) {
+#ifdef WITH_MD5
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_MD5:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (MD5End(&= ;(c->MD5), buf));
+#endif
+#ifdef WITH_RIPEMD160
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_RIPEMD160:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (RIPEMD160_E= nd(&(c->RIPEMD160), buf));
+#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_SHA1:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (SHA1_End(&a= mp;(c->SHA1), buf));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case DIGEST_SHA256:
--0000000000000c02b505e55bf253--