 +  switch( cipher_suite )
 +  {
 +  case 0x0081: // GOST2001-GOST89-GOST89
-+      *key_exchange_str = "GOSTR341001";
-+      *cipher_str = "GOST28147CNT";
-+      *mac_str = "GOST28147IMIT";
++  case 0xff85: // GOST2012-GOST8912-GOST8912
++  case 0xc102: // TLS_GOSTR341112_256_WITH_28147_CNT_IMIT
++      *key_exchange_str = "GOST_R_3410_2001";
++      *cipher_str = "GOST_28147_CNT";
++      *mac_str = "GOST_28147_IMIT";
 +      return;
 +
-+  case 0xff85: // GOST2012-GOST8912-GOST8912
-+      *key_exchange_str = "GOSTR341012";
-+      *cipher_str = "GOST28147CNT";
-+      *mac_str = "GOST28147IMIT";
++  case 0xc100: // TLS_GOSTR341112_256_WITH_KUZNYECHIK_CTR_OMAC
++      *key_exchange_str = "GOST_R_3410_2012_512";
++      *cipher_str = "GOST_KUZNYECHIK_CTR";
++      *mac_str = "GOST_KUZNYECHIK_OMAC";
++      return;
++
++  case 0xc101: // TLS_GOSTR341112_256_WITH_MAGMA_CTR_OMAC
++      *key_exchange_str = "GOST_R_3410_2001";
++      *cipher_str = "GOST_MAGMA_CTR";
++      *mac_str = "GOST_MAGMA_OMAC";
 +      return;
 +
 +  default:
 +      break;
-+
 +  }
 +#endif // GOSTSSL
 +
    const SSL_CIPHER* cipher = SSL_get_cipher_by_value(cipher_suite);
    if (!cipher)
      return;
-@@ -179,6 +200,11 @@ int ObsoleteSSLStatus(int connection_status, uint16_t signature_algorithm) {
+@@ -179,6 +207,14 @@ int ObsoleteSSLStatus(int connection_status, uint16_t signature_algorithm) {
    obsolete_ssl |= ObsoleteSSLStatusForProtocol(ssl_version);
  
    uint16_t cipher_suite = SSLConnectionStatusToCipherSuite(connection_status);
 +#ifndef NO_GOSTSSL
-+  if( cipher_suite == 0x0081 /* GOST2001-GOST89-GOST89 */ || 
++  if( cipher_suite == 0xc102 /* TLS_GOSTR341112_256_WITH_28147_CNT_IMIT */ ||
++      cipher_suite == 0xc101 /* TLS_GOSTR341112_256_WITH_MAGMA_CTR_OMAC */ ||
++      cipher_suite == 0xc100 /* TLS_GOSTR341112_256_WITH_KUZNYECHIK_CTR_OMAC */ ||
++      cipher_suite == 0x0081 /* GOST2001-GOST89-GOST89 */ ||
 +      cipher_suite == 0xff85 /* GOST2012-GOST8912-GOST8912 */ )
 +    return OBSOLETE_SSL_NONE;
 +#endif // GOSTSSL

+  {
+  case 0xff85: // GOST2012-GOST8912-GOST8912
+  case 0x0081: // GOST2001-GOST89-GOST89
+      return true;
+  default:
+      break;

From 6a80f7c7fee9567327b7cd0517080c4306f70ab8 Mon Sep 17 00:00:00 2001
From: Dmitrii Pichulin <deem@deem.ru>
Date: Wed, 8 Apr 2020 13:31:28 +0300
Subject: [PATCH] chromium GOSTSSL

---
