How to insert Client Certificate HASH to http header

I want to deliever the Client Certificate HASH to a backend server. The server on the backend will look at the HASH and verify the HASH is the correct client to access the data. I have tried the iRule below, but this does not seem to work.

when HTTP_REQUEST {

if {[SSL::cert count] > 0} {

set cert [SSL::cert 0]

HTTP::header insert NETWORK_ALIAS [X509::hash $cert]

}

}

Is there anything I am missing or is this correct? If I am totally incorect, can someone please help me with the correct iRule to perform this action.

Thanks!

-GW

When you say it doesn’t work, what do you mean? Is nothing getting inserted, or is it merely getting inserted in the wrong format, or … ?

Colin

It is not being inserted.

When I do a TCP dump, I do not see the certificate hash in the dump. And Yes, this traffic is not encrypted on the backend.

anybody? :?