From 0d2fae6e7bc419c1e2b6036ef6e1266c88df7039 Mon Sep 17 00:00:00 2001 From: James Buren Date: Fri, 25 Feb 2022 16:42:24 -0600 Subject: [PATCH] src/borg/crypto/low_level.pyx: fix compiler warning The generated source code was producing a compiler warning due to the pointers differing in constness. The called function expects a non-const pointer while the generated code produces a const pointer via a cast. This changes the cast to drop 'const' to make the compiler happy. --- src/borg/crypto/low_level.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/crypto/low_level.pyx b/src/borg/crypto/low_level.pyx index 1f23a126a..aa9d1c3ae 100644 --- a/src/borg/crypto/low_level.pyx +++ b/src/borg/crypto/low_level.pyx @@ -580,7 +580,7 @@ cdef class _AEAD_BASE: raise CryptoError('EVP_CIPHER_CTX_ctrl SET IVLEN failed') if not EVP_DecryptInit_ex(self.ctx, NULL, NULL, self.enc_key, iv): raise CryptoError('EVP_DecryptInit_ex failed') - if not EVP_CIPHER_CTX_ctrl(self.ctx, EVP_CTRL_GCM_SET_TAG, self.mac_len, idata.buf+hlen): + if not EVP_CIPHER_CTX_ctrl(self.ctx, EVP_CTRL_GCM_SET_TAG, self.mac_len, idata.buf+hlen): raise CryptoError('EVP_CIPHER_CTX_ctrl SET TAG failed') rc = EVP_DecryptUpdate(self.ctx, NULL, &olen, idata.buf+aoffset, alen) if not rc: