aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/openssl
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-06-13 10:37:17 +0200
committerTobias Brunner <tobias@strongswan.org>2016-06-13 10:38:20 +0200
commita046f929cedaf4da1f2f1b47defa9b64e8f57e8b (patch)
tree14be1871c7eff2afb9d9460b440ab68b7da9c806 /src/libstrongswan/plugins/openssl
parent9827380e6f9136cee166ecd85c4af2a6095b3268 (diff)
downloadstrongswan-a046f929cedaf4da1f2f1b47defa9b64e8f57e8b.tar.bz2
strongswan-a046f929cedaf4da1f2f1b47defa9b64e8f57e8b.tar.xz
android: Use non-aliased cipher identifiers
Some of these are also understood by BoringSSL. Fixes #1510.
Diffstat (limited to 'src/libstrongswan/plugins/openssl')
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_crypter.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_crypter.c b/src/libstrongswan/plugins/openssl/openssl_crypter.c
index a02f78a93..72a9ad92a 100644
--- a/src/libstrongswan/plugins/openssl/openssl_crypter.c
+++ b/src/libstrongswan/plugins/openssl/openssl_crypter.c
@@ -57,12 +57,12 @@ static char* lookup_algorithm(uint16_t ikev2_algo, size_t *key_size)
/* maximum key size */
size_t key_max;
} mappings[] = {
- {ENCR_DES, "des", 8, 8, 8},
- {ENCR_3DES, "des3", 24, 24, 24},
- {ENCR_RC5, "rc5", 16, 5, 255},
- {ENCR_IDEA, "idea", 16, 16, 16},
- {ENCR_CAST, "cast", 16, 5, 16},
- {ENCR_BLOWFISH, "blowfish", 16, 5, 56},
+ {ENCR_DES, "des-cbc", 8, 8, 8},
+ {ENCR_3DES, "des-ede3-cbc", 24, 24, 24},
+ {ENCR_RC5, "rc5-cbc", 16, 5, 255},
+ {ENCR_IDEA, "idea-cbc", 16, 16, 16},
+ {ENCR_CAST, "cast5-cbc", 16, 5, 16},
+ {ENCR_BLOWFISH, "bf-cbc", 16, 5, 56},
};
int i;
@@ -193,13 +193,13 @@ openssl_crypter_t *openssl_crypter_create(encryption_algorithm_t algo,
key_size = 16;
/* FALL */
case 16: /* AES 128 */
- this->cipher = EVP_get_cipherbyname("aes128");
+ this->cipher = EVP_get_cipherbyname("aes-128-cbc");
break;
case 24: /* AES-192 */
- this->cipher = EVP_get_cipherbyname("aes192");
+ this->cipher = EVP_get_cipherbyname("aes-192-cbc");
break;
case 32: /* AES-256 */
- this->cipher = EVP_get_cipherbyname("aes256");
+ this->cipher = EVP_get_cipherbyname("aes-256-cbc");
break;
default:
free(this);
@@ -213,13 +213,13 @@ openssl_crypter_t *openssl_crypter_create(encryption_algorithm_t algo,
key_size = 16;
/* FALL */
case 16: /* CAMELLIA 128 */
- this->cipher = EVP_get_cipherbyname("camellia128");
+ this->cipher = EVP_get_cipherbyname("camellia-128-cbc");
break;
case 24: /* CAMELLIA 192 */
- this->cipher = EVP_get_cipherbyname("camellia192");
+ this->cipher = EVP_get_cipherbyname("camellia-192-cbc");
break;
case 32: /* CAMELLIA 256 */
- this->cipher = EVP_get_cipherbyname("camellia256");
+ this->cipher = EVP_get_cipherbyname("camellia-256-cbc");
break;
default:
free(this);