Set digest if used from hash interface.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Sebastian Andrzej Siewior
1 year, 3 months ago
3 | 3 |
* CVE-2022-3996 (X.509 Policy Constraints Double Locking) (Closes: #1027102).
|
4 | 4 |
* Add loongarch64 target (Closes: #1024414).
|
5 | 5 |
* Avoid SIGSEGV with engines, reported by ValdikSS (Closes: #1028898).
|
|
6 |
* Set digestname from argv[0] if it is a builtin hash name
|
|
7 |
(Closes:# 1025461).
|
6 | 8 |
|
7 | 9 |
[ Helmut Grohne ]
|
8 | 10 |
* Support the noudeb build profile (Closes: #1024929).
|
|
0 |
From: Tomas Mraz <tomas@openssl.org>
|
|
1 |
Date: Fri, 4 Nov 2022 12:20:08 +0100
|
|
2 |
Subject: apps/dgst.c: Set digestname from argv[0] if it is a builtin hash
|
|
3 |
name
|
|
4 |
|
|
5 |
Fixes #19589
|
|
6 |
|
|
7 |
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
|
|
8 |
Reviewed-by: Todd Short <todd.short@me.com>
|
|
9 |
(Merged from https://github.com/openssl/openssl/pull/19606)
|
|
10 |
|
|
11 |
(cherry picked from commit 1e5780dbc79dab14c1ec1584313755fc2fd2cf55)
|
|
12 |
---
|
|
13 |
apps/dgst.c | 2 ++
|
|
14 |
1 file changed, 2 insertions(+)
|
|
15 |
|
|
16 |
diff --git a/apps/dgst.c b/apps/dgst.c
|
|
17 |
index 5f36cbcb7791..1042d940f49c 100644
|
|
18 |
--- a/apps/dgst.c
|
|
19 |
+++ b/apps/dgst.c
|
|
20 |
@@ -114,6 +114,8 @@ int dgst_main(int argc, char **argv)
|
|
21 |
|
|
22 |
buf = app_malloc(BUFSIZE, "I/O buffer");
|
|
23 |
md = (EVP_MD *)EVP_get_digestbyname(argv[0]);
|
|
24 |
+ if (md != NULL)
|
|
25 |
+ digestname = argv[0];
|
|
26 |
|
|
27 |
prog = opt_init(argc, argv, dgst_options);
|
|
28 |
while ((o = opt_next()) != OPT_EOF) {
|
8 | 8 |
Fix-tests-for-new-default-security-level.patch
|
9 | 9 |
x509-fix-double-locking-problem.patch
|
10 | 10 |
Release-the-drbg-in-the-global-default-context-before-eng.patch
|
|
11 |
apps-dgst.c-Set-digestname-from-argv-0-if-it-is-a-builtin.patch
|