  
  const SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl) {
 +#ifdef GOSTSSL
-+    if( ssl->s3->established_session && 
++    if( ssl->s3->established_session &&
 +        ssl->s3->established_session->cipher &&
 +        ssl->s3->established_session->cipher->algorithm_enc == SSL_eGOST28147 )
 +        return ssl->s3->established_session->cipher;

       alg_bits = 256;
       strength_bits = 256;
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
index 9ecd7df..8be79a2 100644
--- a/ssl/ssl_lib.cc
+++ b/ssl/ssl_lib.cc
@@ -454,6 +454,169 @@ static int ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b) {

From 790c7b4cc5ab9a9cbbec741f71e6df7e580edfe2 Mon Sep 17 00:00:00 2001
From: Dmitrii Pichulin <deem@deem.ru>
Date: Wed, 18 Oct 2017 09:58:24 +0300
Subject: [PATCH] added GOSTSSL
