summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-03-18 20:01:58 +0100
committerRichard Levitte <levitte@openssl.org>2016-03-18 20:12:27 +0100
commit03f03129361683ee3c5bab5aa82d7060cdfc2bea (patch)
tree1e1665320c3d811c238191523b9751833ec499a4 /apps
parentFix no-des (diff)
downloadopenssl-03f03129361683ee3c5bab5aa82d7060cdfc2bea.tar.xz
openssl-03f03129361683ee3c5bab5aa82d7060cdfc2bea.zip
apps/progs.pl: more consistent output for digests
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/progs.h2
-rw-r--r--apps/progs.pl13
2 files changed, 11 insertions, 4 deletions
diff --git a/apps/progs.h b/apps/progs.h
index fff26392e4..a996353048 100644
--- a/apps/progs.h
+++ b/apps/progs.h
@@ -227,6 +227,8 @@ static FUNCTION functions[] = {
#endif
#ifndef OPENSSL_NO_BLAKE2
{ FT_md, "blake2b512", dgst_main},
+#endif
+#ifndef OPENSSL_NO_BLAKE2
{ FT_md, "blake2s256", dgst_main},
#endif
#ifndef OPENSSL_NO_AES
diff --git a/apps/progs.pl b/apps/progs.pl
index f24b91bde8..b601fefb1b 100644
--- a/apps/progs.pl
+++ b/apps/progs.pl
@@ -84,11 +84,16 @@ foreach (
"md2", "md4", "md5",
"md_ghost94",
"sha1", "sha224", "sha256", "sha384", "sha512",
- "mdc2", "rmd160", "blake2b", "blake2s"
+ "mdc2", "rmd160", "blake2b512", "blake2s256"
) {
- printf "#ifndef OPENSSL_NO_".uc($_)."\n" if ! /sha/;
- printf " { FT_md, \"".$_."\", dgst_main},\n";
- printf "#endif\n" if ! /sha/;
+ my $str = " { FT_md, \"".$_."\", dgst_main},\n";
+ if (/blake2/) {
+ print "#ifndef OPENSSL_NO_BLAKE2\n${str}#endif\n";
+ } elsif (/sha/) {
+ print "${str}";
+ } else {
+ print "#ifndef OPENSSL_NO_".uc($_)."\n${str}#endif\n";
+ }
}
foreach (