NokitaKaze icon

Add GOST94 support and other ciphers support to wget

NokitaKaze | PRO | 06/16/14 02:29:22 AM UTC | 0 ⭐ | 595 👁️ | Never ⏰ | []
Diff |

1.57 KB

|

None

|

0 👍

/

0 👎

From b9665ada4cad4da8abef32fb007e9f943efdf589 Mon Sep 17 00:00:00 2001
From: Nikita Vetrov <[email protected]>
Date: Sat, 21 Jun 2014 08:34:13 +0200
Subject: [PATCH] Add GOST94-GOST89-GOST89 and other ciphers support
 
It is done via one-time call OPENSSL_config. It will fix this error
`OpenSSL: error:140920F8:SSL routines:SSL3_GET_SERVER_HELLO:unknown
cipher returned`. OpenSSL with GOST-support and rebuilding wget
required
---
 src/ChangeLog |  4 ++++
 src/openssl.c | 10 ++++++++++
 2 files changed, 14 insertions(+)
 
diff --git a/src/ChangeLog b/src/ChangeLog
index aabfaf5..e247e8b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-21  Nikita Vetrov  <[email protected]>
+
+   * openssl.c: Add one-time call OPENSSL_config in ssl_init.
+
 2014-06-19  Giuseppe Scrivano  <[email protected]>
 
    * mswindows.c (fake_fork_child): Revert dinamic allocation of
diff --git a/src/openssl.c b/src/openssl.c
index 4eab376..c6b495b 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -153,6 +153,9 @@ key_type_to_ssl_type (enum keyfile_type type)
     }
 }
 
+/* SSL has been initialized */
+int ssl_true_initilialized = 0;
+
 /* Create an SSL Context and set default paths etc.  Called the first
    time an HTTP download is attempted.
 
@@ -161,6 +164,13 @@ key_type_to_ssl_type (enum keyfile_type type)
 bool
 ssl_init (void)
 {
+#if OPENSSL_VERSION_NUMBER >= 0x00907000
+  if (ssl_true_initilialized == 0){
+    OPENSSL_config (NULL);
+    ssl_true_initilialized = 1;
+  }
+#endif
+
   SSL_METHOD const *meth;
 
   if (ssl_ctx)
-- 
1.9.1

Comments