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" {
} 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
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
}
}
#!/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
"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]]
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