-From 5f487610fb398e6bbef191a5c11c323608d70dc7 Mon Sep 17 00:00:00 2001
+From dac8972b7510c847120c77f69d9b1d4ccdf60a81 Mon Sep 17 00:00:00 2001
 From: Dmitrii Pichulin <deem@deem.ru>
 Date: Wed, 6 Sep 2017 12:35:51 +0300
 Subject: [PATCH] added GOSTSSL

 include/openssl/tls1.h  |   5 ++
 ssl/handshake_client.cc |  11 +++++
 ssl/internal.h          |  63 ++++++++++++++++++++++++
 ssl/ssl_cipher.cc       |  38 +++++++++++++++
 ssl/ssl_lib.cc          | 125 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 250 insertions(+)

diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 4a1a726..833e0f3 100644

+  if( gostssl() )
+  {
+      ssl_cipher_apply_rule( 0, ~0u, ~0u, SSL_eGOST28147, ~0u, 0, CIPHER_ADD, -1, 0, &head, &tail );
+  }
+  else
+  {
+      ssl_cipher_apply_rule( 0, ~0u, ~0u, SSL_eGOST28147, ~0u, 0, CIPHER_KILL, -1, 0, &head, &tail );
+  }
+#endif
+
   /* Temporarily enable everything else for sorting */
   ssl_cipher_apply_rule(0, ~0u, ~0u, ~0u, ~0u, 0, CIPHER_ADD, -1, 0, &head,
                         &tail);
@@ -1535,6 +1574,9 @@ int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *out_alg_bits) {
 
     case SSL_AES256:
     case SSL_AES256GCM:
