提交 03f03129 编写于 作者: R Richard Levitte

apps/progs.pl: more consistent output for digests

Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 96bea000
...@@ -227,6 +227,8 @@ static FUNCTION functions[] = { ...@@ -227,6 +227,8 @@ static FUNCTION functions[] = {
#endif #endif
#ifndef OPENSSL_NO_BLAKE2 #ifndef OPENSSL_NO_BLAKE2
{ FT_md, "blake2b512", dgst_main}, { FT_md, "blake2b512", dgst_main},
#endif
#ifndef OPENSSL_NO_BLAKE2
{ FT_md, "blake2s256", dgst_main}, { FT_md, "blake2s256", dgst_main},
#endif #endif
#ifndef OPENSSL_NO_AES #ifndef OPENSSL_NO_AES
......
...@@ -84,11 +84,16 @@ foreach ( ...@@ -84,11 +84,16 @@ foreach (
"md2", "md4", "md5", "md2", "md4", "md5",
"md_ghost94", "md_ghost94",
"sha1", "sha224", "sha256", "sha384", "sha512", "sha1", "sha224", "sha256", "sha384", "sha512",
"mdc2", "rmd160", "blake2b", "blake2s" "mdc2", "rmd160", "blake2b512", "blake2s256"
) { ) {
printf "#ifndef OPENSSL_NO_".uc($_)."\n" if ! /sha/; my $str = " { FT_md, \"".$_."\", dgst_main},\n";
printf " { FT_md, \"".$_."\", dgst_main},\n"; if (/blake2/) {
printf "#endif\n" if ! /sha/; print "#ifndef OPENSSL_NO_BLAKE2\n${str}#endif\n";
} elsif (/sha/) {
print "${str}";
} else {
print "#ifndef OPENSSL_NO_".uc($_)."\n${str}#endif\n";
}
} }
foreach ( foreach (
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册