Banny_Lau_10257
Jun 20, 2005Nimbostratus
Variable Passing between Events
Hi !
I am sorry that I am a Newbie for iRule and Tcl command. Could anyone help me the following:
Why can't it pass the value of $clsub from Event CLIENTSSL_CLIENTCERT to event HTTP_REQUEST. How to solve it and what way can I use for solution?
when CLIENT_ACCEPTED {
set needcert 0;
set gotcert 0;
set crt "";
set clcert "";
}
when CLIENTSSL_CLIENTCERT {
log LOCAL0.warn "cert count=[SSL::cert count] result= SSL::verify_result]";
if { [SSL::cert count] != 0 or [SSL::verify_result] == 0 } {
log LOCAL0.warn "Good cert! ($needcert)"
set gotcert 1
set crt "[SSL::cert 0]"
set clsub "[X509::subject $crt]"
Subject is obtained successfully shown on log.
log LOCAL0. "$clsub"
if { $needcert == 1 } {
HTTP::release
}
} else {
log LOCAL0.warn "Bad cert!"
if { $needcert == 1 } {
reject
}
}
}
when HTTP_REQUEST {
log LOCAL0. "HTTP-RQ"
I found $clsub is null on log.
log LOCAL0. "$clsub"
snatpool customer1_snatpool
}