summaryrefslogtreecommitdiffstats
path: root/apps/ts.c
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2006-02-26 23:34:53 +0000
committerUlf Möller <ulf@openssl.org>2006-02-26 23:34:53 +0000
commit11503177d1842dcb070fb93bac3d96d0f59f78e0 (patch)
treefd07a87f6e66d486b2bf64a23887990208c2d621 /apps/ts.c
parent9ab899a660b30d80d844c5d1be9998180c91149a (diff)
TS bugfixes: Do not hardcode message digest algorithms; fix ASN1 decoding.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Diffstat (limited to 'apps/ts.c')
-rw-r--r--apps/ts.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/apps/ts.c b/apps/ts.c
index b8fb50b3b5..0083f9a1e1 100644
--- a/apps/ts.c
+++ b/apps/ts.c
@@ -191,16 +191,6 @@ int MAIN(int argc, char **argv)
if (argc-- < 1) goto usage;
digest = *++argv;
}
- else if (strcmp(*argv, "-md2") == 0
- || strcmp(*argv, "-md4") == 0
- || strcmp(*argv, "-md5") == 0
- || strcmp(*argv, "-sha") == 0
- || strcmp(*argv, "-sha1") == 0
- || strcmp(*argv, "-mdc2") == 0
- || strcmp(*argv, "-ripemd160") == 0)
- {
- md = EVP_get_digestbyname(*argv + 1);
- }
else if (strcmp(*argv, "-rand") == 0)
{
if (argc-- < 1) goto usage;
@@ -296,6 +286,10 @@ int MAIN(int argc, char **argv)
if (argc-- < 1) goto usage;
engine = *++argv;
}
+ else if ((md = EVP_get_digestbyname(*argv + 1)) != NULL)
+ {
+ /* empty. */
+ }
else
goto usage;
}