]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Fixed runtime initalization of NID in the GOST-MAC-12 pkey method.
authorVictor Wagner <wagner@atlas-kard.ru>
Fri, 18 Sep 2015 12:24:14 +0000 (15:24 +0300)
committerVictor Wagner <wagner@atlas-kard.ru>
Fri, 18 Sep 2015 12:24:14 +0000 (15:24 +0300)
gost_eng.c
test/00-engine.t
test/02-mac.t

index aee09145dbeffa89eda869064eadae9f112f8571..3debd1830fa8415999324faafd55f4582e41309a 100644 (file)
@@ -122,6 +122,7 @@ static int bind_gost(ENGINE *e, const char *id)
        gost_digest_nids[4]=NID_gost_mac_12;
        gost_pkey_meth_nids[2]=NID_gost2012_256;
        gost_pkey_meth_nids[3]=NID_gost2012_512;
+       gost_pkey_meth_nids[4]=NID_gost_mac_12;
        /* EVP_CIPHERs */
        cipher_gost_cbc.nid = NID_gost89_cbc;
        cipher_gost_cpcnt_12.nid = NID_gost89_cnt_12;
index 9fe06a56104d37bcfe907dd8816f105f988f8726..35b5f929b61bd592b8d4bfaa06c5296c71597b47 100644 (file)
@@ -38,7 +38,7 @@ if ( -f $engine . ".info") {
 
 $engine_info= <<EOINF;
 (gost) Reference implementation of GOST engine
- [gost89, gost89-cnt, gost89-cnt-12, gost89-cbc, md_gost94, gost-mac, md_gost12_256, md_gost12_512, gost-mac-12, gost2001, gost-mac, gost2012_256, gost2012_512, UNDEF]
+ [gost89, gost89-cnt, gost89-cnt-12, gost89-cbc, md_gost94, gost-mac, md_gost12_256, md_gost12_512, gost-mac-12, gost2001, gost-mac, gost2012_256, gost2012_512, gost-mac-12]
 EOINF
 }
 
index b11bf7be02270d99448932ef15f06b2c496111b3..ddf848066f94c5ec4b860dde9a0c3c52b002216e 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl 
-use Test::More tests => 10;
+use Test::More tests => 11;
 use Cwd 'abs_path';
 
 # prepare data for 
@@ -37,5 +37,9 @@ is(`openssl dgst -engine ${engine} -mac gost-mac -macopt key:${key} testbig.dat`
 "GOST-MAC-gost-mac(testbig.dat)= d3978b1a\n",
 "GOST MAC - big data");
 
+is(`openssl dgst -engine ${engine} -mac gost-mac-12 -macopt key:${key} testdata.dat`,
+"GOST-MAC-12-gost-mac-12(testdata.dat)= be4453ec\n",
+"GOST MAC - parameters 2012");
+
 unlink('testdata.dat');
 unlink('testbig.dat');