opensslv.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* opensslv.h
  2. *
  3. * Copyright (C) 2006-2023 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. /* opensslv.h compatibility */
  22. #ifndef WOLFSSL_OPENSSLV_H_
  23. #define WOLFSSL_OPENSSLV_H_
  24. #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
  25. /* api version compatibility */
  26. #if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x009070dfL) ||\
  27. defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x0090810fL) ||\
  28. defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x10100000L) ||\
  29. defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER == 0x10001040L)
  30. /* valid version */
  31. #elif defined(WOLFSSL_APACHE_HTTPD) || defined(HAVE_LIBEST) || \
  32. defined(WOLFSSL_BIND) || defined(WOLFSSL_NGINX) || \
  33. defined(WOLFSSL_RSYSLOG) || defined(WOLFSSL_KRB) || defined(HAVE_STUNNEL)
  34. /* For Apache httpd, Use 1.1.0 compatibility */
  35. #define OPENSSL_VERSION_NUMBER 0x10100003L
  36. #elif defined(WOLFSSL_QT) || defined(WOLFSSL_PYTHON)
  37. /* For Qt and Python 3.8.5 compatibility */
  38. #define OPENSSL_VERSION_NUMBER 0x10101000L
  39. #elif defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_FFMPEG)
  40. #define OPENSSL_VERSION_NUMBER 0x1010000fL
  41. #elif defined(OPENSSL_ALL) || defined(HAVE_LIGHTY) || \
  42. defined(WOLFSSL_NGINX) || defined(WOLFSSL_OPENSSH) || defined(WOLFSSL_OPENVPN)
  43. /* version number can be increased for Lighty after compatibility for ECDH
  44. is added */
  45. #define OPENSSL_VERSION_NUMBER 0x10001040L
  46. #else
  47. #define OPENSSL_VERSION_NUMBER 0x0090810fL
  48. #endif
  49. #define OPENSSL_VERSION_TEXT "wolfSSL " LIBWOLFSSL_VERSION_STRING
  50. #define OPENSSL_VERSION 0
  51. #endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
  52. #endif /* header */