summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ripemd/ripemd.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/ripemd/ripemd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/libcrypto/ripemd/ripemd.c b/src/lib/libcrypto/ripemd/ripemd.c
index b2d798c495..08fa208dcc 100644
--- a/src/lib/libcrypto/ripemd/ripemd.c
+++ b/src/lib/libcrypto/ripemd/ripemd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ripemd.c,v 1.18 2024/03/28 23:54:15 joshua Exp $ */ 1/* $OpenBSD: ripemd.c,v 1.19 2024/06/01 07:36:16 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -483,14 +483,10 @@ RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c)
483LCRYPTO_ALIAS(RIPEMD160_Final); 483LCRYPTO_ALIAS(RIPEMD160_Final);
484 484
485unsigned char * 485unsigned char *
486RIPEMD160(const unsigned char *d, size_t n, 486RIPEMD160(const unsigned char *d, size_t n, unsigned char *md)
487 unsigned char *md)
488{ 487{
489 RIPEMD160_CTX c; 488 RIPEMD160_CTX c;
490 static unsigned char m[RIPEMD160_DIGEST_LENGTH];
491 489
492 if (md == NULL)
493 md = m;
494 if (!RIPEMD160_Init(&c)) 490 if (!RIPEMD160_Init(&c))
495 return NULL; 491 return NULL;
496 RIPEMD160_Update(&c, d, n); 492 RIPEMD160_Update(&c, d, n);