crypto: AES GCM IV length is always 12
... at least for use cases we are interested in Change-Id: I1156ff354635e8f990ce2664ebc8dcd3786ddca5 Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:

committed by
Neale Ranns

parent
22e9c03ad2
commit
82d81d4fb0
@@ -155,7 +155,7 @@ openssl_ops_dec_gcm (vlib_main_t * vm, vnet_crypto_op_t * ops[], u32 n_ops,
|
||||
int len;
|
||||
|
||||
EVP_DecryptInit_ex (ctx, cipher, 0, 0, 0);
|
||||
EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_SET_IVLEN, op->iv_len, 0);
|
||||
EVP_CIPHER_CTX_ctrl (ctx, EVP_CTRL_GCM_SET_IVLEN, 12, 0);
|
||||
EVP_DecryptInit_ex (ctx, 0, 0, key->data, op->iv);
|
||||
if (op->aad_len)
|
||||
EVP_DecryptUpdate (ctx, 0, &len, op->aad, op->aad_len);
|
||||
|
Reference in New Issue
Block a user