check that all ciphers/hashes/prngs are unregistered
This commit is contained in:
parent
be9c598ee7
commit
904366eb0f
@ -98,6 +98,12 @@ sub check_descriptor {
|
||||
warn "$d missing in $f\n" and $fails++ if $txt !~ /\Q$d\E/;
|
||||
}
|
||||
}
|
||||
for my $d (@descriptors) {
|
||||
for my $f ("./tests/test.c") {
|
||||
my $txt = read_file($f);
|
||||
warn "$d missing in $f\n" and $fails++ if $txt !~ /\Q$d\E/;
|
||||
}
|
||||
}
|
||||
my $name = sprintf("%-17s", "check-${which}:");
|
||||
warn( $fails > 0 ? "${name}FAIL $fails\n" : "${name}PASS\n" );
|
||||
return $fails;
|
||||
|
13
tests/test.c
13
tests/test.c
@ -95,8 +95,18 @@ static void *run(void *arg)
|
||||
static void _unregister_all(void)
|
||||
{
|
||||
#ifdef LTC_RIJNDAEL
|
||||
#ifdef ENCRYPT_ONLY
|
||||
/* alternative would be
|
||||
* unregister_cipher(&rijndael_enc_desc);
|
||||
*/
|
||||
unregister_cipher(&aes_enc_desc);
|
||||
#else
|
||||
/* alternative would be
|
||||
* unregister_cipher(&rijndael_desc);
|
||||
*/
|
||||
unregister_cipher(&aes_desc);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef LTC_BLOWFISH
|
||||
unregister_cipher(&blowfish_desc);
|
||||
#endif
|
||||
@ -239,6 +249,9 @@ static void _unregister_all(void)
|
||||
#ifdef LTC_SOBER128
|
||||
unregister_prng(&sober128_desc);
|
||||
#endif
|
||||
#ifdef LTC_SPRNG
|
||||
unregister_prng(&sprng_desc);
|
||||
#endif
|
||||
} /* _cleanup() */
|
||||
|
||||
static void register_algs(void)
|
||||
|
Loading…
Reference in New Issue
Block a user