Advertisement
NokitaKaze

Add GOST94 support and other ciphers support to wget

Jun 15th, 2014
342
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From b9665ada4cad4da8abef32fb007e9f943efdf589 Mon Sep 17 00:00:00 2001
  2. From: Nikita Vetrov <admin@kanaria.ru>
  3. Date: Sat, 21 Jun 2014 08:34:13 +0200
  4. Subject: [PATCH] Add GOST94-GOST89-GOST89 and other ciphers support
  5.  
  6. It is done via one-time call OPENSSL_config. It will fix this error
  7. `OpenSSL: error:140920F8:SSL routines:SSL3_GET_SERVER_HELLO:unknown
  8. cipher returned`. OpenSSL with GOST-support and rebuilding wget
  9. required
  10. ---
  11. src/ChangeLog |  4 ++++
  12.  src/openssl.c | 10 ++++++++++
  13.  2 files changed, 14 insertions(+)
  14.  
  15. diff --git a/src/ChangeLog b/src/ChangeLog
  16. index aabfaf5..e247e8b 100644
  17. --- a/src/ChangeLog
  18. +++ b/src/ChangeLog
  19. @@ -1,3 +1,7 @@
  20. +2014-06-21  Nikita Vetrov  <admin@kanaria.ru>
  21. +
  22. +   * openssl.c: Add one-time call OPENSSL_config in ssl_init.
  23. +
  24.  2014-06-19  Giuseppe Scrivano  <gscrivan@redhat.com>
  25.  
  26.     * mswindows.c (fake_fork_child): Revert dinamic allocation of
  27. diff --git a/src/openssl.c b/src/openssl.c
  28. index 4eab376..c6b495b 100644
  29. --- a/src/openssl.c
  30. +++ b/src/openssl.c
  31. @@ -153,6 +153,9 @@ key_type_to_ssl_type (enum keyfile_type type)
  32.      }
  33.  }
  34.  
  35. +/* SSL has been initialized */
  36. +int ssl_true_initilialized = 0;
  37. +
  38.  /* Create an SSL Context and set default paths etc.  Called the first
  39.     time an HTTP download is attempted.
  40.  
  41. @@ -161,6 +164,13 @@ key_type_to_ssl_type (enum keyfile_type type)
  42.  bool
  43.  ssl_init (void)
  44.  {
  45. +#if OPENSSL_VERSION_NUMBER >= 0x00907000
  46. +  if (ssl_true_initilialized == 0){
  47. +    OPENSSL_config (NULL);
  48. +    ssl_true_initilialized = 1;
  49. +  }
  50. +#endif
  51. +
  52.    SSL_METHOD const *meth;
  53.  
  54.    if (ssl_ctx)
  55. --
  56. 1.9.1
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement