diff --git a/apps/progs.h b/apps/progs.h index fff26392e42317aa01b458c8606d6edff75ec148..a9963530488b511973ba100a4c0ae593460f79b9 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 f24b91bde85f1cbd9f38bb6e63695b426d3cad2d..b601fefb1b4bce59956dddd4ab69af52eb229df1 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 (