You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.3 KiB

  1. --- a/src/nopoll.c
  2. +++ b/src/nopoll.c
  3. @@ -868,9 +868,11 @@ void nopoll_cleanup_library (void)
  4. {
  5. if (__nopoll_tls_was_init) {
  6. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  7. EVP_cleanup ();
  8. CRYPTO_cleanup_all_ex_data ();
  9. ERR_free_strings ();
  10. +#endif
  11. /* notify the library isn't initialized */
  12. __nopoll_tls_was_init = nopoll_false;
  13. --- a/src/nopoll_conn.c
  14. +++ b/src/nopoll_conn.c
  15. @@ -1380,7 +1380,9 @@ noPollConn * nopoll_conn_tls_new (noPoll
  16. /* init ssl ciphers and engines */
  17. if (! __nopoll_tls_was_init) {
  18. __nopoll_tls_was_init = nopoll_true;
  19. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  20. SSL_library_init ();
  21. +#endif
  22. } /* end if */
  23. /* call common implementation */
  24. @@ -1426,7 +1428,9 @@ noPollConn * nopoll_conn_tls_new6 (noPol
  25. /* init ssl ciphers and engines */
  26. if (! __nopoll_tls_was_init) {
  27. __nopoll_tls_was_init = nopoll_true;
  28. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  29. SSL_library_init ();
  30. +#endif
  31. } /* end if */
  32. /* call common implementation */
  33. @@ -1495,7 +1499,9 @@ noPollConn * nopoll_conn_tls_new_with_so
  34. /* init ssl ciphers and engines */
  35. if (! __nopoll_tls_was_init) {
  36. __nopoll_tls_was_init = nopoll_true;
  37. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  38. SSL_library_init ();
  39. +#endif
  40. } /* end if */
  41. /* call common implementation */
  42. @@ -4755,7 +4761,9 @@ nopoll_bool __nopoll_conn_accept_complet
  43. /* init ssl ciphers and engines */
  44. if (! __nopoll_tls_was_init) {
  45. __nopoll_tls_was_init = nopoll_true;
  46. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  47. SSL_library_init ();
  48. +#endif
  49. } /* end if */
  50. /* now configure chainCertificate */
  51. --- a/src/nopoll_decl.h
  52. +++ b/src/nopoll_decl.h
  53. @@ -511,20 +511,18 @@ typedef enum {
  54. * established with this method will only understand this
  55. * method.
  56. */
  57. - NOPOLL_METHOD_TLSV1_1 = 5
  58. + NOPOLL_METHOD_TLSV1_1 = 5,
  59. #endif
  60. #if defined(NOPOLL_HAVE_TLSv12_ENABLED)
  61. - ,
  62. /**
  63. * @brief Allows to define TLSv1.2 as SSL protocol used by the
  64. * client or server connection. A connection/listener
  65. * established with this method will only understand this
  66. * method.
  67. */
  68. - NOPOLL_METHOD_TLSV1_2 = 6
  69. + NOPOLL_METHOD_TLSV1_2 = 6,
  70. #endif
  71. #if defined(NOPOLL_HAVE_TLS_FLEXIBLE_ENABLED)
  72. - ,
  73. /**
  74. * @brief Allows to define TLS flexible negotiation where the
  75. * highest version available will be negotiated by both