Forum Discussion
Adrian_Hockey_1
Nimbostratus
Jan 25, 2013Read SHA1 HASH From Client SSL Cert
Hi,
I am using this sample to return the thumbprint of an SSL certificate. It works fine but returns the MD5 has of the cert and I would prefer to get the SHA1 hash instead. Is this pos...
hoolio
Cirrostratus
Jan 28, 2013Yes, this should work:
when HTTP_REQUEST {
HTTP::header remove SSLClientCertSubject
HTTP::header remove ClientCertThumbprint
if { [SSL::cert count] > 0 } {
HTTP::header insert SSLClientCertSubject [X509::subject [SSL::cert 0]]
binary scan [sha1 [SSL::cert 0]] H* cert_hex
HTTP::header insert ClientCertThumbprint $cert_hex
}
}
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
