Forum Discussion

Kevin_Pruett_73's avatar
Kevin_Pruett_73
Icon for Nimbostratus rankNimbostratus
Dec 31, 2012

ssl::ciper iRule, working.....kinda......

We have deployed an iRule using the SSL:cipher keyword and are getting mixed results. The scenario is as follows:

 

We are supporting a vendor software that is sending both ssl encrypted and unencrypted traffic to the same non-standard port. The vendor has requested that when an unencrypted packet comes in (HTTP in the header), that it be redirected to HTTPS. After looking through DevCentral, I found the below iRule and modified it slightly (THANK YOU to the original poster of this, by the way!) to remove the HTTP::port keyword to accomodate the fact that the configuration file for the vendor application hard codes the port into the rule.

 

 

Check if the client used an SSL cipher

 

if {not ([catch {SSL::cipher version} result]) && [string tolower $result] ne "none"}{

 

Client did use a cipher

 

log local0. "\$result: $result. Allowing encrypted request."

 

 

} else {

 

Client did not use a cipher

 

log local0. "\$result: $result. Redirecting unencrypted request."

 

HTTP::redirect ]

 

log local0. "[HTTP::host][HTTP::uri]"

 

}

 

}

 

What we are getting is some strange behavior. When the user tries to use parts of the application that trigger this iRule, initially it sits and spins, but if you click off of the active application window and click back on it, it succeeds. This behavior is also inconsistent. Sometimes the application just fails. I am curious if this could be because the traffic will pass through this iRule twice since the encrypted and unencrypted port are the same.

 

Is this something anyone has seen or had to troubleshoot before, and can you provide any assistance?

 

Thank you,

 

Kevin Pruett

 

 

 

 

13 Replies