     * ServerHello. */
    if (!SSL_TRANSCRIPT_init_hash(&hs->transcript, ssl3_protocol_version(ssl),
 diff --git a/ssl/internal.h b/ssl/internal.h
-index a6dfad5..1debe32 100644
+index a6dfad5..e75b435 100644
 --- a/ssl/internal.h
 +++ b/ssl/internal.h
-@@ -162,6 +162,55 @@ OPENSSL_MSVC_PRAGMA(warning(pop))
+@@ -162,7 +162,6 @@ OPENSSL_MSVC_PRAGMA(warning(pop))
  extern "C" {
  #endif
+ 
+-
+ /* Cipher suites. */
+ 
+ /* Bits for |algorithm_mkey| (key exchange algorithm). */
+@@ -173,6 +172,11 @@ extern "C" {
+ #define SSL_kPSK 0x00000008L
+ #define SSL_kGENERIC 0x00000010L
+ 
++#if defined(GOSTSSL)
++#define SSL_kGOST341001 0x00010000L
++#define SSL_kGOST341012 0x00020000L
++#endif
++
+ /* Bits for |algorithm_auth| (server authentication). */
+ #define SSL_aRSA 0x00000001L
+ #define SSL_aECDSA 0x00000002L
+@@ -180,6 +184,11 @@ extern "C" {
+ #define SSL_aPSK 0x00000004L
+ #define SSL_aGENERIC 0x00000008L
+ 
++#if defined(GOSTSSL)
++#define SSL_aGOST341001 0x00010000L
++#define SSL_aGOST341012 0x00020000L
++#endif
++
+ #define SSL_aCERT (SSL_aRSA | SSL_aECDSA)
+ 
+ /* Bits for |algorithm_enc| (symmetric encryption). */
+@@ -191,6 +200,10 @@ extern "C" {
+ #define SSL_eNULL                0x00000020L
+ #define SSL_CHACHA20POLY1305     0x00000040L
+ 
++#if defined(GOSTSSL)
++#define SSL_eGOST28147 0x00010000L
++#endif
++
+ #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AES128GCM | SSL_AES256GCM)
+ 
+ /* Bits for |algorithm_mac| (symmetric authentication). */
+@@ -200,6 +213,10 @@ extern "C" {
+ /* SSL_AEAD is set for all AEADs. */
+ #define SSL_AEAD 0x00000008L
+ 
++#if defined(GOSTSSL)
++#define SSL_iGOST28147 0x00010000L
++#endif
++
+ /* Bits for |algorithm_prf| (handshake digest). */
+ #define SSL_HANDSHAKE_MAC_DEFAULT 0x1
+ #define SSL_HANDSHAKE_MAC_SHA256 0x2
+@@ -2177,6 +2194,55 @@ void ssl_get_current_time(const SSL *ssl, struct timeval *out_clock);
+ /* ssl_reset_error_state resets state for |SSL_get_error|. */
+ void ssl_reset_error_state(SSL *ssl);
  
 +#if defined(GOSTSSL)
 +//

---
 include/openssl/ssl.h  |   8 ++++
 ssl/handshake_client.c |  11 +++++
 ssl/internal.h         |  67 ++++++++++++++++++++++++++
 ssl/ssl_cipher.c       |  36 ++++++++++++++
 ssl/ssl_lib.c          | 128 +++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 250 insertions(+)

diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 3131539..fcc1fd5 100644

+//
+#endif
 
 #if defined(__cplusplus)
 } /* extern C */
diff --git a/ssl/ssl_cipher.c b/ssl/ssl_cipher.c
index 4a7459f..2a51a8a 100644
--- a/ssl/ssl_cipher.c
