diff --git a/lib/fko_util.c b/lib/fko_util.c index 31061296..0e54acff 100644 --- a/lib/fko_util.c +++ b/lib/fko_util.c @@ -59,7 +59,7 @@ static fko_enc_mode_str_t fko_enc_mode_strs[] = { "OFB", FKO_ENC_MODE_OFB, FKO_ENC_MODE_SUPPORTED }, { "CTR", FKO_ENC_MODE_CTR, FKO_ENC_MODE_SUPPORTED }, { "Asymmetric", FKO_ENC_MODE_ASYMMETRIC, FKO_ENC_MODE_SUPPORTED }, - { "CBC legacy IV", FKO_ENC_MODE_CBC_LEGACY_IV, FKO_ENC_MODE_SUPPORTED } + { "legacy", FKO_ENC_MODE_CBC_LEGACY_IV, FKO_ENC_MODE_SUPPORTED } }; /* Validate encoded message length diff --git a/test/tests/basic_operations.pl b/test/tests/basic_operations.pl index 2b287a37..3ab47d08 100644 --- a/test/tests/basic_operations.pl +++ b/test/tests/basic_operations.pl @@ -620,4 +620,85 @@ qq|-P "udp port $non_std_spa_port"|, 'fatal' => $NO }, + { + 'category' => 'basic operations', + 'subcategory' => 'client', + 'detail' => 'encryption mode CBC', + 'function' => \&generic_exec, + 'cmdline' => $default_client_args . " --test --encryption-mode CBC", + 'positive_output_matches' => [qr/Encryption\sMode\:\s.*CBC/], + 'fatal' => $NO + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client', + 'detail' => 'encryption mode ECB', + 'function' => \&generic_exec, + 'cmdline' => $default_client_args . " --test --encryption-mode ECB", + 'positive_output_matches' => [qr/Encryption\sMode\:\s.*ECB/], + 'fatal' => $NO + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client', + 'detail' => 'encryption mode CFB', + 'function' => \&generic_exec, + 'cmdline' => $default_client_args . " --test --encryption-mode CFB", + 'positive_output_matches' => [qr/Encryption\sMode\:\s.*CFB/], + 'fatal' => $NO + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client', + 'detail' => 'encryption mode PCBC (unsupported)', + 'function' => \&generic_exec, + 'cmdline' => $default_client_args . " --test --encryption-mode PCBC", + 'positive_output_matches' => [qr/Invalid\sencryption\smode:\sPCBC/], + 'fatal' => $NO + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client', + 'detail' => 'encryption mode OFB', + 'function' => \&generic_exec, + 'cmdline' => $default_client_args . " --test --encryption-mode OFB", + 'positive_output_matches' => [qr/Encryption\sMode\:\s.*OFB/], + 'fatal' => $NO + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client', + 'detail' => 'encryption mode CTR', + 'function' => \&generic_exec, + 'cmdline' => $default_client_args . " --test --encryption-mode CTR", + 'positive_output_matches' => [qr/Encryption\sMode\:\s.*CTR/], + 'fatal' => $NO + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client', + 'detail' => 'encryption mode Asymmetric', + 'function' => \&generic_exec, + 'cmdline' => $default_client_args . " --test --encryption-mode \"Asymmetric\"", + 'positive_output_matches' => [qr/Encryption\sMode\:\s.*Asymmetric/], + 'fatal' => $NO + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client', + 'detail' => 'encryption mode legacy', + 'function' => \&generic_exec, + 'cmdline' => $default_client_args . " --test --encryption-mode legacy", + 'positive_output_matches' => [qr/Encryption\sMode\:\s.*legacy/], + 'fatal' => $NO + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client', + 'detail' => 'bad encryption mode', + 'function' => \&generic_exec, + 'cmdline' => $default_client_args . " --test --encryption-mode badmode", + 'positive_output_matches' => [qr/Invalid\sencryption\smode:\sbadmode/], + 'fatal' => $NO + }, );