Forum Discussion

Chris_Scales_10's avatar
Chris_Scales_10
Icon for Nimbostratus rankNimbostratus
May 23, 2006

irule works on 9.1.0 but not 9.1.1

Hello,

 

I have an irule that is supposed to verify a client ssl cert connection. When the rule is run on our LTM running 9.1.0, it works fine; if I apply the same rule to the LTM running 9.1.1 it fails. I'm new to F5 and support has pointed me here to look for a solution.

 

here's the irule:

 

when RULE_INIT {

 

set ::key [AES::key 128]

 

log local0. "the key is: $::key"

 

}

 

 

when CLIENTSSL_CLIENTCERT {

 

session add ssl [SSL::sessionid] [X509::verify_cert_error_string [SSL::verify_result]] 180

 

session add ssl [SSL::sessionid] [SSL::cert 0] 180

 

}

 

 

when HTTP_REQUEST {

 

if {! [HTTP::cookie exists ClientZ]} {

 

set id [SSL::sessionid]

 

set cert [session lookup ssl $id]

 

if { $cert ne "" } {

 

log "cert is: $cert"

 

session delete ssl $id

 

} else {

 

log "no cert, no connection!"

 

reject

 

return

 

}

 

set z [b64encode [AES::encrypt $::key $cert]]

 

} else {

 

set cert [AES::decrypt $::key [b64decode [HTTP::cookie ClientZ]]]

 

}

 

HTTP::header insert ClientCert [b64encode $cert]

 

log "Inserting HTTP header ClientCert: $cert"

 

}

 

 

when HTTP_RESPONSE {

 

if { [info exists z ]} {

 

log "in http response Z is: $z"

 

HTTP::header insert "Set-Cookie ClientZ=$z"

 

}

 

}

 

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    It looks like it's possible that your variable "z" isn't getting re-set. Is it trying to insert the cookie twice? Is the "z" variable getting logged as double length?

     

     

    Colin