浏览代码

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.
Björn Ketelaars 3 年之前
父节点
当前提交
71fa056c47
共有 3 个文件被更改,包括 0 次插入11 次删除
  1. 0 1
      src/borg/crypto/_crypto_helpers.c
  2. 0 6
      src/borg/crypto/_crypto_helpers.h
  3. 0 4
      src/borg/crypto/low_level.pyx

+ 0 - 1
src/borg/crypto/_crypto_helpers.c

@@ -1,6 +1,5 @@
 /* some helpers, so our code also works with OpenSSL 1.0.x */
 /* some helpers, so our code also works with OpenSSL 1.0.x */
 
 
-#include <string.h>
 #include <openssl/opensslv.h>
 #include <openssl/opensslv.h>
 #include <openssl/hmac.h>
 #include <openssl/hmac.h>
 
 

+ 0 - 6
src/borg/crypto/_crypto_helpers.h

@@ -2,14 +2,8 @@
 
 
 #include <openssl/opensslv.h>
 #include <openssl/opensslv.h>
 #include <openssl/hmac.h>
 #include <openssl/hmac.h>
-#include <openssl/evp.h>
 
 
 #if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
 #if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
 HMAC_CTX *HMAC_CTX_new(void);
 HMAC_CTX *HMAC_CTX_new(void);
 void HMAC_CTX_free(HMAC_CTX *ctx);
 void HMAC_CTX_free(HMAC_CTX *ctx);
 #endif
 #endif
-
-
-#if !defined(LIBRESSL_VERSION_NUMBER)
-#define LIBRESSL_VERSION_NUMBER 0
-#endif

+ 0 - 4
src/borg/crypto/low_level.pyx

@@ -102,15 +102,11 @@ cdef extern from "openssl/hmac.h":
 
 
 cdef extern from "_crypto_helpers.h":
 cdef extern from "_crypto_helpers.h":
     long OPENSSL_VERSION_NUMBER
     long OPENSSL_VERSION_NUMBER
-    long LIBRESSL_VERSION_NUMBER
 
 
     HMAC_CTX *HMAC_CTX_new()
     HMAC_CTX *HMAC_CTX_new()
     void HMAC_CTX_free(HMAC_CTX *a)
     void HMAC_CTX_free(HMAC_CTX *a)
 
 
 
 
-openssl10 = OPENSSL_VERSION_NUMBER < 0x10100000 or LIBRESSL_VERSION_NUMBER
-
-
 import struct
 import struct
 
 
 _int = struct.Struct('>I')
 _int = struct.Struct('>I')