Commit 01485770f for strongswan.org

commit 01485770fd60af918683400719d6d12ac6393c5e
Author: Andreas Steffen <andreas.steffen@strongswan.org>
Date:   Mon Dec 6 13:43:45 2021 +0100

    gcrypt:  Support of AES-CFB encryption

diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c b/src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
index da6bb9145..26dd9d1c5 100644
--- a/src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
+++ b/src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
@@ -219,6 +219,24 @@ gcrypt_crypter_t *gcrypt_crypter_create(encryption_algorithm_t algo,
 					return NULL;
 			}
 			break;
+		case ENCR_AES_CFB:
+			mode = GCRY_CIPHER_MODE_CFB;
+			switch (key_size)
+			{
+				case 0:
+				case 16:
+					gcrypt_alg = GCRY_CIPHER_AES128;
+					break;
+				case 24:
+					gcrypt_alg = GCRY_CIPHER_AES192;
+					break;
+				case 32:
+					gcrypt_alg = GCRY_CIPHER_AES256;
+					break;
+				default:
+					return NULL;
+			}
+			break;
 		case ENCR_CAMELLIA_CTR:
 			mode = GCRY_CIPHER_MODE_CTR;
 			/* fall */
diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c b/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
index fc4d9467d..bbf14af3d 100644
--- a/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
+++ b/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
@@ -73,6 +73,9 @@ METHOD(plugin_t, get_features, int,
 			PLUGIN_PROVIDE(CRYPTER, ENCR_AES_ECB, 16),
 			PLUGIN_PROVIDE(CRYPTER, ENCR_AES_ECB, 24),
 			PLUGIN_PROVIDE(CRYPTER, ENCR_AES_ECB, 32),
+			PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 16),
+			PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 24),
+			PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CFB, 32),
 			/* gcrypt only supports 128 bit blowfish */
 			PLUGIN_PROVIDE(CRYPTER, ENCR_BLOWFISH, 16),
 #ifdef HAVE_GCRY_CIPHER_CAMELLIA