Forum Discussion
Derek_Nelson_10
Nimbostratus
Aug 24, 2005Problem with Certificate Hash verification
Hi all.
I'm having a problem with verifying connections to a particular proxy that "requires" a client cert. The proxy is inserting the Certificate Serial Number and Certificate Hash into the HTTP Header.
Trying to use this iRule:
if (http_header("SSLClientCertSerialNumber") == one of Cert_SN and http_header("SSLClientCertHash") == one of Cert_Hash) {
log "MutualSSL accepted from:${client_addr}"
use pool web-pool
}
else {
log "MutualSSL Denied from:${client_addr}"
discard
}
Class Cert_Hash String
XX:YY:ZZ:C2:9A:B9:B5:20:BE:DA:1E:3F:C7:A8:A6:29
XXYYZZC29AB9B520BEDA1E3FC7A8A629
xx:yy:zz:c2:9a:b9:b5:20:be:da:1e:3f:c7:a8:a6:29
Cert_SN String
xx:yy:zz:44:91:79:b3:ae:7e:9d:6c:49:22:c2:6a:ef
xx:yy:zz:39:b1:7a:f3:2c:29:e7:00:64:62:a5:86:b6
(xyz's inserted manually here...)
Currently none of the hashes above work, and the serial numbers do work. I checked this by removing the appropriate condition in the rule individually.
SOL1910 from ASK F5 KB shows the hash format as above. I have tried (as you can see) both upper and lower case as the article shows lower case for serial numbers but upper case for the hashes. Anyone know if this is case sensitive?
I have got the hashes by exporting the certificate in DER, Base64 PEM, and PKCS formats and tried all the separate hashes (using the command "md5 certificate.crt" and converting the format inserting the colons) to no avail.
What I'm trying to achieve is to restrict my "mutual SSL" B2B connection to only a select few certificates, rather than allowing any certificate signed by a specific CA like in the ca-bundle.crt (Client Trusted CAs File)...
Thanks,
- Derek.
2 Replies
- Martin_MachacekHistoric F5 AccountDerek,
if (http_header("SSLClientCertSerialNumber") == one of Cert_SN and http_header("SSLClientCertHash") == one of Cert_Hash) { log "MutualSSL accepted from:${client_addr} hash: " + http_header("SSLClientCertHash") use pool web-pool } else { log "MutualSSL Denied from:${client_addr} hash: " + http_header("SSLClientCertHash") discard }
- Derek_Nelson_10
Nimbostratus
Thanks mmac.
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