aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gost89.c11
-rw-r--r--gost89.h2
-rw-r--r--gost_crypt.c66
-rw-r--r--gost_eng.c1
-rw-r--r--gost_lcl.h1
-rw-r--r--patches/1.0.2/cipher_modes.diff158
-rw-r--r--patches/1.0.2/numeric.diff28
-rw-r--r--patches/1.0.2/oids.diff688
-rw-r--r--patches/1.0.2/pkcs12.diff78
-rw-r--r--patches/1.0.2/smimecap.diff25
-rw-r--r--patches/1.1.1/6438.diff409
11 files changed, 490 insertions, 977 deletions
diff --git a/gost89.c b/gost89.c
index 47b7ba0..9011e1d 100644
--- a/gost89.c
+++ b/gost89.c
@@ -449,6 +449,17 @@ void gost_key(gost_ctx * c, const byte * k)
}
}
+/* Set 256 bit key into context */
+void magma_key(gost_ctx * c, const byte * k)
+{
+ int i, j;
+ for (i = 7, j = 0; i >= 0; i--, j += 4) {
+ c->k[i] =
+ k[j] | (k[j + 1] << 8) | (k[j + 2] << 16) | ((word32) k[j + 3] <<
+ 24);
+ }
+}
+
/* Retrieve 256-bit key from context */
void gost_get_key(gost_ctx * c, byte * k)
{
diff --git a/gost89.h b/gost89.h
index 13f35e1..59a938f 100644
--- a/gost89.h
+++ b/gost89.h
@@ -59,6 +59,8 @@ void gostcrypt(gost_ctx * c, const byte * in, byte * out);
void gostdecrypt(gost_ctx * c, const byte * in, byte * out);
/* Set key into context */
void gost_key(gost_ctx * ctx, const byte * key);
+/* Set key into context */
+void magma_key(gost_ctx * ctx, const byte * key);
/* Get key from context */
void gost_get_key(gost_ctx * ctx, byte * key);
/* Set S-blocks into context */
diff --git a/gost_crypt.c b/gost_crypt.c
index c7c8caa..69a8f0d 100644
--- a/gost_crypt.c
+++ b/gost_crypt.c
@@ -46,6 +46,8 @@ static int gost89_get_asn1_parameters(EVP_CIPHER_CTX *ctx, ASN1_TYPE *params);
/* Control function */
static int gost_cipher_ctl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
+static int magma_cipher_init_cbc(EVP_CIPHER_CTX *ctx, const unsigned char *key,
+ const unsigned char *iv, int enc);
static EVP_CIPHER *_hidden_Gost28147_89_cipher = NULL;
const EVP_CIPHER *cipher_gost(void)
{
@@ -187,6 +189,40 @@ const EVP_CIPHER *cipher_gost_cpcnt_12(void)
return _hidden_gost89_cnt_12;
}
+static EVP_CIPHER *_hidden_magma_cbc = NULL;
+const EVP_CIPHER *cipher_magma_cbc(void)
+{
+ if (_hidden_magma_cbc == NULL
+ && ((_hidden_magma_cbc =
+ EVP_CIPHER_meth_new(NID_magma_cbc, 8 /* block_size */ ,
+ 32 /* key_size */ )) == NULL
+ || !EVP_CIPHER_meth_set_iv_length(_hidden_magma_cbc, 8)
+ || !EVP_CIPHER_meth_set_flags(_hidden_magma_cbc,
+ EVP_CIPH_CBC_MODE |
+ EVP_CIPH_CUSTOM_IV |
+ EVP_CIPH_RAND_KEY |
+ EVP_CIPH_ALWAYS_CALL_INIT)
+ || !EVP_CIPHER_meth_set_init(_hidden_magma_cbc,
+ magma_cipher_init_cbc)
+ || !EVP_CIPHER_meth_set_do_cipher(_hidden_magma_cbc,
+ gost_cipher_do_cbc)
+ || !EVP_CIPHER_meth_set_cleanup(_hidden_magma_cbc,
+ gost_cipher_cleanup)
+ || !EVP_CIPHER_meth_set_impl_ctx_size(_hidden_magma_cbc,
+ sizeof(struct
+ ossl_gost_cipher_ctx))
+ || !EVP_CIPHER_meth_set_set_asn1_params(_hidden_magma_cbc,
+ gost89_set_asn1_parameters)
+ || !EVP_CIPHER_meth_set_get_asn1_params(_hidden_magma_cbc,
+ gost89_get_asn1_parameters)
+ || !EVP_CIPHER_meth_set_ctrl(_hidden_magma_cbc,
+ gost_cipher_ctl))) {
+ EVP_CIPHER_meth_free(_hidden_magma_cbc);
+ _hidden_magma_cbc = NULL;
+ }
+ return _hidden_magma_cbc;
+}
+
void cipher_gost_destroy(void)
{
EVP_CIPHER_meth_free(_hidden_Gost28147_89_cipher);
@@ -385,6 +421,28 @@ static int gost_cipher_init_param(EVP_CIPHER_CTX *ctx,
return 1;
}
+static int magma_cipher_init_param(EVP_CIPHER_CTX *ctx,
+ const unsigned char *key,
+ const unsigned char *iv, int enc,
+ int paramNID, int mode)
+{
+ struct ossl_gost_cipher_ctx *c = EVP_CIPHER_CTX_get_cipher_data(ctx);
+ if (EVP_CIPHER_CTX_get_app_data(ctx) == NULL) {
+ if (!gost_cipher_set_param(c, paramNID))
+ return 0;
+ EVP_CIPHER_CTX_set_app_data(ctx, EVP_CIPHER_CTX_get_cipher_data(ctx));
+ }
+ if (key)
+ magma_key(&(c->cctx), key);
+ if (iv) {
+ memcpy((unsigned char *)EVP_CIPHER_CTX_original_iv(ctx), iv,
+ EVP_CIPHER_CTX_iv_length(ctx));
+ }
+ memcpy(EVP_CIPHER_CTX_iv_noconst(ctx),
+ EVP_CIPHER_CTX_original_iv(ctx), EVP_CIPHER_CTX_iv_length(ctx));
+ return 1;
+}
+
static int gost_cipher_init_cnt(EVP_CIPHER_CTX *ctx,
const unsigned char *key,
const unsigned char *iv,
@@ -434,6 +492,14 @@ int gost_cipher_init_cbc(EVP_CIPHER_CTX *ctx, const unsigned char *key,
EVP_CIPH_CBC_MODE);
}
+/* Initializes EVP_CIPHER_CTX with default values */
+int magma_cipher_init_cbc(EVP_CIPHER_CTX *ctx, const unsigned char *key,
+ const unsigned char *iv, int enc)
+{
+ return magma_cipher_init_param(ctx, key, iv, enc, NID_undef,
+ EVP_CIPH_CBC_MODE);
+}
+
/*
* Wrapper around gostcrypt function from gost89.c which perform key meshing
* when nesseccary
diff --git a/gost_eng.c b/gost_eng.c
index 16316a1..0a2af55 100644
--- a/gost_eng.c
+++ b/gost_eng.c
@@ -224,6 +224,7 @@ static int bind_gost(ENGINE* e, const char* id) {
|| !EVP_add_cipher(cipher_gost_grasshopper_cfb())
|| !EVP_add_cipher(cipher_gost_grasshopper_ofb())
|| !EVP_add_cipher(cipher_gost_grasshopper_ctr())
+ || !EVP_add_cipher(cipher_magma_cbc())
|| !EVP_add_digest(digest_gost())
|| !EVP_add_digest(digest_gost2012_512())
|| !EVP_add_digest(digest_gost2012_256())
diff --git a/gost_lcl.h b/gost_lcl.h
index 4caeeeb..6f3cadc 100644
--- a/gost_lcl.h
+++ b/gost_lcl.h
@@ -211,6 +211,7 @@ const EVP_CIPHER *cipher_gost();
const EVP_CIPHER *cipher_gost_cbc();
const EVP_CIPHER *cipher_gost_cpacnt();
const EVP_CIPHER *cipher_gost_cpcnt_12();
+const EVP_CIPHER *cipher_magma_cbc();
void cipher_gost_destroy();
# define EVP_MD_CTRL_KEY_LEN (EVP_MD_CTRL_ALG_CTRL+3)
# define EVP_MD_CTRL_SET_KEY (EVP_MD_CTRL_ALG_CTRL+4)
diff --git a/patches/1.0.2/cipher_modes.diff b/patches/1.0.2/cipher_modes.diff
deleted file mode 100644
index 2a2ab13..0000000
--- a/patches/1.0.2/cipher_modes.diff
+++ /dev/null
@@ -1,158 +0,0 @@
-diff -uNr crypto/objects_orig/obj_dat.h crypto/objects/obj_dat.h
---- crypto/objects_orig/obj_dat.h 2015-10-06 20:43:14.000000000 +0300
-+++ crypto/objects/obj_dat.h 2015-10-06 20:45:53.000000000 +0300
-@@ -62,9 +62,9 @@
- * [including the GNU Public Licence.]
- */
-
--#define NUM_NID 991
--#define NUM_SN 984
--#define NUM_LN 984
-+#define NUM_NID 1000
-+#define NUM_SN 993
-+#define NUM_LN 993
- #define NUM_OBJ 921
-
- static const unsigned char lvalues[6485]={
-@@ -2611,6 +2611,15 @@
- {"INN","INN",NID_INN,8,&(lvalues[6466]),0},
- {"OGRN","OGRN",NID_OGRN,5,&(lvalues[6474]),0},
- {"SNILS","SNILS",NID_SNILS,5,&(lvalues[6479]),0},
-+{"gost89-cbc","gost89-cbc",NID_gost89_cbc,0,NULL,0},
-+{"gost89-ecb","gost89-ecb",NID_gost89_ecb,0,NULL,0},
-+{"gost89-ctr","gost89-ctr",NID_gost89_ctr,0,NULL,0},
-+{"grasshopper-ecb","grasshopper-ecb",NID_grasshopper_ecb,0,NULL,0},
-+{"grasshopper-ctr","grasshopper-ctr",NID_grasshopper_ctr,0,NULL,0},
-+{"grasshopper-ofb","grasshopper-ofb",NID_grasshopper_ofb,0,NULL,0},
-+{"grasshopper-cbc","grasshopper-cbc",NID_grasshopper_cbc,0,NULL,0},
-+{"grasshopper-cfb","grasshopper-cfb",NID_grasshopper_cfb,0,NULL,0},
-+{"grasshopper-mac","grasshopper-mac",NID_grasshopper_mac,0,NULL,0},
- };
-
- static const unsigned int sn_objs[NUM_SN]={
-@@ -2964,10 +2973,19 @@
- 963, /* "gost2012_256" */
- 964, /* "gost2012_512" */
- 813, /* "gost89" */
-+991, /* "gost89-cbc" */
- 814, /* "gost89-cnt" */
- 959, /* "gost89-cnt-12" */
-+993, /* "gost89-ctr" */
-+992, /* "gost89-ecb" */
- 812, /* "gost94" */
- 850, /* "gost94cc" */
-+997, /* "grasshopper-cbc" */
-+998, /* "grasshopper-cfb" */
-+995, /* "grasshopper-ctr" */
-+994, /* "grasshopper-ecb" */
-+999, /* "grasshopper-mac" */
-+996, /* "grasshopper-ofb" */
- 797, /* "hmacWithMD5" */
- 163, /* "hmacWithSHA1" */
- 798, /* "hmacWithSHA224" */
-@@ -3971,8 +3989,17 @@
- 601, /* "generic cryptogram" */
- 99, /* "givenName" */
- 960, /* "gost-mac-12" */
-+991, /* "gost89-cbc" */
- 814, /* "gost89-cnt" */
- 959, /* "gost89-cnt-12" */
-+993, /* "gost89-ctr" */
-+992, /* "gost89-ecb" */
-+997, /* "grasshopper-cbc" */
-+998, /* "grasshopper-cfb" */
-+995, /* "grasshopper-ctr" */
-+994, /* "grasshopper-ecb" */
-+999, /* "grasshopper-mac" */
-+996, /* "grasshopper-ofb" */
- 855, /* "hmac" */
- 780, /* "hmac-md5" */
- 781, /* "hmac-sha1" */
-diff -uNr crypto/objects_orig/objects.txt crypto/objects/objects.txt
---- crypto/objects_orig/objects.txt 2015-10-06 20:43:14.000000000 +0300
-+++ crypto/objects/objects.txt 2015-10-06 20:45:45.000000000 +0300
-@@ -1171,6 +1171,9 @@
- cryptopro 21 : gost89 : GOST 28147-89
- : gost89-cnt
- : gost89-cnt-12
-+ : gost89-cbc
-+ : gost89-ecb
-+ : gost89-ctr
- !Cname id-Gost28147-89-MAC
- cryptopro 22 : gost-mac : GOST 28147-89 MAC
- : gost-mac-12
-@@ -1278,6 +1281,14 @@
- member-body 643 100 1 : OGRN : OGRN
- member-body 643 100 3 : SNILS : SNILS
-
-+#GOST R34.13-2015 Grasshopper "Kuznechik"
-+ : grasshopper-ecb
-+ : grasshopper-ctr
-+ : grasshopper-ofb
-+ : grasshopper-cbc
-+ : grasshopper-cfb
-+ : grasshopper-mac
-+
- # Definitions for Camellia cipher - CBC MODE
-
- 1 2 392 200011 61 1 1 1 2 : CAMELLIA-128-CBC : camellia-128-cbc
-diff -uNr crypto/objects_orig/obj_mac.h crypto/objects/obj_mac.h
---- crypto/objects_orig/obj_mac.h 2015-10-06 20:43:14.000000000 +0300
-+++ crypto/objects/obj_mac.h 2015-10-06 20:45:52.000000000 +0300
-@@ -3723,6 +3723,15 @@
- #define SN_gost89_cnt_12 "gost89-cnt-12"
- #define NID_gost89_cnt_12 959
-
-+#define SN_gost89_cbc "gost89-cbc"
-+#define NID_gost89_cbc 991
-+
-+#define SN_gost89_ecb "gost89-ecb"
-+#define NID_gost89_ecb 992
-+
-+#define SN_gost89_ctr "gost89-ctr"
-+#define NID_gost89_ctr 993
-+
- #define SN_id_Gost28147_89_MAC "gost-mac"
- #define LN_id_Gost28147_89_MAC "GOST 28147-89 MAC"
- #define NID_id_Gost28147_89_MAC 815
-@@ -4031,6 +4040,24 @@
- #define NID_SNILS 990
- #define OBJ_SNILS OBJ_member_body,643L,100L,3L
-
-+#define SN_grasshopper_ecb "grasshopper-ecb"
-+#define NID_grasshopper_ecb 994
-+
-+#define SN_grasshopper_ctr "grasshopper-ctr"
-+#define NID_grasshopper_ctr 995
-+
-+#define SN_grasshopper_ofb "grasshopper-ofb"
-+#define NID_grasshopper_ofb 996
-+
-+#define SN_grasshopper_cbc "grasshopper-cbc"
-+#define NID_grasshopper_cbc 997
-+
-+#define SN_grasshopper_cfb "grasshopper-cfb"
-+#define NID_grasshopper_cfb 998
-+
-+#define SN_grasshopper_mac "grasshopper-mac"
-+#define NID_grasshopper_mac 999
-+
- #define SN_camellia_128_cbc "CAMELLIA-128-CBC"
- #define LN_camellia_128_cbc "camellia-128-cbc"
- #define NID_camellia_128_cbc 751
-diff -uNr crypto/objects_orig/obj_mac.num crypto/objects/obj_mac.num
---- crypto/objects_orig/obj_mac.num 2015-10-06 20:43:14.000000000 +0300
-+++ crypto/objects/obj_mac.num 2015-10-06 20:45:51.000000000 +0300
-@@ -988,3 +988,12 @@
- INN 988
- OGRN 989
- SNILS 990
-+gost89_cbc 991
-+gost89_ecb 992
-+gost89_ctr 993
-+grasshopper_ecb 994
-+grasshopper_ctr 995
-+grasshopper_ofb 996
-+grasshopper_cbc 997
-+grasshopper_cfb 998
-+grasshopper_mac 999
diff --git a/patches/1.0.2/numeric.diff b/patches/1.0.2/numeric.diff
deleted file mode 100644
index 8c47d9d..0000000
--- a/patches/1.0.2/numeric.diff
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -Nuar openssl-1.0.2d/crypto/asn1/a_mbstr.c openssl-work/crypto/asn1/a_mbstr.c
---- openssl-1.0.2d/crypto/asn1/a_mbstr.c 2015-07-09 15:53:21.000000000 +0400
-+++ openssl-work/crypto/asn1/a_mbstr.c 2015-03-26 13:00:21.000000000 +0400
-@@ -173,6 +173,8 @@
- str_type = V_ASN1_PRINTABLESTRING;
- else if (mask & B_ASN1_IA5STRING)
- str_type = V_ASN1_IA5STRING;
-+ else if (mask & B_ASN1_NUMERICSTRING)
-+ str_type = V_ASN1_NUMERICSTRING;
- else if (mask & B_ASN1_T61STRING)
- str_type = V_ASN1_T61STRING;
- else if (mask & B_ASN1_BMPSTRING) {
-diff -Nuar openssl-1.0.2d/crypto/asn1/a_strnid.c openssl-work/crypto/asn1/a_strnid.c
---- openssl-1.0.2d/crypto/asn1/a_strnid.c 2015-07-09 15:53:21.000000000 +0400
-+++ openssl-work/crypto/asn1/a_strnid.c 2015-03-26 13:00:21.000000000 +0400
-@@ -192,7 +192,10 @@
- {NID_name, 1, ub_name, DIRSTRING_TYPE, 0},
- {NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
- {NID_domainComponent, 1, -1, B_ASN1_IA5STRING, STABLE_NO_MASK},
-- {NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}
-+ {NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
-+ {NID_INN, 1, 12, B_ASN1_NUMERICSTRING, STABLE_NO_MASK},
-+ {NID_OGRN, 1, 13, B_ASN1_NUMERICSTRING, STABLE_NO_MASK},
-+ {NID_SNILS, 1, 11, B_ASN1_NUMERICSTRING, STABLE_NO_MASK}
- };
-
- static int sk_table_cmp(const ASN1_STRING_TABLE *const *a,
-
diff --git a/patches/1.0.2/oids.diff b/patches/1.0.2/oids.diff
deleted file mode 100644
index faa66fb..0000000
--- a/patches/1.0.2/oids.diff
+++ /dev/null
@@ -1,688 +0,0 @@
-diff -Nuar openssl-1.0.2d/crypto/objects/obj_dat.h openssl-work/crypto/objects/obj_dat.h
---- openssl-1.0.2d/crypto/objects/obj_dat.h 2015-07-09 15:58:05.000000000 +0400
-+++ openssl-work/crypto/objects/obj_dat.h 2015-02-25 12:49:45.000000000 +0400
-@@ -62,12 +62,12 @@
- * [including the GNU Public Licence.]
- */
-
--#define NUM_NID 958
--#define NUM_SN 951
--#define NUM_LN 951
--#define NUM_OBJ 890
-+#define NUM_NID 991
-+#define NUM_SN 984
-+#define NUM_LN 984
-+#define NUM_OBJ 921
-
--static const unsigned char lvalues[6255]={
-+static const unsigned char lvalues[6485]={
- 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 0] OBJ_rsadsi */
- 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 6] OBJ_pkcs */
- 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 13] OBJ_md2 */
-@@ -952,6 +952,37 @@
- 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x3C,0x02,0x01,0x01,/* [6221] OBJ_jurisdictionLocalityName */
- 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x3C,0x02,0x01,0x02,/* [6232] OBJ_jurisdictionStateOrProvinceName */
- 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x3C,0x02,0x01,0x03,/* [6243] OBJ_jurisdictionCountryName */
-+0x2A,0x85,0x03,0x07,0x01, /* [6254] OBJ_id_tc26 */
-+0x2A,0x85,0x03,0x07,0x01,0x01, /* [6259] OBJ_id_tc26_algorithms */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x01, /* [6265] OBJ_id_tc26_sign */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x01,0x01, /* [6272] OBJ_id_GostR3410_2012_256 */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x01,0x02, /* [6280] OBJ_id_GostR3410_2012_512 */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x02, /* [6288] OBJ_id_tc26_digest */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x02,0x02, /* [6295] OBJ_id_GostR3411_2012_256 */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x02,0x03, /* [6303] OBJ_id_GostR3411_2012_512 */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x03, /* [6311] OBJ_id_tc26_signwithdigest */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x03,0x02, /* [6318] OBJ_id_tc26_signwithdigest_gost3410_2012_256 */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x03,0x03, /* [6326] OBJ_id_tc26_signwithdigest_gost3410_2012_512 */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x04, /* [6334] OBJ_id_tc26_mac */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x04,0x01, /* [6341] OBJ_id_tc26_hmac_gost_3411_2012_256 */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x04,0x02, /* [6349] OBJ_id_tc26_hmac_gost_3411_2012_512 */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x05, /* [6357] OBJ_id_tc26_cipher */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x06, /* [6364] OBJ_id_tc26_agreement */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x06,0x01, /* [6371] OBJ_id_tc26_agreement_gost_3410_2012_256 */
-+0x2A,0x85,0x03,0x07,0x01,0x01,0x06,0x02, /* [6379] OBJ_id_tc26_agreement_gost_3410_2012_512 */
-+0x2A,0x85,0x03,0x07,0x01,0x02, /* [6387] OBJ_id_tc26_constants */
-+0x2A,0x85,0x03,0x07,0x01,0x02,0x01, /* [6393] OBJ_id_tc26_sign_constants */
-+0x2A,0x85,0x03,0x07,0x01,0x02,0x01,0x02, /* [6400] OBJ_id_tc26_gost_3410_2012_512_constants */
-+0x2A,0x85,0x03,0x07,0x01,0x02,0x01,0x02,0x00,/* [6408] OBJ_id_tc26_gost_3410_2012_512_paramSetTest */
-+0x2A,0x85,0x03,0x07,0x01,0x02,0x01,0x02,0x01,/* [6417] OBJ_id_tc26_gost_3410_2012_512_paramSetA */
-+0x2A,0x85,0x03,0x07,0x01,0x02,0x01,0x02,0x02,/* [6426] OBJ_id_tc26_gost_3410_2012_512_paramSetB */
-+0x2A,0x85,0x03,0x07,0x01,0x02,0x02, /* [6435] OBJ_id_tc26_digest_constants */
-+0x2A,0x85,0x03,0x07,0x01,0x02,0x05, /* [6442] OBJ_id_tc26_cipher_constants */
-+0x2A,0x85,0x03,0x07,0x01,0x02,0x05,0x01, /* [6449] OBJ_id_tc26_gost_28147_constants */
-+0x2A,0x85,0x03,0x07,0x01,0x02,0x05,0x01,0x01,/* [6457] OBJ_id_tc26_gost_28147_param_Z */
-+0x2A,0x85,0x03,0x03,0x81,0x03,0x01,0x01, /* [6466] OBJ_INN */
-+0x2A,0x85,0x03,0x64,0x01, /* [6474] OBJ_OGRN */
-+0x2A,0x85,0x03,0x64,0x03, /* [6479] OBJ_SNILS */
- };
-
- static const ASN1_OBJECT nid_objs[NUM_NID]={
-@@ -2514,6 +2545,72 @@
- NID_jurisdictionStateOrProvinceName,11,&(lvalues[6232]),0},
- {"jurisdictionC","jurisdictionCountryName",
- NID_jurisdictionCountryName,11,&(lvalues[6243]),0},
-+{"id-tc26","id-tc26",NID_id_tc26,5,&(lvalues[6254]),0},
-+{"gost89-cnt-12","gost89-cnt-12",NID_gost89_cnt_12,0,NULL,0},
-+{"gost-mac-12","gost-mac-12",NID_gost_mac_12,0,NULL,0},
-+{"id-tc26-algorithms","id-tc26-algorithms",NID_id_tc26_algorithms,6,
-+ &(lvalues[6259]),0},
-+{"id-tc26-sign","id-tc26-sign",NID_id_tc26_sign,7,&(lvalues[6265]),0},
-+{"gost2012_256","GOST R 34.10-2012 with 256 bit modulus",
-+ NID_id_GostR3410_2012_256,8,&(lvalues[6272]),0},
-+{"gost2012_512","GOST R 34.10-2012 with 512 bit modulus",
-+ NID_id_GostR3410_2012_512,8,&(lvalues[6280]),0},
-+{"id-tc26-digest","id-tc26-digest",NID_id_tc26_digest,7,
-+ &(lvalues[6288]),0},
-+{"md_gost12_256","GOST R 34.11-2012 with 256 bit hash",
-+ NID_id_GostR3411_2012_256,8,&(lvalues[6295]),0},
-+{"md_gost12_512","GOST R 34.11-2012 with 512 bit hash",
-+ NID_id_GostR3411_2012_512,8,&(lvalues[6303]),0},
-+{"id-tc26-signwithdigest","id-tc26-signwithdigest",
-+ NID_id_tc26_signwithdigest,7,&(lvalues[6311]),0},
-+{"id-tc26-signwithdigest-gost3410-2012-256",
-+ "GOST R 34.10-2012 with GOST R 34.11-2012 (256 bit)",
-+ NID_id_tc26_signwithdigest_gost3410_2012_256,8,&(lvalues[6318]),0},
-+{"id-tc26-signwithdigest-gost3410-2012-512",
-+ "GOST R 34.10-2012 with GOST R 34.11-2012 (512 bit)",
-+ NID_id_tc26_signwithdigest_gost3410_2012_512,8,&(lvalues[6326]),0},
-+{"id-tc26-mac","id-tc26-mac",NID_id_tc26_mac,7,&(lvalues[6334]),0},
-+{"id-tc26-hmac-gost-3411-2012-256","HMAC GOST 34.11-2012 256 bit",
-+ NID_id_tc26_hmac_gost_3411_2012_256,8,&(lvalues[6341]),0},
-+{"id-tc26-hmac-gost-3411-2012-512","HMAC GOST 34.11-2012 512 bit",
-+ NID_id_tc26_hmac_gost_3411_2012_512,8,&(lvalues[6349]),0},
-+{"id-tc26-cipher","id-tc26-cipher",NID_id_tc26_cipher,7,
-+ &(lvalues[6357]),0},
-+{"id-tc26-agreement","id-tc26-agreement",NID_id_tc26_agreement,7,
-+ &(lvalues[6364]),0},
-+{"id-tc26-agreement-gost-3410-2012-256",
-+ "id-tc26-agreement-gost-3410-2012-256",
-+ NID_id_tc26_agreement_gost_3410_2012_256,8,&(lvalues[6371]),0},
-+{"id-tc26-agreement-gost-3410-2012-512",
-+ "id-tc26-agreement-gost-3410-2012-512",
-+ NID_id_tc26_agreement_gost_3410_2012_512,8,&(lvalues[6379]),0},
-+{"id-tc26-constants","id-tc26-constants",NID_id_tc26_constants,6,
-+ &(lvalues[6387]),0},
-+{"id-tc26-sign-constants","id-tc26-sign-constants",
-+ NID_id_tc26_sign_constants,7,&(lvalues[6393]),0},
-+{"id-tc26-gost-3410-2012-512-constants",
-+ "id-tc26-gost-3410-2012-512-constants",
-+ NID_id_tc26_gost_3410_2012_512_constants,8,&(lvalues[6400]),0},
-+{"id-tc26-gost-3410-2012-512-paramSetTest",
-+ "GOST R 34.10-2012 (512 bit) testing parameter set",
-+ NID_id_tc26_gost_3410_2012_512_paramSetTest,9,&(lvalues[6408]),0},
-+{"id-tc26-gost-3410-2012-512-paramSetA",
-+ "GOST R 34.10-2012 (512 bit) ParamSet A",
-+ NID_id_tc26_gost_3410_2012_512_paramSetA,9,&(lvalues[6417]),0},
-+{"id-tc26-gost-3410-2012-512-paramSetB",
-+ "GOST R 34.10-2012 (512 bit) ParamSet B",
-+ NID_id_tc26_gost_3410_2012_512_paramSetB,9,&(lvalues[6426]),0},
-+{"id-tc26-digest-constants","id-tc26-digest-constants",
-+ NID_id_tc26_digest_constants,7,&(lvalues[6435]),0},
-+{"id-tc26-cipher-constants","id-tc26-cipher-constants",
-+ NID_id_tc26_cipher_constants,7,&(lvalues[6442]),0},
-+{"id-tc26-gost-28147-constants","id-tc26-gost-28147-constants",
-+ NID_id_tc26_gost_28147_constants,8,&(lvalues[6449]),0},
-+{"id-tc26-gost-28147-param-Z","GOST 28147-89 TC26 parameter set",
-+ NID_id_tc26_gost_28147_param_Z,9,&(lvalues[6457]),0},
-+{"INN","INN",NID_INN,8,&(lvalues[6466]),0},
-+{"OGRN","OGRN",NID_OGRN,5,&(lvalues[6474]),0},
-+{"SNILS","SNILS",NID_SNILS,5,&(lvalues[6479]),0},
- };
-
- static const unsigned int sn_objs[NUM_SN]={
-@@ -2614,6 +2711,7 @@
- 35, /* "IDEA-CFB" */
- 36, /* "IDEA-ECB" */
- 46, /* "IDEA-OFB" */
-+988, /* "INN" */
- 181, /* "ISO" */
- 183, /* "ISO-US" */
- 645, /* "ITU-T" */
-@@ -2635,6 +2733,7 @@
- 17, /* "O" */
- 178, /* "OCSP" */
- 180, /* "OCSPSigning" */
-+989, /* "OGRN" */
- 379, /* "ORG" */
- 18, /* "OU" */
- 749, /* "Oakley-EC2N-3" */
-@@ -2700,6 +2799,7 @@
- 188, /* "SMIME" */
- 167, /* "SMIME-CAPS" */
- 100, /* "SN" */
-+990, /* "SNILS" */
- 16, /* "ST" */
- 143, /* "SXNetID" */
- 458, /* "UID" */
-@@ -2858,10 +2958,14 @@
- 156, /* "friendlyName" */
- 509, /* "generationQualifier" */
- 815, /* "gost-mac" */
-+960, /* "gost-mac-12" */
- 811, /* "gost2001" */
- 851, /* "gost2001cc" */
-+963, /* "gost2012_256" */
-+964, /* "gost2012_512" */
- 813, /* "gost89" */
- 814, /* "gost89-cnt" */
-+959, /* "gost89-cnt-12" */
- 812, /* "gost94" */
- 850, /* "gost94cc" */
- 797, /* "hmacWithMD5" */
-@@ -3115,6 +3219,30 @@
- 194, /* "id-smime-spq" */
- 250, /* "id-smime-spq-ets-sqt-unotice" */
- 249, /* "id-smime-spq-ets-sqt-uri" */
-+958, /* "id-tc26" */
-+975, /* "id-tc26-agreement" */
-+976, /* "id-tc26-agreement-gost-3410-2012-256" */
-+977, /* "id-tc26-agreement-gost-3410-2012-512" */
-+961, /* "id-tc26-algorithms" */
-+974, /* "id-tc26-cipher" */
-+985, /* "id-tc26-cipher-constants" */
-+978, /* "id-tc26-constants" */
-+965, /* "id-tc26-digest" */
-+984, /* "id-tc26-digest-constants" */
-+986, /* "id-tc26-gost-28147-constants" */
-+987, /* "id-tc26-gost-28147-param-Z" */
-+980, /* "id-tc26-gost-3410-2012-512-constants" */
-+982, /* "id-tc26-gost-3410-2012-512-paramSetA" */
-+983, /* "id-tc26-gost-3410-2012-512-paramSetB" */
-+981, /* "id-tc26-gost-3410-2012-512-paramSetTest" */
-+972, /* "id-tc26-hmac-gost-3411-2012-256" */
-+973, /* "id-tc26-hmac-gost-3411-2012-512" */
-+971, /* "id-tc26-mac" */
-+962, /* "id-tc26-sign" */
-+979, /* "id-tc26-sign-constants" */
-+968, /* "id-tc26-signwithdigest" */
-+969, /* "id-tc26-signwithdigest-gost3410-2012-256" */
-+970, /* "id-tc26-signwithdigest-gost3410-2012-512" */
- 676, /* "identified-organization" */
- 461, /* "info" */
- 748, /* "inhibitAnyPolicy" */
-@@ -3140,6 +3268,8 @@
- 460, /* "mail" */
- 493, /* "mailPreferenceOption" */
- 467, /* "manager" */
-+966, /* "md_gost12_256" */
-+967, /* "md_gost12_512" */
- 809, /* "md_gost94" */
- 875, /* "member" */
- 182, /* "member-body" */
-@@ -3497,12 +3627,22 @@
- 813, /* "GOST 28147-89" */
- 849, /* "GOST 28147-89 Cryptocom ParamSet" */
- 815, /* "GOST 28147-89 MAC" */
-+987, /* "GOST 28147-89 TC26 parameter set" */
- 851, /* "GOST 34.10-2001 Cryptocom" */
- 850, /* "GOST 34.10-94 Cryptocom" */
- 811, /* "GOST R 34.10-2001" */
- 817, /* "GOST R 34.10-2001 DH" */
-+982, /* "GOST R 34.10-2012 (512 bit) ParamSet A" */
-+983, /* "GOST R 34.10-2012 (512 bit) ParamSet B" */
-+981, /* "GOST R 34.10-2012 (512 bit) testing parameter set" */
-+963, /* "GOST R 34.10-2012 with 256 bit modulus" */
-+964, /* "GOST R 34.10-2012 with 512 bit modulus" */
-+969, /* "GOST R 34.10-2012 with GOST R 34.11-2012 (256 bit)" */
-+970, /* "GOST R 34.10-2012 with GOST R 34.11-2012 (512 bit)" */
- 812, /* "GOST R 34.10-94" */
- 818, /* "GOST R 34.10-94 DH" */
-+966, /* "GOST R 34.11-2012 with 256 bit hash" */
-+967, /* "GOST R 34.11-2012 with 512 bit hash" */
- 809, /* "GOST R 34.11-94" */
- 816, /* "GOST R 34.11-94 PRF" */
- 807, /* "GOST R 34.11-94 with GOST R 34.10-2001" */
-@@ -3510,12 +3650,15 @@
- 808, /* "GOST R 34.11-94 with GOST R 34.10-94" */
- 852, /* "GOST R 34.11-94 with GOST R 34.10-94 Cryptocom" */
- 854, /* "GOST R 3410-2001 Parameter Set Cryptocom" */
-+972, /* "HMAC GOST 34.11-2012 256 bit" */
-+973, /* "HMAC GOST 34.11-2012 512 bit" */
- 810, /* "HMAC GOST 34.11-94" */
- 432, /* "Hold Instruction Call Issuer" */
- 430, /* "Hold Instruction Code" */
- 431, /* "Hold Instruction None" */
- 433, /* "Hold Instruction Reject" */
- 634, /* "ICC or token signature" */
-+988, /* "INN" */
- 294, /* "IPSec End System" */
- 295, /* "IPSec Tunnel" */
- 296, /* "IPSec User" */
-@@ -3560,6 +3703,7 @@
- 366, /* "OCSP Nonce" */
- 371, /* "OCSP Service Locator" */
- 180, /* "OCSP Signing" */
-+989, /* "OGRN" */
- 161, /* "PBES2" */
- 69, /* "PBKDF2" */
- 162, /* "PBMAC1" */
-@@ -3573,6 +3717,7 @@
- 2, /* "RSA Data Security, Inc. PKCS" */
- 188, /* "S/MIME" */
- 167, /* "S/MIME Capabilities" */
-+990, /* "SNILS" */
- 387, /* "SNMPv2" */
- 512, /* "Secure Electronic Transactions" */
- 386, /* "Security" */
-@@ -3825,7 +3970,9 @@
- 509, /* "generationQualifier" */
- 601, /* "generic cryptogram" */
- 99, /* "givenName" */
-+960, /* "gost-mac-12" */
- 814, /* "gost89-cnt" */
-+959, /* "gost89-cnt-12" */
- 855, /* "hmac" */
- 780, /* "hmac-md5" */
- 781, /* "hmac-sha1" */
-@@ -4053,6 +4200,22 @@
- 194, /* "id-smime-spq" */
- 250, /* "id-smime-spq-ets-sqt-unotice" */
- 249, /* "id-smime-spq-ets-sqt-uri" */
-+958, /* "id-tc26" */
-+975, /* "id-tc26-agreement" */
-+976, /* "id-tc26-agreement-gost-3410-2012-256" */
-+977, /* "id-tc26-agreement-gost-3410-2012-512" */
-+961, /* "id-tc26-algorithms" */
-+974, /* "id-tc26-cipher" */
-+985, /* "id-tc26-cipher-constants" */
-+978, /* "id-tc26-constants" */
-+965, /* "id-tc26-digest" */
-+984, /* "id-tc26-digest-constants" */
-+986, /* "id-tc26-gost-28147-constants" */
-+980, /* "id-tc26-gost-3410-2012-512-constants" */
-+971, /* "id-tc26-mac" */
-+962, /* "id-tc26-sign" */
-+979, /* "id-tc26-sign-constants" */
-+968, /* "id-tc26-signwithdigest" */
- 34, /* "idea-cbc" */
- 35, /* "idea-cfb" */
- 36, /* "idea-ecb" */
-@@ -4661,6 +4824,9 @@
- 639, /* OBJ_set_brand_JCB 2 23 42 8 35 */
- 805, /* OBJ_cryptopro 1 2 643 2 2 */
- 806, /* OBJ_cryptocom 1 2 643 2 9 */
-+958, /* OBJ_id_tc26 1 2 643 7 1 */
-+989, /* OBJ_OGRN 1 2 643 100 1 */
-+990, /* OBJ_SNILS 1 2 643 100 3 */
- 184, /* OBJ_X9_57 1 2 840 10040 */
- 405, /* OBJ_ansi_X9_62 1 2 840 10045 */
- 389, /* OBJ_Enterprises 1 3 6 1 4 1 */
-@@ -4745,6 +4911,8 @@
- 816, /* OBJ_id_GostR3411_94_prf 1 2 643 2 2 23 */
- 817, /* OBJ_id_GostR3410_2001DH 1 2 643 2 2 98 */
- 818, /* OBJ_id_GostR3410_94DH 1 2 643 2 2 99 */
-+961, /* OBJ_id_tc26_algorithms 1 2 643 7 1 1 */
-+978, /* OBJ_id_tc26_constants 1 2 643 7 1 2 */
- 1, /* OBJ_rsadsi 1 2 840 113549 */
- 185, /* OBJ_X9cm 1 2 840 10040 4 */
- 127, /* OBJ_id_pkix 1 3 6 1 5 5 7 */
-@@ -4795,6 +4963,15 @@
- 842, /* OBJ_id_GostR3410_2001_CryptoPro_C_ParamSet 1 2 643 2 2 35 3 */
- 843, /* OBJ_id_GostR3410_2001_CryptoPro_XchA_ParamSet 1 2 643 2 2 36 0 */
- 844, /* OBJ_id_GostR3410_2001_CryptoPro_XchB_ParamSet 1 2 643 2 2 36 1 */
-+962, /* OBJ_id_tc26_sign 1 2 643 7 1 1 1 */
-+965, /* OBJ_id_tc26_digest 1 2 643 7 1 1 2 */
-+968, /* OBJ_id_tc26_signwithdigest 1 2 643 7 1 1 3 */
-+971, /* OBJ_id_tc26_mac 1 2 643 7 1 1 4 */
-+974, /* OBJ_id_tc26_cipher 1 2 643 7 1 1 5 */
-+975, /* OBJ_id_tc26_agreement 1 2 643 7 1 1 6 */
-+979, /* OBJ_id_tc26_sign_constants 1 2 643 7 1 2 1 */
-+984, /* OBJ_id_tc26_digest_constants 1 2 643 7 1 2 2 */
-+985, /* OBJ_id_tc26_cipher_constants 1 2 643 7 1 2 5 */
- 2, /* OBJ_pkcs 1 2 840 113549 1 */
- 431, /* OBJ_hold_instruction_none 1 2 840 10040 2 1 */
- 432, /* OBJ_hold_instruction_call_issuer 1 2 840 10040 2 2 */
-@@ -4846,6 +5023,19 @@
- 851, /* OBJ_id_GostR3410_2001_cc 1 2 643 2 9 1 5 4 */
- 849, /* OBJ_id_Gost28147_89_cc 1 2 643 2 9 1 6 1 */
- 854, /* OBJ_id_GostR3410_2001_ParamSet_cc 1 2 643 2 9 1 8 1 */
-+988, /* OBJ_INN 1 2 643 3 131 1 1 */
-+963, /* OBJ_id_GostR3410_2012_256 1 2 643 7 1 1 1 1 */
-+964, /* OBJ_id_GostR3410_2012_512 1 2 643 7 1 1 1 2 */
-+966, /* OBJ_id_GostR3411_2012_256 1 2 643 7 1 1 2 2 */
-+967, /* OBJ_id_GostR3411_2012_512 1 2 643 7 1 1 2 3 */
-+969, /* OBJ_id_tc26_signwithdigest_gost3410_2012_256 1 2 643 7 1 1 3 2 */
-+970, /* OBJ_id_tc26_signwithdigest_gost3410_2012_512 1 2 643 7 1 1 3 3 */
-+972, /* OBJ_id_tc26_hmac_gost_3411_2012_256 1 2 643 7 1 1 4 1 */
-+973, /* OBJ_id_tc26_hmac_gost_3411_2012_512 1 2 643 7 1 1 4 2 */
-+976, /* OBJ_id_tc26_agreement_gost_3410_2012_256 1 2 643 7 1 1 6 1 */
-+977, /* OBJ_id_tc26_agreement_gost_3410_2012_512 1 2 643 7 1 1 6 2 */
-+980, /* OBJ_id_tc26_gost_3410_2012_512_constants 1 2 643 7 1 2 1 2 */
-+986, /* OBJ_id_tc26_gost_28147_constants 1 2 643 7 1 2 5 1 */
- 186, /* OBJ_pkcs1 1 2 840 113549 1 1 */
- 27, /* OBJ_pkcs3 1 2 840 113549 1 3 */
- 187, /* OBJ_pkcs5 1 2 840 113549 1 5 */
-@@ -5013,6 +5203,10 @@
- 439, /* OBJ_pilotAttributeSyntax 0 9 2342 19200300 100 3 */
- 440, /* OBJ_pilotObjectClass 0 9 2342 19200300 100 4 */
- 441, /* OBJ_pilotGroups 0 9 2342 19200300 100 10 */
-+981, /* OBJ_id_tc26_gost_3410_2012_512_paramSetTest 1 2 643 7 1 2 1 2 0 */
-+982, /* OBJ_id_tc26_gost_3410_2012_512_paramSetA 1 2 643 7 1 2 1 2 1 */
-+983, /* OBJ_id_tc26_gost_3410_2012_512_paramSetB 1 2 643 7 1 2 1 2 2 */
-+987, /* OBJ_id_tc26_gost_28147_param_Z 1 2 643 7 1 2 5 1 1 */
- 108, /* OBJ_cast5_cbc 1 2 840 113533 7 66 10 */
- 112, /* OBJ_pbeWithMD5AndCast5_CBC 1 2 840 113533 7 66 12 */
- 782, /* OBJ_id_PasswordBasedMAC 1 2 840 113533 7 66 13 */
-diff -Nuar openssl-1.0.2d/crypto/objects/objects.txt openssl-work/crypto/objects/objects.txt
---- openssl-1.0.2d/crypto/objects/objects.txt 2015-07-09 15:57:15.000000000 +0400
-+++ openssl-work/crypto/objects/objects.txt 2015-02-25 12:45:41.000000000 +0400
-@@ -1156,6 +1156,7 @@
-
- member-body 643 2 2 : cryptopro
- member-body 643 2 9 : cryptocom
-+member-body 643 7 1 : id-tc26
-
- cryptopro 3 : id-GostR3411-94-with-GostR3410-2001 : GOST R 34.11-94 with GOST R 34.10-2001
- cryptopro 4 : id-GostR3411-94-with-GostR3410-94 : GOST R 34.11-94 with GOST R 34.10-94
-@@ -1169,8 +1170,10 @@
- !Cname id-Gost28147-89
- cryptopro 21 : gost89 : GOST 28147-89
- : gost89-cnt
-+ : gost89-cnt-12
- !Cname id-Gost28147-89-MAC
- cryptopro 22 : gost-mac : GOST 28147-89 MAC
-+ : gost-mac-12
- !Cname id-GostR3411-94-prf
- cryptopro 23 : prf-gostr3411-94 : GOST R 34.11-94 PRF
- cryptopro 98 : id-GostR3410-2001DH : GOST R 34.10-2001 DH
-@@ -1229,6 +1232,52 @@
-
- cryptocom 1 8 1 : id-GostR3410-2001-ParamSet-cc : GOST R 3410-2001 Parameter Set Cryptocom
-
-+# TC26 GOST OIDs
-+
-+id-tc26 1 : id-tc26-algorithms
-+id-tc26-algorithms 1 : id-tc26-sign
-+!Cname id-GostR3410-2012-256
-+id-tc26-sign 1 : gost2012_256: GOST R 34.10-2012 with 256 bit modulus
-+!Cname id-GostR3410-2012-512
-+id-tc26-sign 2 : gost2012_512: GOST R 34.10-2012 with 512 bit modulus
-+
-+id-tc26-algorithms 2 : id-tc26-digest
-+!Cname id-GostR3411-2012-256
-+id-tc26-digest 2 : md_gost12_256: GOST R 34.11-2012 with 256 bit hash
-+!Cname id-GostR3411-2012-512
-+id-tc26-digest 3 : md_gost12_512: GOST R 34.11-2012 with 512 bit hash
-+
-+id-tc26-algorithms 3 : id-tc26-signwithdigest
-+id-tc26-signwithdigest 2: id-tc26-signwithdigest-gost3410-2012-256: GOST R 34.10-2012 with GOST R 34.11-2012 (256 bit)
-+id-tc26-signwithdigest 3: id-tc26-signwithdigest-gost3410-2012-512: GOST R 34.10-2012 with GOST R 34.11-2012 (512 bit)
-+
-+id-tc26-algorithms 4 : id-tc26-mac
-+id-tc26-mac 1 : id-tc26-hmac-gost-3411-2012-256 : HMAC GOST 34.11-2012 256 bit
-+id-tc26-mac 2 : id-tc26-hmac-gost-3411-2012-512 : HMAC GOST 34.11-2012 512 bit
-+
-+id-tc26-algorithms 5 : id-tc26-cipher
-+
-+id-tc26-algorithms 6 : id-tc26-agreement
-+id-tc26-agreement 1 : id-tc26-agreement-gost-3410-2012-256
-+id-tc26-agreement 2 : id-tc26-agreement-gost-3410-2012-512
-+
-+id-tc26 2 : id-tc26-constants
-+
-+id-tc26-constants 1 : id-tc26-sign-constants
-+id-tc26-sign-constants 2: id-tc26-gost-3410-2012-512-constants
-+id-tc26-gost-3410-2012-512-constants 0 : id-tc26-gost-3410-2012-512-paramSetTest: GOST R 34.10-2012 (512 bit) testing parameter set
-+id-tc26-gost-3410-2012-512-constants 1 : id-tc26-gost-3410-2012-512-paramSetA: GOST R 34.10-2012 (512 bit) ParamSet A
-+id-tc26-gost-3410-2012-512-constants 2 : id-tc26-gost-3410-2012-512-paramSetB: GOST R 34.10-2012 (512 bit) ParamSet B
-+
-+id-tc26-constants 2 : id-tc26-digest-constants
-+id-tc26-constants 5 : id-tc26-cipher-constants
-+id-tc26-cipher-constants 1 : id-tc26-gost-28147-constants
-+id-tc26-gost-28147-constants 1 : id-tc26-gost-28147-param-Z : GOST 28147-89 TC26 parameter set
-+
-+member-body 643 3 131 1 1 : INN : INN
-+member-body 643 100 1 : OGRN : OGRN
-+member-body 643 100 3 : SNILS : SNILS
-+
- # Definitions for Camellia cipher - CBC MODE
-
- 1 2 392 200011 61 1 1 1 2 : CAMELLIA-128-CBC : camellia-128-cbc
-diff -Nuar openssl-1.0.2d/crypto/objects/obj_mac.h openssl-work/crypto/objects/obj_mac.h
---- openssl-1.0.2d/crypto/objects/obj_mac.h 2015-07-09 15:58:04.000000000 +0400
-+++ openssl-work/crypto/objects/obj_mac.h 2015-03-26 13:00:22.000000000 +0400
-@@ -3678,6 +3678,10 @@
- #define NID_cryptocom 806
- #define OBJ_cryptocom OBJ_member_body,643L,2L,9L
-
-+#define SN_id_tc26 "id-tc26"
-+#define NID_id_tc26 958
-+#define OBJ_id_tc26 OBJ_member_body,643L,7L,1L
-+
- #define SN_id_GostR3411_94_with_GostR3410_2001 "id-GostR3411-94-with-GostR3410-2001"
- #define LN_id_GostR3411_94_with_GostR3410_2001 "GOST R 34.11-94 with GOST R 34.10-2001"
- #define NID_id_GostR3411_94_with_GostR3410_2001 807
-@@ -3716,11 +3720,17 @@
- #define SN_gost89_cnt "gost89-cnt"
- #define NID_gost89_cnt 814
-
-+#define SN_gost89_cnt_12 "gost89-cnt-12"
-+#define NID_gost89_cnt_12 959
-+
- #define SN_id_Gost28147_89_MAC "gost-mac"
- #define LN_id_Gost28147_89_MAC "GOST 28147-89 MAC"
- #define NID_id_Gost28147_89_MAC 815
- #define OBJ_id_Gost28147_89_MAC OBJ_cryptopro,22L
-
-+#define SN_gost_mac_12 "gost-mac-12"
-+#define NID_gost_mac_12 960
-+
- #define SN_id_GostR3411_94_prf "prf-gostr3411-94"
- #define LN_id_GostR3411_94_prf "GOST R 34.11-94 PRF"
- #define NID_id_GostR3411_94_prf 816
-@@ -3886,6 +3896,141 @@
- #define NID_id_GostR3410_2001_ParamSet_cc 854
- #define OBJ_id_GostR3410_2001_ParamSet_cc OBJ_cryptocom,1L,8L,1L
-
-+#define SN_id_tc26_algorithms "id-tc26-algorithms"
-+#define NID_id_tc26_algorithms 961
-+#define OBJ_id_tc26_algorithms OBJ_id_tc26,1L
-+
-+#define SN_id_tc26_sign "id-tc26-sign"
-+#define NID_id_tc26_sign 962
-+#define OBJ_id_tc26_sign OBJ_id_tc26_algorithms,1L
-+
-+#define SN_id_GostR3410_2012_256 "gost2012_256"
-+#define LN_id_GostR3410_2012_256 "GOST R 34.10-2012 with 256 bit modulus"
-+#define NID_id_GostR3410_2012_256 963
-+#define OBJ_id_GostR3410_2012_256 OBJ_id_tc26_sign,1L
-+
-+#define SN_id_GostR3410_2012_512 "gost2012_512"
-+#define LN_id_GostR3410_2012_512 "GOST R 34.10-2012 with 512 bit modulus"
-+#define NID_id_GostR3410_2012_512 964
-+#define OBJ_id_GostR3410_2012_512 OBJ_id_tc26_sign,2L
-+
-+#define SN_id_tc26_digest "id-tc26-digest"
-+#define NID_id_tc26_digest 965
-+#define OBJ_id_tc26_digest OBJ_id_tc26_algorithms,2L
-+
-+#define SN_id_GostR3411_2012_256 "md_gost12_256"
-+#define LN_id_GostR3411_2012_256 "GOST R 34.11-2012 with 256 bit hash"
-+#define NID_id_GostR3411_2012_256 966
-+#define OBJ_id_GostR3411_2012_256 OBJ_id_tc26_digest,2L
-+
-+#define SN_id_GostR3411_2012_512 "md_gost12_512"
-+#define LN_id_GostR3411_2012_512 "GOST R 34.11-2012 with 512 bit hash"
-+#define NID_id_GostR3411_2012_512 967
-+#define OBJ_id_GostR3411_2012_512 OBJ_id_tc26_digest,3L
-+
-+#define SN_id_tc26_signwithdigest "id-tc26-signwithdigest"
-+#define NID_id_tc26_signwithdigest 968
-+#define OBJ_id_tc26_signwithdigest OBJ_id_tc26_algorithms,3L
-+
-+#define SN_id_tc26_signwithdigest_gost3410_2012_256 "id-tc26-signwithdigest-gost3410-2012-256"
-+#define LN_id_tc26_signwithdigest_gost3410_2012_256 "GOST R 34.10-2012 with GOST R 34.11-2012 (256 bit)"
-+#define NID_id_tc26_signwithdigest_gost3410_2012_256 969
-+#define OBJ_id_tc26_signwithdigest_gost3410_2012_256 OBJ_id_tc26_signwithdigest,2L
-+
-+#define SN_id_tc26_signwithdigest_gost3410_2012_512 "id-tc26-signwithdigest-gost3410-2012-512"
-+#define LN_id_tc26_signwithdigest_gost3410_2012_512 "GOST R 34.10-2012 with GOST R 34.11-2012 (512 bit)"
-+#define NID_id_tc26_signwithdigest_gost3410_2012_512 970
-+#define OBJ_id_tc26_signwithdigest_gost3410_2012_512 OBJ_id_tc26_signwithdigest,3L
-+
-+#define SN_id_tc26_mac "id-tc26-mac"
-+#define NID_id_tc26_mac 971
-+#define OBJ_id_tc26_mac OBJ_id_tc26_algorithms,4L
-+
-+#define SN_id_tc26_hmac_gost_3411_2012_256 "id-tc26-hmac-gost-3411-2012-256"
-+#define LN_id_tc26_hmac_gost_3411_2012_256 "HMAC GOST 34.11-2012 256 bit"
-+#define NID_id_tc26_hmac_gost_3411_2012_256 972
-+#define OBJ_id_tc26_hmac_gost_3411_2012_256 OBJ_id_tc26_mac,1L
-+
-+#define SN_id_tc26_hmac_gost_3411_2012_512 "id-tc26-hmac-gost-3411-2012-512"
-+#define LN_id_tc26_hmac_gost_3411_2012_512 "HMAC GOST 34.11-2012 512 bit"
-+#define NID_id_tc26_hmac_gost_3411_2012_512 973
-+#define OBJ_id_tc26_hmac_gost_3411_2012_512 OBJ_id_tc26_mac,2L
-+
-+#define SN_id_tc26_cipher "id-tc26-cipher"
-+#define NID_id_tc26_cipher 974
-+#define OBJ_id_tc26_cipher OBJ_id_tc26_algorithms,5L
-+
-+#define SN_id_tc26_agreement "id-tc26-agreement"
-+#define NID_id_tc26_agreement 975
-+#define OBJ_id_tc26_agreement OBJ_id_tc26_algorithms,6L
-+
-+#define SN_id_tc26_agreement_gost_3410_2012_256 "id-tc26-agreement-gost-3410-2012-256"
-+#define NID_id_tc26_agreement_gost_3410_2012_256 976
-+#define OBJ_id_tc26_agreement_gost_3410_2012_256 OBJ_id_tc26_agreement,1L
-+
-+#define SN_id_tc26_agreement_gost_3410_2012_512 "id-tc26-agreement-gost-3410-2012-512"
-+#define NID_id_tc26_agreement_gost_3410_2012_512 977
-+#define OBJ_id_tc26_agreement_gost_3410_2012_512 OBJ_id_tc26_agreement,2L
-+
-+#define SN_id_tc26_constants "id-tc26-constants"
-+#define NID_id_tc26_constants 978
-+#define OBJ_id_tc26_constants OBJ_id_tc26,2L
-+
-+#define SN_id_tc26_sign_constants "id-tc26-sign-constants"
-+#define NID_id_tc26_sign_constants 979
-+#define OBJ_id_tc26_sign_constants OBJ_id_tc26_constants,1L
-+
-+#define SN_id_tc26_gost_3410_2012_512_constants "id-tc26-gost-3410-2012-512-constants"
-+#define NID_id_tc26_gost_3410_2012_512_constants 980
-+#define OBJ_id_tc26_gost_3410_2012_512_constants OBJ_id_tc26_sign_constants,2L
-+
-+#define SN_id_tc26_gost_3410_2012_512_paramSetTest "id-tc26-gost-3410-2012-512-paramSetTest"
-+#define LN_id_tc26_gost_3410_2012_512_paramSetTest "GOST R 34.10-2012 (512 bit) testing parameter set"
-+#define NID_id_tc26_gost_3410_2012_512_paramSetTest 981
-+#define OBJ_id_tc26_gost_3410_2012_512_paramSetTest OBJ_id_tc26_gost_3410_2012_512_constants,0L
-+
-+#define SN_id_tc26_gost_3410_2012_512_paramSetA "id-tc26-gost-3410-2012-512-paramSetA"
-+#define LN_id_tc26_gost_3410_2012_512_paramSetA "GOST R 34.10-2012 (512 bit) ParamSet A"
-+#define NID_id_tc26_gost_3410_2012_512_paramSetA 982
-+#define OBJ_id_tc26_gost_3410_2012_512_paramSetA OBJ_id_tc26_gost_3410_2012_512_constants,1L
-+
-+#define SN_id_tc26_gost_3410_2012_512_paramSetB "id-tc26-gost-3410-2012-512-paramSetB"
-+#define LN_id_tc26_gost_3410_2012_512_paramSetB "GOST R 34.10-2012 (512 bit) ParamSet B"
-+#define NID_id_tc26_gost_3410_2012_512_paramSetB 983
-+#define OBJ_id_tc26_gost_3410_2012_512_paramSetB OBJ_id_tc26_gost_3410_2012_512_constants,2L
-+
-+#define SN_id_tc26_digest_constants "id-tc26-digest-constants"
-+#define NID_id_tc26_digest_constants 984
-+#define OBJ_id_tc26_digest_constants OBJ_id_tc26_constants,2L
-+
-+#define SN_id_tc26_cipher_constants "id-tc26-cipher-constants"
-+#define NID_id_tc26_cipher_constants 985
-+#define OBJ_id_tc26_cipher_constants OBJ_id_tc26_constants,5L
-+
-+#define SN_id_tc26_gost_28147_constants "id-tc26-gost-28147-constants"
-+#define NID_id_tc26_gost_28147_constants 986
-+#define OBJ_id_tc26_gost_28147_constants OBJ_id_tc26_cipher_constants,1L
-+
-+#define SN_id_tc26_gost_28147_param_Z "id-tc26-gost-28147-param-Z"
-+#define LN_id_tc26_gost_28147_param_Z "GOST 28147-89 TC26 parameter set"
-+#define NID_id_tc26_gost_28147_param_Z 987
-+#define OBJ_id_tc26_gost_28147_param_Z OBJ_id_tc26_gost_28147_constants,1L
-+
-+#define SN_INN "INN"
-+#define LN_INN "INN"
-+#define NID_INN 988
-+#define OBJ_INN OBJ_member_body,643L,3L,131L,1L,1L
-+
-+#define SN_OGRN "OGRN"
-+#define LN_OGRN "OGRN"
-+#define NID_OGRN 989
-+#define OBJ_OGRN OBJ_member_body,643L,100L,1L
-+
-+#define SN_SNILS "SNILS"
-+#define LN_SNILS "SNILS"
-+#define NID_SNILS 990
-+#define OBJ_SNILS OBJ_member_body,643L,100L,3L
-+
- #define SN_camellia_128_cbc "CAMELLIA-128-CBC"
- #define LN_camellia_128_cbc "camellia-128-cbc"
- #define NID_camellia_128_cbc 751
-diff -Nuar openssl-1.0.2d/crypto/objects/obj_mac.num openssl-work/crypto/objects/obj_mac.num
---- openssl-1.0.2d/crypto/objects/obj_mac.num 2015-07-09 15:58:03.000000000 +0400
-+++ openssl-work/crypto/objects/obj_mac.num 2015-02-25 12:49:43.000000000 +0400
-@@ -955,3 +955,36 @@
- jurisdictionLocalityName 955
- jurisdictionStateOrProvinceName 956
- jurisdictionCountryName 957
-+id_tc26 958
-+gost89_cnt_12 959
-+gost_mac_12 960
-+id_tc26_algorithms 961
-+id_tc26_sign 962
-+id_GostR3410_2012_256 963
-+id_GostR3410_2012_512 964
-+id_tc26_digest 965
-+id_GostR3411_2012_256 966
-+id_GostR3411_2012_512 967
-+id_tc26_signwithdigest 968
-+id_tc26_signwithdigest_gost3410_2012_256 969
-+id_tc26_signwithdigest_gost3410_2012_512 970
-+id_tc26_mac 971
-+id_tc26_hmac_gost_3411_2012_256 972
-+id_tc26_hmac_gost_3411_2012_512 973
-+id_tc26_cipher 974
-+id_tc26_agreement 975
-+id_tc26_agreement_gost_3410_2012_256 976
-+id_tc26_agreement_gost_3410_2012_512 977
-+id_tc26_constants 978
-+id_tc26_sign_constants 979
-+id_tc26_gost_3410_2012_512_constants 980
-+id_tc26_gost_3410_2012_512_paramSetTest 981
-+id_tc26_gost_3410_2012_512_paramSetA 982
-+id_tc26_gost_3410_2012_512_paramSetB 983
-+id_tc26_digest_constants 984
-+id_tc26_cipher_constants 985
-+id_tc26_gost_28147_constants 986
-+id_tc26_gost_28147_param_Z 987
-+INN 988
-+OGRN 989
-+SNILS 990
-diff -Nuar openssl-1.0.2d/crypto/objects/obj_xref.h openssl-work/crypto/objects/obj_xref.h
---- openssl-1.0.2d/crypto/objects/obj_xref.h 2015-07-09 16:02:55.000000000 +0400
-+++ openssl-work/crypto/objects/obj_xref.h 2015-03-26 13:00:21.000000000 +0400
-@@ -56,6 +56,10 @@
- NID_dh_cofactor_kdf},
- {NID_dhSinglePass_cofactorDH_sha512kdf_scheme, NID_sha512,
- NID_dh_cofactor_kdf},
-+ {NID_id_tc26_signwithdigest_gost3410_2012_256, NID_id_GostR3411_2012_256,
-+ NID_id_GostR3410_2012_256},
-+ {NID_id_tc26_signwithdigest_gost3410_2012_512, NID_id_GostR3411_2012_512,
-+ NID_id_GostR3410_2012_512},
- };
-
- static const nid_triple *const sigoid_srt_xref[] = {
-@@ -96,4 +100,6 @@
- &sigoid_srt[26],
- &sigoid_srt[27],
- &sigoid_srt[28],
-+ &sigoid_srt[40],
-+ &sigoid_srt[41],
- };
-diff -Nuar openssl-1.0.2d/crypto/objects/obj_xref.txt openssl-work/crypto/objects/obj_xref.txt
---- openssl-1.0.2d/crypto/objects/obj_xref.txt 2015-07-09 15:57:15.000000000 +0400
-+++ openssl-work/crypto/objects/obj_xref.txt 2015-02-24 15:22:17.000000000 +0400
-@@ -44,6 +44,8 @@
- id_GostR3411_94_with_GostR3410_94 id_GostR3411_94 id_GostR3410_94
- id_GostR3411_94_with_GostR3410_94_cc id_GostR3411_94 id_GostR3410_94_cc
- id_GostR3411_94_with_GostR3410_2001_cc id_GostR3411_94 id_GostR3410_2001_cc
-+id_tc26_signwithdigest_gost3410_2012_256 id_GostR3411_2012_256 id_GostR3410_2012_256
-+id_tc26_signwithdigest_gost3410_2012_512 id_GostR3411_2012_512 id_GostR3410_2012_512
- # ECDH KDFs and their corresponding message digests and schemes
- dhSinglePass_stdDH_sha1kdf_scheme sha1 dh_std_kdf
- dhSinglePass_stdDH_sha224kdf_scheme sha224 dh_std_kdf
-
diff --git a/patches/1.0.2/pkcs12.diff b/patches/1.0.2/pkcs12.diff
deleted file mode 100644
index f6267ba..0000000
--- a/patches/1.0.2/pkcs12.diff
+++ /dev/null
@@ -1,78 +0,0 @@
-diff -Nuar openssl-1.0.2d/crypto/evp/evp_pbe.c openssl-work/crypto/evp/evp_pbe.c
---- openssl-1.0.2d/crypto/evp/evp_pbe.c 2015-07-09 15:53:21.000000000 +0400
-+++ openssl-work/crypto/evp/evp_pbe.c 2015-03-26 13:00:21.000000000 +0400
-@@ -121,6 +121,10 @@
- {EVP_PBE_TYPE_PRF, NID_hmacWithSHA384, -1, NID_sha384, 0},
- {EVP_PBE_TYPE_PRF, NID_hmacWithSHA512, -1, NID_sha512, 0},
- {EVP_PBE_TYPE_PRF, NID_id_HMACGostR3411_94, -1, NID_id_GostR3411_94, 0},
-+ {EVP_PBE_TYPE_PRF, NID_id_tc26_hmac_gost_3411_2012_256, -1,
-+ NID_id_GostR3411_2012_256, 0},
-+ {EVP_PBE_TYPE_PRF, NID_id_tc26_hmac_gost_3411_2012_512, -1,
-+ NID_id_GostR3411_2012_512, 0},
- };
-
- #ifdef TEST
-diff -Nuar openssl-1.0.2d/crypto/pkcs12/p12_mutl.c openssl-work/crypto/pkcs12/p12_mutl.c
---- openssl-1.0.2d/crypto/pkcs12/p12_mutl.c 2015-07-09 15:53:21.000000000 +0400
-+++ openssl-work/crypto/pkcs12/p12_mutl.c 2015-06-17 14:48:18.000000000 +0400
-@@ -65,6 +65,28 @@
- # include <openssl/rand.h>
- # include <openssl/pkcs12.h>
-
-+# define TK26_MAC_KEY_LEN 32
-+
-+static int PKCS12_gen_gost_mac_key(const char *pass, int passlen,
-+ const unsigned char *salt, int saltlen,
-+ int iter, const EVP_MD *digest, int keylen,
-+ unsigned char *key)
-+{
-+ unsigned char out[96];
-+
-+ if (keylen != TK26_MAC_KEY_LEN) {
-+ return 0;
-+ }
-+
-+ if (!PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter,
-+ digest, 96, out)) {
-+ return 0;
-+ }
-+ memcpy(key, out + 64, TK26_MAC_KEY_LEN);
-+ OPENSSL_cleanse(out, 96);
-+ return 1;
-+}
-+
- /* Generate a MAC */
- int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen,
- unsigned char *mac, unsigned int *maclen)
-@@ -73,7 +95,7 @@
- HMAC_CTX hmac;
- unsigned char key[EVP_MAX_MD_SIZE], *salt;
- int saltlen, iter;
-- int md_size;
-+ int md_size = 0;
-
- if (!PKCS7_type_is_data(p12->authsafes)) {
- PKCS12err(PKCS12_F_PKCS12_GEN_MAC, PKCS12_R_CONTENT_TYPE_NOT_DATA);
-@@ -93,8 +115,19 @@
- md_size = EVP_MD_size(md_type);
- if (md_size < 0)
- return 0;
-- if (!PKCS12_key_gen(pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter,
-- md_size, key, md_type)) {
-+ if ((md_type->type == NID_id_GostR3411_94
-+ || md_type->type == NID_id_GostR3411_2012_256
-+ || md_type->type == NID_id_GostR3411_2012_512)
-+ && !getenv("LEGACY_GOST_PKCS12")) {
-+ md_size = TK26_MAC_KEY_LEN;
-+ if (!PKCS12_gen_gost_mac_key(pass, passlen, salt, saltlen, iter,
-+ md_type, md_size, key)) {
-+ PKCS12err(PKCS12_F_PKCS12_GEN_MAC, PKCS12_R_KEY_GEN_ERROR);
-+ return 0;
-+ }
-+ } else
-+ if (!PKCS12_key_gen(pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter,
-+ md_size, key, md_type)) {
- PKCS12err(PKCS12_F_PKCS12_GEN_MAC, PKCS12_R_KEY_GEN_ERROR);
- return 0;
- }
-
diff --git a/patches/1.0.2/smimecap.diff b/patches/1.0.2/smimecap.diff
deleted file mode 100644
index 2451b51..0000000
--- a/patches/1.0.2/smimecap.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Nuar openssl-1.0.2d/crypto/cms/cms_sd.c openssl-work/crypto/cms/cms_sd.c
---- openssl-1.0.2d/crypto/cms/cms_sd.c 2015-07-09 15:57:15.000000000 +0400
-+++ openssl-work/crypto/cms/cms_sd.c 2015-03-26 13:00:20.000000000 +0400
-@@ -941,6 +941,8 @@
- int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap)
- {
- if (!cms_add_cipher_smcap(smcap, NID_aes_256_cbc, -1)
-+ || !cms_add_digest_smcap(smcap, NID_id_GostR3411_2012_256, -1)
-+ || !cms_add_digest_smcap(smcap, NID_id_GostR3411_2012_512, -1)
- || !cms_add_digest_smcap(smcap, NID_id_GostR3411_94, -1)
- || !cms_add_cipher_smcap(smcap, NID_id_Gost28147_89, -1)
- || !cms_add_cipher_smcap(smcap, NID_aes_192_cbc, -1)
-diff -Nuar openssl-1.0.2d/crypto/pkcs7/pk7_smime.c openssl-work/crypto/pkcs7/pk7_smime.c
---- openssl-1.0.2d/crypto/pkcs7/pk7_smime.c 2015-07-09 15:53:21.000000000 +0400
-+++ openssl-work/crypto/pkcs7/pk7_smime.c 2015-03-26 13:00:21.000000000 +0400
-@@ -185,6 +185,8 @@
- goto err;
- }
- if (!add_cipher_smcap(smcap, NID_aes_256_cbc, -1)
-+ || !add_digest_smcap(smcap, NID_id_GostR3411_2012_256, -1)
-+ || !add_digest_smcap(smcap, NID_id_GostR3411_2012_512, -1)
- || !add_digest_smcap(smcap, NID_id_GostR3411_94, -1)
- || !add_cipher_smcap(smcap, NID_id_Gost28147_89, -1)
- || !add_cipher_smcap(smcap, NID_aes_192_cbc, -1)
-
diff --git a/patches/1.1.1/6438.diff b/patches/1.1.1/6438.diff
new file mode 100644
index 0000000..e32b5bc
--- /dev/null
+++ b/patches/1.1.1/6438.diff
@@ -0,0 +1,409 @@
+diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h
+index 60c3826799d..6d66d07fc13 100644
+--- a/crypto/objects/obj_dat.h
++++ b/crypto/objects/obj_dat.h
+@@ -10,7 +10,7 @@
+ */
+
+ /* Serialized OID's */
+-static const unsigned char so[7626] = {
++static const unsigned char so[7746] = {
+ 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 0] OBJ_rsadsi */
+ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 6] OBJ_pkcs */
+ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 13] OBJ_md2 */
+@@ -1060,9 +1060,23 @@ static const unsigned char so[7626] = {
+ 0x2B,0x6F, /* [ 7610] OBJ_ieee */
+ 0x2B,0x6F,0x02,0x8C,0x53, /* [ 7612] OBJ_ieee_siswg */
+ 0x2A,0x81,0x1C,0xCF,0x55,0x01,0x82,0x2D, /* [ 7617] OBJ_sm2 */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x05,0x01, /* [ 7625] OBJ_id_tc26_cipher_gostr3412_2015_magma */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x05,0x01,0x01, /* [ 7633] OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x05,0x01,0x02, /* [ 7642] OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x05,0x02, /* [ 7651] OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x05,0x02,0x01, /* [ 7659] OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x05,0x02,0x02, /* [ 7668] OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x07, /* [ 7677] OBJ_id_tc26_wrap */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x07,0x01, /* [ 7684] OBJ_id_tc26_wrap_gostr3412_2015_magma */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x07,0x01,0x01, /* [ 7692] OBJ_id_tc26_wrap_gostr3412_2015_magma_kexp15 */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x07,0x02, /* [ 7701] OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik */
++ 0x2A,0x85,0x03,0x07,0x01,0x01,0x07,0x01,0x01, /* [ 7709] OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 */
++ 0x2A,0x85,0x03,0x07,0x01,0x02,0x01,0x01,0x02, /* [ 7718] OBJ_id_tc26_gost_3410_2012_256_paramSetB */
++ 0x2A,0x85,0x03,0x07,0x01,0x02,0x01,0x01,0x03, /* [ 7727] OBJ_id_tc26_gost_3410_2012_256_paramSetC */
++ 0x2A,0x85,0x03,0x07,0x01,0x02,0x01,0x01,0x04, /* [ 7736] OBJ_id_tc26_gost_3410_2012_256_paramSetD */
+ };
+
+-#define NUM_NID 1173
++#define NUM_NID 1193
+ static const ASN1_OBJECT nid_objs[NUM_NID] = {
+ {"UNDEF", "undefined", NID_undef},
+ {"rsadsi", "RSA Data Security, Inc.", NID_rsadsi, 6, &so[0]},
+@@ -2237,9 +2251,29 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = {
+ {"ieee", "ieee", NID_ieee, 2, &so[7610]},
+ {"ieee-siswg", "IEEE Security in Storage Working Group", NID_ieee_siswg, 5, &so[7612]},
+ {"SM2", "sm2", NID_sm2, 8, &so[7617]},
++ {"id-tc26-cipher-gostr3412-2015-magma", "id-tc26-cipher-gostr3412-2015-magma", NID_id_tc26_cipher_gostr3412_2015_magma, 8, &so[7625]},
++ {"id-tc26-cipher-gostr3412-2015-magma-ctracpkm", "id-tc26-cipher-gostr3412-2015-magma-ctracpkm", NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm, 9, &so[7633]},
++ {"id-tc26-cipher-gostr3412-2015-magma-ctracpkm-omac", "id-tc26-cipher-gostr3412-2015-magma-ctracpkm-omac", NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac, 9, &so[7642]},
++ {"id-tc26-cipher-gostr3412-2015-kuznyechik", "id-tc26-cipher-gostr3412-2015-kuznyechik", NID_id_tc26_cipher_gostr3412_2015_kuznyechik, 8, &so[7651]},
++ {"id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm", "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm", NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm, 9, &so[7659]},
++ {"id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm-omac", "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm-omac", NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac, 9, &so[7668]},
++ {"id-tc26-wrap", "id-tc26-wrap", NID_id_tc26_wrap, 7, &so[7677]},
++ {"id-tc26-wrap-gostr3412-2015-magma", "id-tc26-wrap-gostr3412-2015-magma", NID_id_tc26_wrap_gostr3412_2015_magma, 8, &so[7684]},
++ {"id-tc26-wrap-gostr3412-2015-magma-kexp15", "id-tc26-wrap-gostr3412-2015-magma-kexp15", NID_id_tc26_wrap_gostr3412_2015_magma_kexp15, 9, &so[7692]},
++ {"id-tc26-wrap-gostr3412-2015-kuznyechik", "id-tc26-wrap-gostr3412-2015-kuznyechik", NID_id_tc26_wrap_gostr3412_2015_kuznyechik, 8, &so[7701]},
++ {"id-tc26-wrap-gostr3412-2015-kuznyechik-kexp15", "id-tc26-wrap-gostr3412-2015-kuznyechik-kexp15", NID_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15, 9, &so[7709]},
++ {"id-tc26-gost-3410-2012-256-paramSetB", "GOST R 34.10-2012 (256 bit) ParamSet B", NID_id_tc26_gost_3410_2012_256_paramSetB, 9, &so[7718]},
++ {"id-tc26-gost-3410-2012-256-paramSetC", "GOST R 34.10-2012 (256 bit) ParamSet C", NID_id_tc26_gost_3410_2012_256_paramSetC, 9, &so[7727]},
++ {"id-tc26-gost-3410-2012-256-paramSetD", "GOST R 34.10-2012 (256 bit) ParamSet D", NID_id_tc26_gost_3410_2012_256_paramSetD, 9, &so[7736]},
++ {"magma-ecb", "magma-ecb", NID_magma_ecb},
++ {"magma-ctr", "magma-ctr", NID_magma_ctr},
++ {"magma-ofb", "magma-ofb", NID_magma_ofb},
++ {"magma-cbc", "magma-cbc", NID_magma_cbc},
++ {"magma-cfb", "magma-cfb", NID_magma_cfb},
++ {"magma-mac", "magma-mac", NID_magma_mac},
+ };
+
+-#define NUM_SN 1164
++#define NUM_SN 1184
+ static const unsigned int sn_objs[NUM_SN] = {
+ 364, /* "AD_DVCS" */
+ 419, /* "AES-128-CBC" */
+@@ -2999,6 +3033,12 @@ static const unsigned int sn_objs[NUM_SN] = {
+ 977, /* "id-tc26-algorithms" */
+ 990, /* "id-tc26-cipher" */
+ 1001, /* "id-tc26-cipher-constants" */
++ 1176, /* "id-tc26-cipher-gostr3412-2015-kuznyechik" */
++ 1177, /* "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm" */
++ 1178, /* "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm-omac" */
++ 1173, /* "id-tc26-cipher-gostr3412-2015-magma" */
++ 1174, /* "id-tc26-cipher-gostr3412-2015-magma-ctracpkm" */
++ 1175, /* "id-tc26-cipher-gostr3412-2015-magma-ctracpkm-omac" */
+ 994, /* "id-tc26-constants" */
+ 981, /* "id-tc26-digest" */
+ 1000, /* "id-tc26-digest-constants" */
+@@ -3006,6 +3046,9 @@ static const unsigned int sn_objs[NUM_SN] = {
+ 1003, /* "id-tc26-gost-28147-param-Z" */
+ 1147, /* "id-tc26-gost-3410-2012-256-constants" */
+ 1148, /* "id-tc26-gost-3410-2012-256-paramSetA" */
++ 1184, /* "id-tc26-gost-3410-2012-256-paramSetB" */
++ 1185, /* "id-tc26-gost-3410-2012-256-paramSetC" */
++ 1186, /* "id-tc26-gost-3410-2012-256-paramSetD" */
+ 996, /* "id-tc26-gost-3410-2012-512-constants" */
+ 998, /* "id-tc26-gost-3410-2012-512-paramSetA" */
+ 999, /* "id-tc26-gost-3410-2012-512-paramSetB" */
+@@ -3019,6 +3062,11 @@ static const unsigned int sn_objs[NUM_SN] = {
+ 984, /* "id-tc26-signwithdigest" */
+ 985, /* "id-tc26-signwithdigest-gost3410-2012-256" */
+ 986, /* "id-tc26-signwithdigest-gost3410-2012-512" */
++ 1179, /* "id-tc26-wrap" */
++ 1182, /* "id-tc26-wrap-gostr3412-2015-kuznyechik" */
++ 1183, /* "id-tc26-wrap-gostr3412-2015-kuznyechik-kexp15" */
++ 1180, /* "id-tc26-wrap-gostr3412-2015-magma" */
++ 1181, /* "id-tc26-wrap-gostr3412-2015-magma-kexp15" */
+ 676, /* "identified-organization" */
+ 1170, /* "ieee" */
+ 1171, /* "ieee-siswg" */
+@@ -3045,6 +3093,12 @@ static const unsigned int sn_objs[NUM_SN] = {
+ 476, /* "lastModifiedTime" */
+ 157, /* "localKeyID" */
+ 480, /* "mXRecord" */
++ 1190, /* "magma-cbc" */
++ 1191, /* "magma-cfb" */
++ 1188, /* "magma-ctr" */
++ 1187, /* "magma-ecb" */
++ 1192, /* "magma-mac" */
++ 1189, /* "magma-ofb" */
+ 460, /* "mail" */
+ 493, /* "mailPreferenceOption" */
+ 467, /* "manager" */
+@@ -3407,7 +3461,7 @@ static const unsigned int sn_objs[NUM_SN] = {
+ 1093, /* "x509ExtAdmission" */
+ };
+
+-#define NUM_LN 1164
++#define NUM_LN 1184
+ static const unsigned int ln_objs[NUM_LN] = {
+ 363, /* "AD Time Stamping" */
+ 405, /* "ANSI X9.62" */
+@@ -3464,6 +3518,9 @@ static const unsigned int ln_objs[NUM_LN] = {
+ 811, /* "GOST R 34.10-2001" */
+ 817, /* "GOST R 34.10-2001 DH" */
+ 1148, /* "GOST R 34.10-2012 (256 bit) ParamSet A" */
++ 1184, /* "GOST R 34.10-2012 (256 bit) ParamSet B" */
++ 1185, /* "GOST R 34.10-2012 (256 bit) ParamSet C" */
++ 1186, /* "GOST R 34.10-2012 (256 bit) ParamSet D" */
+ 998, /* "GOST R 34.10-2012 (512 bit) ParamSet A" */
+ 999, /* "GOST R 34.10-2012 (512 bit) ParamSet B" */
+ 1149, /* "GOST R 34.10-2012 (512 bit) ParamSet C" */
+@@ -4154,6 +4211,12 @@ static const unsigned int ln_objs[NUM_LN] = {
+ 977, /* "id-tc26-algorithms" */
+ 990, /* "id-tc26-cipher" */
+ 1001, /* "id-tc26-cipher-constants" */
++ 1176, /* "id-tc26-cipher-gostr3412-2015-kuznyechik" */
++ 1177, /* "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm" */
++ 1178, /* "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm-omac" */
++ 1173, /* "id-tc26-cipher-gostr3412-2015-magma" */
++ 1174, /* "id-tc26-cipher-gostr3412-2015-magma-ctracpkm" */
++ 1175, /* "id-tc26-cipher-gostr3412-2015-magma-ctracpkm-omac" */
+ 994, /* "id-tc26-constants" */
+ 981, /* "id-tc26-digest" */
+ 1000, /* "id-tc26-digest-constants" */
+@@ -4164,6 +4227,11 @@ static const unsigned int ln_objs[NUM_LN] = {
+ 978, /* "id-tc26-sign" */
+ 995, /* "id-tc26-sign-constants" */
+ 984, /* "id-tc26-signwithdigest" */
++ 1179, /* "id-tc26-wrap" */
++ 1182, /* "id-tc26-wrap-gostr3412-2015-kuznyechik" */
++ 1183, /* "id-tc26-wrap-gostr3412-2015-kuznyechik-kexp15" */
++ 1180, /* "id-tc26-wrap-gostr3412-2015-magma" */
++ 1181, /* "id-tc26-wrap-gostr3412-2015-magma-kexp15" */
+ 34, /* "idea-cbc" */
+ 35, /* "idea-cfb" */
+ 36, /* "idea-ecb" */
+@@ -4201,6 +4269,12 @@ static const unsigned int ln_objs[NUM_LN] = {
+ 157, /* "localKeyID" */
+ 15, /* "localityName" */
+ 480, /* "mXRecord" */
++ 1190, /* "magma-cbc" */
++ 1191, /* "magma-cfb" */
++ 1188, /* "magma-ctr" */
++ 1187, /* "magma-ecb" */
++ 1192, /* "magma-mac" */
++ 1189, /* "magma-ofb" */
+ 493, /* "mailPreferenceOption" */
+ 467, /* "manager" */
+ 3, /* "md2" */
+@@ -4575,7 +4649,7 @@ static const unsigned int ln_objs[NUM_LN] = {
+ 125, /* "zlib compression" */
+ };
+
+-#define NUM_OBJ 1055
++#define NUM_OBJ 1069
+ static const unsigned int obj_objs[NUM_OBJ] = {
+ 0, /* OBJ_undef 0 */
+ 181, /* OBJ_iso 1 */
+@@ -4975,6 +5049,7 @@ static const unsigned int obj_objs[NUM_OBJ] = {
+ 987, /* OBJ_id_tc26_mac 1 2 643 7 1 1 4 */
+ 990, /* OBJ_id_tc26_cipher 1 2 643 7 1 1 5 */
+ 991, /* OBJ_id_tc26_agreement 1 2 643 7 1 1 6 */
++ 1179, /* OBJ_id_tc26_wrap 1 2 643 7 1 1 7 */
+ 995, /* OBJ_id_tc26_sign_constants 1 2 643 7 1 2 1 */
+ 1000, /* OBJ_id_tc26_digest_constants 1 2 643 7 1 2 2 */
+ 1001, /* OBJ_id_tc26_cipher_constants 1 2 643 7 1 2 5 */
+@@ -5063,8 +5138,12 @@ static const unsigned int obj_objs[NUM_OBJ] = {
+ 986, /* OBJ_id_tc26_signwithdigest_gost3410_2012_512 1 2 643 7 1 1 3 3 */
+ 988, /* OBJ_id_tc26_hmac_gost_3411_2012_256 1 2 643 7 1 1 4 1 */
+ 989, /* OBJ_id_tc26_hmac_gost_3411_2012_512 1 2 643 7 1 1 4 2 */
++ 1173, /* OBJ_id_tc26_cipher_gostr3412_2015_magma 1 2 643 7 1 1 5 1 */
++ 1176, /* OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik 1 2 643 7 1 1 5 2 */
+ 992, /* OBJ_id_tc26_agreement_gost_3410_2012_256 1 2 643 7 1 1 6 1 */
+ 993, /* OBJ_id_tc26_agreement_gost_3410_2012_512 1 2 643 7 1 1 6 2 */
++ 1180, /* OBJ_id_tc26_wrap_gostr3412_2015_magma 1 2 643 7 1 1 7 1 */
++ 1182, /* OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik 1 2 643 7 1 1 7 2 */
+ 1147, /* OBJ_id_tc26_gost_3410_2012_256_constants 1 2 643 7 1 2 1 1 */
+ 996, /* OBJ_id_tc26_gost_3410_2012_512_constants 1 2 643 7 1 2 1 2 */
+ 1002, /* OBJ_id_tc26_gost_28147_constants 1 2 643 7 1 2 5 1 */
+@@ -5270,7 +5349,16 @@ static const unsigned int obj_objs[NUM_OBJ] = {
+ 1120, /* OBJ_aria_128_ccm 1 2 410 200046 1 1 37 */
+ 1121, /* OBJ_aria_192_ccm 1 2 410 200046 1 1 38 */
+ 1122, /* OBJ_aria_256_ccm 1 2 410 200046 1 1 39 */
++ 1174, /* OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm 1 2 643 7 1 1 5 1 1 */
++ 1175, /* OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac 1 2 643 7 1 1 5 1 2 */
++ 1177, /* OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm 1 2 643 7 1 1 5 2 1 */
++ 1178, /* OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac 1 2 643 7 1 1 5 2 2 */
++ 1181, /* OBJ_id_tc26_wrap_gostr3412_2015_magma_kexp15 1 2 643 7 1 1 7 1 1 */
++ 1183, /* OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 1 2 643 7 1 1 7 1 1 */
+ 1148, /* OBJ_id_tc26_gost_3410_2012_256_paramSetA 1 2 643 7 1 2 1 1 1 */
++ 1184, /* OBJ_id_tc26_gost_3410_2012_256_paramSetB 1 2 643 7 1 2 1 1 2 */
++ 1185, /* OBJ_id_tc26_gost_3410_2012_256_paramSetC 1 2 643 7 1 2 1 1 3 */
++ 1186, /* OBJ_id_tc26_gost_3410_2012_256_paramSetD 1 2 643 7 1 2 1 1 4 */
+ 997, /* OBJ_id_tc26_gost_3410_2012_512_paramSetTest 1 2 643 7 1 2 1 2 0 */
+ 998, /* OBJ_id_tc26_gost_3410_2012_512_paramSetA 1 2 643 7 1 2 1 2 1 */
+ 999, /* OBJ_id_tc26_gost_3410_2012_512_paramSetB 1 2 643 7 1 2 1 2 2 */
+diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num
+index ca8fdfba48c..57caf3c06dc 100644
+--- a/crypto/objects/obj_mac.num
++++ b/crypto/objects/obj_mac.num
+@@ -1170,3 +1170,23 @@ uacurve9 1169
+ ieee 1170
+ ieee_siswg 1171
+ sm2 1172
++id_tc26_cipher_gostr3412_2015_magma 1173
++id_tc26_cipher_gostr3412_2015_magma_ctracpkm 1174
++id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac 1175
++id_tc26_cipher_gostr3412_2015_kuznyechik 1176
++id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm 1177
++id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac 1178
++id_tc26_wrap 1179
++id_tc26_wrap_gostr3412_2015_magma 1180
++id_tc26_wrap_gostr3412_2015_magma_kexp15 1181
++id_tc26_wrap_gostr3412_2015_kuznyechik 1182
++id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 1183
++id_tc26_gost_3410_2012_256_paramSetB 1184
++id_tc26_gost_3410_2012_256_paramSetC 1185
++id_tc26_gost_3410_2012_256_paramSetD 1186
++magma_ecb 1187
++magma_ctr 1188
++magma_ofb 1189
++magma_cbc 1190
++magma_cfb 1191
++magma_mac 1192
+diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt
+index e565864a487..d4d1daa5185 100644
+--- a/crypto/objects/objects.txt
++++ b/crypto/objects/objects.txt
+@@ -1339,16 +1339,31 @@ id-tc26-mac 1 : id-tc26-hmac-gost-3411-2012-256 : HMAC GOST 34.11-2012 256 bit
+ id-tc26-mac 2 : id-tc26-hmac-gost-3411-2012-512 : HMAC GOST 34.11-2012 512 bit
+
+ id-tc26-algorithms 5 : id-tc26-cipher
++id-tc26-cipher 1 : id-tc26-cipher-gostr3412-2015-magma
++id-tc26-cipher-gostr3412-2015-magma 1 : id-tc26-cipher-gostr3412-2015-magma-ctracpkm
++id-tc26-cipher-gostr3412-2015-magma 2 : id-tc26-cipher-gostr3412-2015-magma-ctracpkm-omac
++id-tc26-cipher 2 : id-tc26-cipher-gostr3412-2015-kuznyechik
++id-tc26-cipher-gostr3412-2015-kuznyechik 1 : id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm
++id-tc26-cipher-gostr3412-2015-kuznyechik 2 : id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm-omac
+
+ id-tc26-algorithms 6 : id-tc26-agreement
+ id-tc26-agreement 1 : id-tc26-agreement-gost-3410-2012-256
+ id-tc26-agreement 2 : id-tc26-agreement-gost-3410-2012-512
+
++id-tc26-algorithms 7 : id-tc26-wrap
++id-tc26-wrap 1 : id-tc26-wrap-gostr3412-2015-magma
++id-tc26-wrap-gostr3412-2015-magma 1 : id-tc26-wrap-gostr3412-2015-magma-kexp15
++id-tc26-wrap 2 : id-tc26-wrap-gostr3412-2015-kuznyechik
++id-tc26-wrap-gostr3412-2015-magma 1 : id-tc26-wrap-gostr3412-2015-kuznyechik-kexp15
++
+ id-tc26 2 : id-tc26-constants
+
+ id-tc26-constants 1 : id-tc26-sign-constants
+ id-tc26-sign-constants 1: id-tc26-gost-3410-2012-256-constants
+ id-tc26-gost-3410-2012-256-constants 1 : id-tc26-gost-3410-2012-256-paramSetA: GOST R 34.10-2012 (256 bit) ParamSet A
++id-tc26-gost-3410-2012-256-constants 2 : id-tc26-gost-3410-2012-256-paramSetB: GOST R 34.10-2012 (256 bit) ParamSet B
++id-tc26-gost-3410-2012-256-constants 3 : id-tc26-gost-3410-2012-256-paramSetC: GOST R 34.10-2012 (256 bit) ParamSet C
++id-tc26-gost-3410-2012-256-constants 4 : id-tc26-gost-3410-2012-256-paramSetD: GOST R 34.10-2012 (256 bit) ParamSet D
+ id-tc26-sign-constants 2: id-tc26-gost-3410-2012-512-constants
+ id-tc26-gost-3410-2012-512-constants 0 : id-tc26-gost-3410-2012-512-paramSetTest: GOST R 34.10-2012 (512 bit) testing parameter set
+ id-tc26-gost-3410-2012-512-constants 1 : id-tc26-gost-3410-2012-512-paramSetA: GOST R 34.10-2012 (512 bit) ParamSet A
+@@ -1374,6 +1389,14 @@ member-body 643 100 112 : issuerSignTool : Signing Tool of Issuer
+ : grasshopper-cfb
+ : grasshopper-mac
+
++#GOST R34.13-2015 Magma
++ : magma-ecb
++ : magma-ctr
++ : magma-ofb
++ : magma-cbc
++ : magma-cfb
++ : magma-mac
++
+ # Definitions for Camellia cipher - CBC MODE
+
+ 1 2 392 200011 61 1 1 1 2 : CAMELLIA-128-CBC : camellia-128-cbc
+diff --git a/include/openssl/obj_mac.h b/include/openssl/obj_mac.h
+index 2078dc49955..e95e369a0cc 100644
+--- a/include/openssl/obj_mac.h
++++ b/include/openssl/obj_mac.h
+@@ -4218,6 +4218,30 @@
+ #define NID_id_tc26_cipher 990
+ #define OBJ_id_tc26_cipher OBJ_id_tc26_algorithms,5L
+
++#define SN_id_tc26_cipher_gostr3412_2015_magma "id-tc26-cipher-gostr3412-2015-magma"
++#define NID_id_tc26_cipher_gostr3412_2015_magma 1173
++#define OBJ_id_tc26_cipher_gostr3412_2015_magma OBJ_id_tc26_cipher,1L
++
++#define SN_id_tc26_cipher_gostr3412_2015_magma_ctracpkm "id-tc26-cipher-gostr3412-2015-magma-ctracpkm"
++#define NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm 1174
++#define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm OBJ_id_tc26_cipher_gostr3412_2015_magma,1L
++
++#define SN_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac "id-tc26-cipher-gostr3412-2015-magma-ctracpkm-omac"
++#define NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac 1175
++#define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac OBJ_id_tc26_cipher_gostr3412_2015_magma,2L
++
++#define SN_id_tc26_cipher_gostr3412_2015_kuznyechik "id-tc26-cipher-gostr3412-2015-kuznyechik"
++#define NID_id_tc26_cipher_gostr3412_2015_kuznyechik 1176
++#define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik OBJ_id_tc26_cipher,2L
++
++#define SN_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm"
++#define NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm 1177
++#define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,1L
++
++#define SN_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm-omac"
++#define NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac 1178
++#define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,2L
++
+ #define SN_id_tc26_agreement "id-tc26-agreement"
+ #define NID_id_tc26_agreement 991
+ #define OBJ_id_tc26_agreement OBJ_id_tc26_algorithms,6L
+@@ -4230,6 +4254,26 @@
+ #define NID_id_tc26_agreement_gost_3410_2012_512 993
+ #define OBJ_id_tc26_agreement_gost_3410_2012_512 OBJ_id_tc26_agreement,2L
+
++#define SN_id_tc26_wrap "id-tc26-wrap"
++#define NID_id_tc26_wrap 1179
++#define OBJ_id_tc26_wrap OBJ_id_tc26_algorithms,7L
++
++#define SN_id_tc26_wrap_gostr3412_2015_magma "id-tc26-wrap-gostr3412-2015-magma"
++#define NID_id_tc26_wrap_gostr3412_2015_magma 1180
++#define OBJ_id_tc26_wrap_gostr3412_2015_magma OBJ_id_tc26_wrap,1L
++
++#define SN_id_tc26_wrap_gostr3412_2015_magma_kexp15 "id-tc26-wrap-gostr3412-2015-magma-kexp15"
++#define NID_id_tc26_wrap_gostr3412_2015_magma_kexp15 1181
++#define OBJ_id_tc26_wrap_gostr3412_2015_magma_kexp15 OBJ_id_tc26_wrap_gostr3412_2015_magma,1L
++
++#define SN_id_tc26_wrap_gostr3412_2015_kuznyechik "id-tc26-wrap-gostr3412-2015-kuznyechik"
++#define NID_id_tc26_wrap_gostr3412_2015_kuznyechik 1182
++#define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik OBJ_id_tc26_wrap,2L
++
++#define SN_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 "id-tc26-wrap-gostr3412-2015-kuznyechik-kexp15"
++#define NID_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 1183
++#define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 OBJ_id_tc26_wrap_gostr3412_2015_magma,1L
++
+ #define SN_id_tc26_constants "id-tc26-constants"
+ #define NID_id_tc26_constants 994
+ #define OBJ_id_tc26_constants OBJ_id_tc26,2L
+@@ -4247,6 +4291,21 @@
+ #define NID_id_tc26_gost_3410_2012_256_paramSetA 1148
+ #define OBJ_id_tc26_gost_3410_2012_256_paramSetA OBJ_id_tc26_gost_3410_2012_256_constants,1L
+
++#define SN_id_tc26_gost_3410_2012_256_paramSetB "id-tc26-gost-3410-2012-256-paramSetB"
++#define LN_id_tc26_gost_3410_2012_256_paramSetB "GOST R 34.10-2012 (256 bit) ParamSet B"
++#define NID_id_tc26_gost_3410_2012_256_paramSetB 1184
++#define OBJ_id_tc26_gost_3410_2012_256_paramSetB OBJ_id_tc26_gost_3410_2012_256_constants,2L
++
++#define SN_id_tc26_gost_3410_2012_256_paramSetC "id-tc26-gost-3410-2012-256-paramSetC"
++#define LN_id_tc26_gost_3410_2012_256_paramSetC "GOST R 34.10-2012 (256 bit) ParamSet C"
++#define NID_id_tc26_gost_3410_2012_256_paramSetC 1185
++#define OBJ_id_tc26_gost_3410_2012_256_paramSetC OBJ_id_tc26_gost_3410_2012_256_constants,3L
++
++#define SN_id_tc26_gost_3410_2012_256_paramSetD "id-tc26-gost-3410-2012-256-paramSetD"
++#define LN_id_tc26_gost_3410_2012_256_paramSetD "GOST R 34.10-2012 (256 bit) ParamSet D"
++#define NID_id_tc26_gost_3410_2012_256_paramSetD 1186
++#define OBJ_id_tc26_gost_3410_2012_256_paramSetD OBJ_id_tc26_gost_3410_2012_256_constants,4L
++
+ #define SN_id_tc26_gost_3410_2012_512_constants "id-tc26-gost-3410-2012-512-constants"
+ #define NID_id_tc26_gost_3410_2012_512_constants 996
+ #define OBJ_id_tc26_gost_3410_2012_512_constants OBJ_id_tc26_sign_constants,2L
+@@ -4331,6 +4390,24 @@
+ #define SN_grasshopper_mac "grasshopper-mac"
+ #define NID_grasshopper_mac 1017
+
++#define SN_magma_ecb "magma-ecb"
++#define NID_magma_ecb 1187
++
++#define SN_magma_ctr "magma-ctr"
++#define NID_magma_ctr 1188
++
++#define SN_magma_ofb "magma-ofb"
++#define NID_magma_ofb 1189
++
++#define SN_magma_cbc "magma-cbc"
++#define NID_magma_cbc 1190
++
++#define SN_magma_cfb "magma-cfb"
++#define NID_magma_cfb 1191
++
++#define SN_magma_mac "magma-mac"
++#define NID_magma_mac 1192
++
+ #define SN_camellia_128_cbc "CAMELLIA-128-CBC"
+ #define LN_camellia_128_cbc "camellia-128-cbc"
+ #define NID_camellia_128_cbc 751