openssl: Added AES_ECB support
This commit is contained in:
committed by
Tobias Brunner
parent
20f3d04b13
commit
6f44bd6fe8
@@ -211,6 +211,26 @@ openssl_crypter_t *openssl_crypter_create(encryption_algorithm_t algo,
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case ENCR_AES_ECB:
|
||||
switch (key_size)
|
||||
{
|
||||
case 0:
|
||||
key_size = 16;
|
||||
/* FALL */
|
||||
case 16: /* AES 128 */
|
||||
this->cipher = EVP_get_cipherbyname("aes-128-ecb");
|
||||
break;
|
||||
case 24: /* AES-192 */
|
||||
this->cipher = EVP_get_cipherbyname("aes-192-ecb");
|
||||
break;
|
||||
case 32: /* AES-256 */
|
||||
this->cipher = EVP_get_cipherbyname("aes-256-ecb");
|
||||
break;
|
||||
default:
|
||||
free(this);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case ENCR_CAMELLIA_CBC:
|
||||
switch (key_size)
|
||||
{
|
||||
|
||||
@@ -497,6 +497,9 @@ METHOD(plugin_t, get_features, int,
|
||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 16),
|
||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 24),
|
||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 32),
|
||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_ECB, 16),
|
||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_ECB, 24),
|
||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_ECB, 32),
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_CAMELLIA
|
||||
PLUGIN_PROVIDE(CRYPTER, ENCR_CAMELLIA_CBC, 16),
|
||||
|
||||
Reference in New Issue
Block a user