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.

87 lines
2.6 KiB

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