>From 9e81ba108532ebacadd07c170f5d494b62c40bfb Mon Sep 17 00:00:00 2001
From: Nikita Vetrov <[email protected]>
Date: Mon, 16 Jun 2014 04:27:18 +0200
Subject: [PATCH] Add GOST94-GOST89-GOST89 support and another ciphers support
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/openssl.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/openssl.c b/src/openssl.c
index 4eab376..57ccdfc 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