Want more features on Pastebin? Sign Up, it's FREE!
Guest

dclib openssl patch

By: a guest on Apr 9th, 2010  |  syntax: C++  |  size: 1.80 KB  |  views: 656  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff -up dclib-0.3.23/dclib/core/cssl.cpp.openssl dclib-0.3.23/dclib/core/cssl.cpp
  2. --- dclib-0.3.23/dclib/core/cssl.cpp.openssl    2009-01-07 23:13:52.000000000 +0100
  3. +++ dclib-0.3.23/dclib/core/cssl.cpp    2009-08-25 14:12:21.000000000 +0200
  4. @@ -86,7 +86,11 @@ void CSSL::DeInitSSLLibrary()
  5.  /** */
  6.  SSL_CTX * CSSL::InitClientCTX()
  7.  {
  8. +#if OPENSSL_VERSION_NUMBER >= 0x10000000L
  9. +       const SSL_METHOD *method;
  10. +#else
  11.         SSL_METHOD *method;
  12. +#endif
  13.         SSL_CTX *ctx = NULL;
  14.  
  15.         method = SSLv23_client_method();                /* Create new client-method instance */
  16. @@ -109,7 +113,11 @@ SSL_CTX * CSSL::InitClientCTX()
  17.  /** */
  18.  SSL_CTX * CSSL::InitServerCTX()
  19.  {
  20. +#if OPENSSL_VERSION_NUMBER >= 0x10000000L
  21. +       const SSL_METHOD *method;
  22. +#else
  23.         SSL_METHOD *method;
  24. +#endif
  25.         SSL_CTX *ctx = NULL;
  26.  
  27.         method = SSLv23_server_method();                /* Create new client-method instance */
  28. @@ -130,9 +138,14 @@ SSL_CTX * CSSL::InitServerCTX()
  29.  /** */
  30.  SSL_CTX * CSSL::NewTLSv1ClientCTX()
  31.  {
  32. -       SSL_METHOD * method = TLSv1_client_method();
  33. +#if OPENSSL_VERSION_NUMBER >= 0x10000000L
  34. +       const SSL_METHOD *method;
  35. +#else
  36. +       SSL_METHOD *method;
  37. +#endif
  38.         SSL_CTX * ctx = NULL;
  39.  
  40. +       method = TLSv1_client_method();
  41.         if ( method != NULL )
  42.         {
  43.                 ctx = SSL_CTX_new(method);
  44. @@ -149,9 +162,14 @@ SSL_CTX * CSSL::NewTLSv1ClientCTX()
  45.  /** */
  46.  SSL_CTX * CSSL::NewTLSv1ServerCTX()
  47.  {
  48. -       SSL_METHOD * method = TLSv1_server_method();
  49. +#if OPENSSL_VERSION_NUMBER >= 0x10000000L
  50. +       const SSL_METHOD *method;
  51. +#else
  52. +       SSL_METHOD *method;
  53. +#endif
  54.         SSL_CTX * ctx = NULL;
  55.  
  56. +       method = TLSv1_server_method();
  57.         if ( method != NULL )
  58.         {
  59.                 ctx = SSL_CTX_new(method);
clone this paste RAW Paste Data