Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 674032 | Differences between
and this patch

Collapse All | Expand All

(-)flow-tools-0.68.5.1.orig/lib/ftxlate.c (+14 lines)
Lines 34-39 Link Here
34
#include <openssl/ssl.h>
34
#include <openssl/ssl.h>
35
#include <openssl/evp.h>
35
#include <openssl/evp.h>
36
#undef free_func
36
#undef free_func
37
38
/* fixup LibreSSL OpenSSL version numbering */
39
#include <openssl/opensslv.h>
40
#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
41
#undef OPENSSL_VERSION_NUMBER
42
#define OPENSSL_VERSION_NUMBER 0x1000107fL
43
#endif
44
37
#endif /* HAVE_OPENSSL */
45
#endif /* HAVE_OPENSSL */
38
46
39
#include <sys/time.h>
47
#include <sys/time.h>
Lines 2040-2050 Link Here
2040
2048
2041
2049
2042
  /* init crypto */
2050
  /* init crypto */
2051
#if OPENSSL_VERSION_NUMBER < 0x10100000L
2043
  if (!(cp->cipher_ctx = (EVP_CIPHER_CTX*) malloc(sizeof(EVP_CIPHER_CTX)))) {
2052
  if (!(cp->cipher_ctx = (EVP_CIPHER_CTX*) malloc(sizeof(EVP_CIPHER_CTX)))) {
2044
    return -1;
2053
    return -1;
2045
  }
2054
  }
2046
2055
2047
  EVP_CIPHER_CTX_init(cp->cipher_ctx);
2056
  EVP_CIPHER_CTX_init(cp->cipher_ctx);
2057
#endif
2048
2058
2049
  /* disable padding */
2059
  /* disable padding */
2050
  if (!(EVP_CIPHER_CTX_set_padding(cp->cipher_ctx, 0))) {
2060
  if (!(EVP_CIPHER_CTX_set_padding(cp->cipher_ctx, 0))) {
Lines 2083-2092 Link Here
2083
{
2093
{
2084
2094
2085
#ifdef HAVE_OPENSSL
2095
#ifdef HAVE_OPENSSL
2096
#if OPENSSL_VERSION_NUMBER < 0x10100000L
2086
  EVP_CIPHER_CTX_cleanup(cp->cipher_ctx);
2097
  EVP_CIPHER_CTX_cleanup(cp->cipher_ctx);
2087
2098
2088
  if (cp->cipher_ctx)
2099
  if (cp->cipher_ctx)
2089
    free (cp->cipher_ctx);
2100
    free (cp->cipher_ctx);
2101
#else
2102
  EVP_CIPHER_CTX_free(cp->cipher_ctx);
2103
#endif
2090
#endif /* HAVE_OPENSSL */
2104
#endif /* HAVE_OPENSSL */
2091
2105
2092
  return 0;
2106
  return 0;

Return to bug 674032