You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the same key to encrypt multiple chunks of data (using a different IV each time). I have code similar to the following which was working in openssl 1.1.1 (on Ubuntu 20.04)
ctx = EVP_CIPHER_CTX_new();
EVP_CipherInit_ex(ctx, EVP_aes_256_gcm(), NULL, key, NULL, 1);
...
// do this for each chunk
temp = EVP_CIPHER_CTX_new();
EVP_CIPHER_CTX_copy(temp, ctx);
EVP_CipherInit_ex(temp, NULL, NULL, NULL, iv, -1);
... // use temp do encrypt
This worked fine. I am now trying to compile on a newer platform (Ubuntu 22.04) which has OSSL 3.0.2, and the call to EVP_CIPHER_CTX_copy is returning an error:
digital envelope routines:EVP_CIPHER_CTX_copy:not able to copy ctx:../crypto/evp/evp_enc.c:1361
digging in the code, it seems that dupctx is not implemented for aes-gcm anymore.
I apologize if this is already fixed in newer versions. I don't have a newer version to check with
Activity
nhorman commentedon Sep 4, 2023
addressed by #21933
BMBurstein commentedon Sep 4, 2023
will this fix be backported to 3.0.2, or only available in newer versions?
t8m commentedon Sep 4, 2023
3.0.2 is done release, it cannot be changed. But at some point there will be a new release in 3.0 branch that will contain the fix from #21933.
nhorman commentedon Sep 5, 2023
closing as a duplicate of #21933