1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
load_lib vomstest.exp
testheader "See if all attributes can be retrieved by a voms proxy."
proc mytest {} {
_activateCert mycert2
_vomsStart voms1
set res [log_exec outname {voms-proxy-init --voms voms1:all}]
_vomsStop voms1
if $res then {
addlog $outname
testmessage "voms-proxy-init failed."
return $::FAILTEST
}
set res [log_exec outname {voms-proxy-info --all}]
if $res then {
addlog $outname
testmessage "voms-proxy-info failed."
return $::FAILTEST
} else {
#match against known (correct) output
set correct "subject : /C=IT/CN=001/CN=proxy
issuer : /C=IT/CN=001
identity : /C=IT/CN=001
type : proxy
strength : 2048 bits
path : /tmp/x509up_u\[0-9\]*
timeleft : \[0-9\]*:\[0-9\]*:\[0-9\]*
key usage : Digital Signature, Key Encipherment
=== VO voms1 extension information ===
VO : voms1
subject : /C=IT/CN=001
issuer : /C=IT/CN=003
attribute : /voms1
attribute : /voms1/group1
attribute : /voms1/group1/Role=TestRole
attribute : shortid = mycert2-r \\\(/voms1/group1/Role=TestRole\\\)
attribute : shortid = mycert2-g \\\(/voms1/group1\\\)
attribute : shortid = mycert2 \\\(voms1\\\)
timeleft : \[0-9\]*:\[0-9\]*:\[0-9\]*"
loadvar out2 $outname
if [regexp $correct $out2] then {
testmessage "proxy successfully created."
return $::PASSTEST
} else {
logvar correct
addlog $outname
testmessage "Unexpected output in voms-proxy-info"
return $::FAILTEST
}
}
}
do_test
|