From 71fa056c47b2700a1fdd23dac323f1fe3b8a55cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ketelaars?= Date: Mon, 21 Mar 2022 18:49:49 +0100 Subject: [PATCH] 1.2 - Remove unused code #6473 Removed AEAD ciphers AES-OCB and CHACHA20-POLY1305 from 1.2. As a result some additional code can be removed. Passes regression tests. --- src/borg/crypto/_crypto_helpers.c | 1 - src/borg/crypto/_crypto_helpers.h | 6 ------ src/borg/crypto/low_level.pyx | 4 ---- 3 files changed, 11 deletions(-) diff --git a/src/borg/crypto/_crypto_helpers.c b/src/borg/crypto/_crypto_helpers.c index 18fbe5220..856736aba 100644 --- a/src/borg/crypto/_crypto_helpers.c +++ b/src/borg/crypto/_crypto_helpers.c @@ -1,6 +1,5 @@ /* some helpers, so our code also works with OpenSSL 1.0.x */ -#include #include #include diff --git a/src/borg/crypto/_crypto_helpers.h b/src/borg/crypto/_crypto_helpers.h index 0a3021af6..8d17d5388 100644 --- a/src/borg/crypto/_crypto_helpers.h +++ b/src/borg/crypto/_crypto_helpers.h @@ -2,14 +2,8 @@ #include #include -#include #if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) HMAC_CTX *HMAC_CTX_new(void); void HMAC_CTX_free(HMAC_CTX *ctx); #endif - - -#if !defined(LIBRESSL_VERSION_NUMBER) -#define LIBRESSL_VERSION_NUMBER 0 -#endif diff --git a/src/borg/crypto/low_level.pyx b/src/borg/crypto/low_level.pyx index c40df8a2d..9d8ac0ca0 100644 --- a/src/borg/crypto/low_level.pyx +++ b/src/borg/crypto/low_level.pyx @@ -102,15 +102,11 @@ cdef extern from "openssl/hmac.h": cdef extern from "_crypto_helpers.h": long OPENSSL_VERSION_NUMBER - long LIBRESSL_VERSION_NUMBER HMAC_CTX *HMAC_CTX_new() void HMAC_CTX_free(HMAC_CTX *a) -openssl10 = OPENSSL_VERSION_NUMBER < 0x10100000 or LIBRESSL_VERSION_NUMBER - - import struct _int = struct.Struct('>I')