File dd_rescue-ossl3-evpcipherctx.diff of Package dd_rescue.deb

commit ce925927fdcc5e41f1a8975f31405f913a6583d1
Author: Kurt Garloff <kurt@garloff.de>
Date:   Wed Feb 28 22:49:18 2024 +0100

    Adjust struct _evp_cipher_ctx_st to openssl-3.0.6+.
    
    This is only done if the version is indeed >= 3.0.6.
    It's only relevant on 32bit, as the alignment rules on 64bit
    do hide this difference.
    
    Signed-off-by: Kurt Garloff <kurt@garloff.de>

diff --git a/aes_ossl11.c b/aes_ossl11.c
index 2fa4468..e450f4e 100644
--- a/aes_ossl11.c
+++ b/aes_ossl11.c
@@ -45,6 +45,9 @@ struct _evp_cipher_ctx_st {
     /* FIXME: Should this even exist? It appears unused */
     void *app_data;             /* application stuff */
     int key_len;                /* May change for variable length cipher */
+#if OPENSSL_VERSION_MAJOR >= 3 && (OPENSSL_VERSION_MINOR > 0 || OPENSSL_VERSION_PATCH >= 6)
+    int iv_len;                 /* IV length */
+#endif
     unsigned long flags;        /* Various flags */
     void *cipher_data;          /* per EVP data */
     int final_used;
openSUSE Build Service is sponsored by