How to use literals starting with "$" in iRule

Hi,

I need to pass client certificate to WebSphere so the application can perform SSL based authentication. I following this article myF5

However in WebSphere App Server the headed for client certificate is $WSCC. But if I code iRule like this

when HTTP_REQUEST {

HTTP::header insert $WSCC [b64encode [SSL::cert 0]]

}

$WSCC is treated as a variable WCSS and the rule is broken

How do I get around this issue?

Thanks

Genna

Hi Genna,

you can escape the ‘$’ character with a ‘\’. This should work:

when HTTP_REQUEST {
    HTTP::header insert "\$WSSC" [b64encode [SSL::cert 0]]
}

KR

Daniel

to prevent variable substitution, you can replace double quotes by curly braces.

when HTTP_REQUEST {
    HTTP::header insert {$WSSC} [b64encode [SSL::cert 0]]
}

Stan