diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/sha/sha1.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/sha/sha1.c b/src/lib/libcrypto/sha/sha1.c index a0ec259f7e..c4a280121c 100644 --- a/src/lib/libcrypto/sha/sha1.c +++ b/src/lib/libcrypto/sha/sha1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha1.c,v 1.8 2023/07/08 07:49:45 jsing Exp $ */ | 1 | /* $OpenBSD: sha1.c,v 1.9 2023/07/08 07:52:25 jsing 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 | * |
| @@ -494,6 +494,7 @@ int | |||
| 494 | SHA1_Final(unsigned char *md, SHA_CTX *c) | 494 | SHA1_Final(unsigned char *md, SHA_CTX *c) |
| 495 | { | 495 | { |
| 496 | unsigned char *p = (unsigned char *)c->data; | 496 | unsigned char *p = (unsigned char *)c->data; |
| 497 | unsigned long ll; | ||
| 497 | size_t n = c->num; | 498 | size_t n = c->num; |
| 498 | 499 | ||
| 499 | p[n] = 0x80; /* there is always room for one */ | 500 | p[n] = 0x80; /* there is always room for one */ |
| @@ -519,8 +520,6 @@ SHA1_Final(unsigned char *md, SHA_CTX *c) | |||
| 519 | c->num = 0; | 520 | c->num = 0; |
| 520 | memset(p, 0, SHA_CBLOCK); | 521 | memset(p, 0, SHA_CBLOCK); |
| 521 | 522 | ||
| 522 | do { | ||
| 523 | unsigned long ll; | ||
| 524 | ll = c->h0; | 523 | ll = c->h0; |
| 525 | HOST_l2c(ll, md); | 524 | HOST_l2c(ll, md); |
| 526 | ll = c->h1; | 525 | ll = c->h1; |
| @@ -531,7 +530,6 @@ SHA1_Final(unsigned char *md, SHA_CTX *c) | |||
| 531 | HOST_l2c(ll, md); | 530 | HOST_l2c(ll, md); |
| 532 | ll = c->h4; | 531 | ll = c->h4; |
| 533 | HOST_l2c(ll, md); | 532 | HOST_l2c(ll, md); |
| 534 | } while (0); | ||
| 535 | 533 | ||
| 536 | return 1; | 534 | return 1; |
| 537 | } | 535 | } |
