Commit 2d1a1cc90 for strongswan.org

commit 2d1a1cc907761fee8622c7e4e5d8f7f9fc191403
Author: Andreas Steffen <andreas.steffen@strongswan.org>
Date:   Mon Dec 6 13:28:31 2021 +0100

    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