summaryrefslogtreecommitdiff
path: root/lib/libcrypto/md5
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2023-08-10 14:03:48 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2023-08-10 14:03:48 +0000
commit76e9e04cf13db81f3c1e5ec07c351360d66c618b (patch)
treec4de2dadbcb89b8b6f6f298d1bc13748712b5215 /lib/libcrypto/md5
parent3098b5cb8c46a831a4f7be2aa170c2d69a188d66 (diff)
Expand HASH_MAKE_STRING.
No change to generated assembly.
Diffstat (limited to 'lib/libcrypto/md5')
-rw-r--r--lib/libcrypto/md5/md5.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/libcrypto/md5/md5.c b/lib/libcrypto/md5/md5.c
index 7472cb625b0..fade2d5416f 100644
--- a/lib/libcrypto/md5/md5.c
+++ b/lib/libcrypto/md5/md5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md5.c,v 1.11 2023/08/10 13:59:31 jsing Exp $ */
+/* $OpenBSD: md5.c,v 1.12 2023/08/10 14:03:47 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -87,13 +87,6 @@ __END_HIDDEN_DECLS
#define HASH_UPDATE MD5_Update
#define HASH_TRANSFORM MD5_Transform
#define HASH_FINAL MD5_Final
-#define HASH_MAKE_STRING(c,s) do { \
- unsigned long ll; \
- ll=(c)->A; HOST_l2c(ll,(s)); \
- ll=(c)->B; HOST_l2c(ll,(s)); \
- ll=(c)->C; HOST_l2c(ll,(s)); \
- ll=(c)->D; HOST_l2c(ll,(s)); \
- } while (0)
#define HASH_BLOCK_DATA_ORDER md5_block_data_order
#define HASH_NO_UPDATE
@@ -371,11 +364,18 @@ MD5_Final(unsigned char *md, MD5_CTX *c)
c->num = 0;
memset(p, 0, MD5_CBLOCK);
-#ifndef HASH_MAKE_STRING
-#error "HASH_MAKE_STRING must be defined!"
-#else
- HASH_MAKE_STRING(c, md);
-#endif
+ do {
+ unsigned long ll;
+
+ ll = c->A;
+ HOST_l2c(ll, md);
+ ll = c->B;
+ HOST_l2c(ll, md);
+ ll = c->C;
+ HOST_l2c(ll, md);
+ ll = c->D;
+ HOST_l2c(ll, md);
+ } while (0);
return 1;
}