From: Andreas Steffen Date: Mon, 6 Dec 2021 12:28:31 +0000 (+0100) Subject: botan: Support of AES-CFB encryption X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d1a1cc907761fee8622c7e4e5d8f7f9fc191403;p=people%2Fms%2Fstrongswan.git botan: Support of AES-CFB encryption --- diff --git a/src/libstrongswan/plugins/botan/botan_crypter.c b/src/libstrongswan/plugins/botan/botan_crypter.c index 3ec5c4d5e..d3ccb4bb9 100644 --- a/src/libstrongswan/plugins/botan/botan_crypter.c +++ b/src/libstrongswan/plugins/botan/botan_crypter.c @@ -185,6 +185,26 @@ botan_crypter_t *botan_crypter_create(encryption_algorithm_t algo, return NULL; } break; + case ENCR_AES_CFB: + switch (key_size) + { + case 16: + /* AES 128 */ + this->cipher_name = "AES-128/CFB"; + break; + case 24: + /* AES-192 */ + this->cipher_name = "AES-192/CFB"; + break; + case 32: + /* AES-256 */ + this->cipher_name = "AES-256/CFB"; + break; + default: + free(this); + return NULL; + } + break; default: free(this); return NULL; diff --git a/src/libstrongswan/plugins/botan/botan_plugin.c b/src/libstrongswan/plugins/botan/botan_plugin.c index 205a274f4..41ad101ab 100644 --- a/src/libstrongswan/plugins/botan/botan_plugin.c +++ b/src/libstrongswan/plugins/botan/botan_plugin.c @@ -112,6 +112,11 @@ METHOD(plugin_t, get_features, int, PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 24), PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 32), #endif + #ifdef BOTAN_HAS_MODE_CFB + PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 16), + PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 24), + PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 32), + #endif #endif #endif