From f2c9d4f0395c44757658133737efe25a6825b7cb Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Wed, 20 Jan 2021 19:15:34 +0100 Subject: [PATCH] Fixed tests to match the current messages --- tcl_tests/req-genpkey.try | 8 ++++---- tcl_tests/req-newkey.try | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tcl_tests/req-genpkey.try b/tcl_tests/req-genpkey.try index a368ced..e8b9c41 100644 --- a/tcl_tests/req-genpkey.try +++ b/tcl_tests/req-genpkey.try @@ -34,13 +34,13 @@ test -skip {![file exists $username/seckey.pem]} "OID в секретном кл test -skip {![file exists $username/seckey.pem]} "Алгоритм $alg, заявка по секретному ключу" { makeFile $username/req.conf [makeConf] - openssl "req -new -config $username/req.conf -key $username/seckey.pem -out $username/req.pem" + openssl "req -new -config $username/req.conf -key $username/seckey.pem -out $username/req.pem" expr {[file size $username/req.pem] > 0} } 0 1 test -skip {![file exists $username/req.pem]} "Подпись под заявкой корректна" { grep "verif" [openssl "req -verify -in $username/req.pem"] -} 0 {verify OK +} 0 {Certificate request self-signature verify OK } test -skip {![file exists $username/req.pem]} "OID в заявке, алгоритм $alg" { @@ -48,7 +48,7 @@ test -skip {![file exists $username/req.pem]} "OID в заявке, алгори } 0 [mkObjList [alg_long_name $alg] [pubkey_long_name $alg] [param_hash_long_name [param_hash $alg]] [hash_with_sign_long_name $alg]] test -skip {![file exists $username/seckey.pem]} "Алгоритм $alg, сертификат по секретному ключу" { - openssl "req -new -x509 -config $username/req.conf -key $username/seckey.pem -out $username/cert.pem" + openssl "req -new -x509 -config $username/req.conf -key $username/seckey.pem -out $username/cert.pem" expr {[file size $username/cert.pem] > 0} } 0 1 @@ -73,7 +73,7 @@ test -skip {![file exists $username/seckey.der]} -createsfiles $username/req2.pe test -skip {![file exists $username/req2.pem]} "Подпись под заявкой корректна" { grep "verif" [openssl "req -verify -in $username/req2.pem"] -} 0 {verify OK +} 0 {Certificate request self-signature verify OK } } diff --git a/tcl_tests/req-newkey.try b/tcl_tests/req-newkey.try index 7664a36..634e0df 100644 --- a/tcl_tests/req-newkey.try +++ b/tcl_tests/req-newkey.try @@ -1,7 +1,7 @@ #!/usr/bin/tclsh if {[info exists env(PKG_PATH)]} { lappend auto_path $env(PKG_PATH) -} else { +} else { lappend auto_path [file dirname [info script]] } package require ossltest @@ -65,7 +65,7 @@ gost2012_512:RSAencryption: "Недопустимое имя объекта" 1 i "no_param_set" { set result $no_param_set } "invalid_paramset" { set result $invalid_paramset } } - + set index [string first ":" $alg] if {$index != -1} { set algname [string range $alg 0 [expr $index-1]] @@ -90,11 +90,11 @@ gost2012_512:RSAencryption: "Недопустимое имя объекта" 1 i asn::asnGetSequence seq2 seq3 asn::asnGetObjectIdentifier seq3 oid join $oid . - } $code $result + } $code $result log "errorInfo: $errorInfo" test -skip {![file exists test.req]} "Заявка подписана корректно" { grep "verif" [openssl "req -verify -in test.req"] - } 0 "verify OK\n" + } 0 "Certificate request self-signature verify OK\n" } end_tests -- 2.39.5