mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
aesdec: Fix padding removal for per-buffer-padding=FALSE
When per-buffer-padding is FALSE, the OpenSSL context needs to be told to remove any padding at the end of the ciphertext Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1243 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3406>
This commit is contained in:
parent
9e74c728cb
commit
452890093d
1 changed files with 4 additions and 5 deletions
|
@ -583,11 +583,10 @@ gst_aes_dec_init_cipher (GstAesDec * filter)
|
|||
GST_ERROR_OBJECT (filter, "Could not initialize openssl cipher");
|
||||
return FALSE;
|
||||
}
|
||||
if (filter->per_buffer_padding) {
|
||||
if (!EVP_CIPHER_CTX_set_padding (filter->evp_ctx, 0)) {
|
||||
GST_ERROR_OBJECT (filter, "Could not set padding");
|
||||
return FALSE;
|
||||
}
|
||||
if (!EVP_CIPHER_CTX_set_padding (filter->evp_ctx,
|
||||
filter->per_buffer_padding ? 0 : 1)) {
|
||||
GST_ERROR_OBJECT (filter, "Could not set padding");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue