From: Dmitry Belyavskiy Date: Sun, 10 May 2020 14:44:03 +0000 (+0300) Subject: Reenable some hmac tests X-Git-Tag: v3.0.0~120 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=69040682b1d04049668bb63712458f28a5c448d4;p=openssl-gost%2Fengine.git Reenable some hmac tests --- diff --git a/tcl_tests/mac.try b/tcl_tests/mac.try index 8a17e4a..0e5be42 100644 --- a/tcl_tests/mac.try +++ b/tcl_tests/mac.try @@ -14,21 +14,21 @@ test -createsfiles {dgst.dat dgst0.dat dgst2.dat dgst8.dat dgst63.dat mac-grassh } 0 "" #FIXME OpenSSL regression -#test "Вычисление HMAC(md_gost12_512)" { -# grep "md_gost12_512\\(" [openssl "dgst -md_gost12_512 -mac hmac -macopt key:123456901234567890123456789012 dgst63.dat"] -#} 0 "HMAC-md_gost12_512(dgst63.dat)= 3767bcbe31de0965a6cd2613d99cc8cda922e7b288478389ed9bd433abfc08ff61d9bd0257b2d14dd0648d04ebf056180b3c8739a7cd7f8a78dac856359fe26f\n" -# -#test "Вычисление двух HMAC(md_gost12_512)" { -# grep "md_gost12_512\\(" [openssl "dgst -md_gost12_512 -mac hmac -macopt key:123456901234567890123456789012 dgst63.dat dgst63.dat"] -#} 0 "HMAC-md_gost12_512(dgst63.dat)= 3767bcbe31de0965a6cd2613d99cc8cda922e7b288478389ed9bd433abfc08ff61d9bd0257b2d14dd0648d04ebf056180b3c8739a7cd7f8a78dac856359fe26f\nHMAC-md_gost12_512(dgst63.dat)= 3767bcbe31de0965a6cd2613d99cc8cda922e7b288478389ed9bd433abfc08ff61d9bd0257b2d14dd0648d04ebf056180b3c8739a7cd7f8a78dac856359fe26f\n" -# -#test "Вычисление HMAC(md_gost94)" { -# grep "md_gost94\\(" [openssl "dgst -md_gost94 -mac hmac -macopt key:123456901234567890123456789012 dgst.dat"] -#} 0 "HMAC-md_gost94(dgst.dat)= 25434aa4b59b9749d3716ac188762b6c92b47d552aeb556f74b9c357b2b7c8c6\n" -# -#test "Вычисление двух HMAC(md_gost94)" { -# grep "md_gost94\\(" [openssl "dgst -md_gost94 -mac hmac -macopt key:123456901234567890123456789012 dgst.dat dgst.dat"] -#} 0 "HMAC-md_gost94(dgst.dat)= 25434aa4b59b9749d3716ac188762b6c92b47d552aeb556f74b9c357b2b7c8c6\nHMAC-md_gost94(dgst.dat)= 25434aa4b59b9749d3716ac188762b6c92b47d552aeb556f74b9c357b2b7c8c6\n" +test "Вычисление HMAC(md_gost12_512)" { + grep "md_gost12_512\\(" [openssl "dgst -md_gost12_512 -hmac 123456901234567890123456789012 dgst63.dat"] +} 0 "HMAC-md_gost12_512(dgst63.dat)= 3767bcbe31de0965a6cd2613d99cc8cda922e7b288478389ed9bd433abfc08ff61d9bd0257b2d14dd0648d04ebf056180b3c8739a7cd7f8a78dac856359fe26f\n" + +test "Вычисление двух HMAC(md_gost12_512)" { + grep "md_gost12_512\\(" [openssl "dgst -md_gost12_512 -hmac 123456901234567890123456789012 dgst63.dat dgst63.dat"] +} 0 "HMAC-md_gost12_512(dgst63.dat)= 3767bcbe31de0965a6cd2613d99cc8cda922e7b288478389ed9bd433abfc08ff61d9bd0257b2d14dd0648d04ebf056180b3c8739a7cd7f8a78dac856359fe26f\nHMAC-md_gost12_512(dgst63.dat)= 3767bcbe31de0965a6cd2613d99cc8cda922e7b288478389ed9bd433abfc08ff61d9bd0257b2d14dd0648d04ebf056180b3c8739a7cd7f8a78dac856359fe26f\n" + +test "Вычисление HMAC(md_gost94)" { + grep "md_gost94\\(" [openssl "dgst -md_gost94 -hmac 123456901234567890123456789012 dgst.dat"] +} 0 "HMAC-md_gost94(dgst.dat)= 25434aa4b59b9749d3716ac188762b6c92b47d552aeb556f74b9c357b2b7c8c6\n" + +test "Вычисление двух HMAC(md_gost94)" { + grep "md_gost94\\(" [openssl "dgst -md_gost94 -hmac 123456901234567890123456789012 dgst.dat dgst.dat"] +} 0 "HMAC-md_gost94(dgst.dat)= 25434aa4b59b9749d3716ac188762b6c92b47d552aeb556f74b9c357b2b7c8c6\nHMAC-md_gost94(dgst.dat)= 25434aa4b59b9749d3716ac188762b6c92b47d552aeb556f74b9c357b2b7c8c6\n" test "Попытка вычислить MAC с ключом неправильной длины" { grep gost-mac [openssl "dgst -mac gost-mac -macopt key:123456789012345678901234567890 dgst.dat"]