Skip to content

Commit

Permalink
wolfssl: OpenSSL coexistence tweaks, GitHub #1469
Browse files Browse the repository at this point in the history
Port of upstream patch by Daniel Pouzzner
  • Loading branch information
rdmark committed Sep 13, 2024
1 parent 56b9acf commit 0903227
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
15 changes: 11 additions & 4 deletions include/wolfssl/openssl/opensslv.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x0090810fL) ||\
defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x10100000L) ||\
defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x10001040L)
/* valid version */
/* valid version */
#elif defined(OPENSSL_VERSION_NUMBER)
/* unrecognized version, but continue. */
#define WOLFSSL_OPENSSL_VERSION_NUMBER_UNRECOGNIZED
#elif defined(WOLFSSL_APACHE_HTTPD) || defined(HAVE_LIBEST) || \
defined(WOLFSSL_BIND) || defined(WOLFSSL_NGINX) || \
defined(WOLFSSL_RSYSLOG) || defined(WOLFSSL_KRB) || defined(HAVE_STUNNEL) || \
Expand All @@ -55,11 +58,15 @@
#define OPENSSL_VERSION_NUMBER 0x0090810fL
#endif

#define OPENSSL_VERSION_TEXT "wolfSSL " LIBWOLFSSL_VERSION_STRING
#define OPENSSL_VERSION 0
#ifndef OPENSSL_VERSION_TEXT
#define OPENSSL_VERSION_TEXT "wolfSSL " LIBWOLFSSL_VERSION_STRING
#endif
#ifndef OPENSSL_VERSION
#define OPENSSL_VERSION 0
#endif

#ifndef OPENSSL_IS_WOLFSSL
#define OPENSSL_IS_WOLFSSL
#define OPENSSL_IS_WOLFSSL
#endif

#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
Expand Down
5 changes: 2 additions & 3 deletions libatalk/ssl/src/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
#endif

#include <wolfssl/wolfcrypt/settings.h>
#if defined(OPENSSL_EXTRA) && !defined(_WIN32)
#if defined(OPENSSL_EXTRA) && !defined(_WIN32) && !defined(_GNU_SOURCE)
/* turn on GNU extensions for XVASPRINTF with wolfSSL_BIO_printf */
#undef _GNU_SOURCE
#define _GNU_SOURCE
#define _GNU_SOURCE 1
#endif

#if !defined(WOLFSSL_BIO_INCLUDED)
Expand Down
5 changes: 2 additions & 3 deletions libatalk/ssl/src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
#endif

#include <wolfssl/wolfcrypt/settings.h>
#if defined(OPENSSL_EXTRA) && !defined(_WIN32)
#if defined(OPENSSL_EXTRA) && !defined(_WIN32) && !defined(_GNU_SOURCE)
/* turn on GNU extensions for XISASCII */
#undef _GNU_SOURCE
#define _GNU_SOURCE
#define _GNU_SOURCE 1
#endif

#if !defined(WOLFCRYPT_ONLY) || defined(OPENSSL_EXTRA) || \
Expand Down

0 comments on commit 0903227

Please sign in to comment.