Forum Discussion
Ruggerfly1
Nimbostratus
Jun 27, 2017IRULE to search Certificate Subject and Set Username.
Good Afternoon,
I'm trying to get an IRULE to use the Client SSL profile Request handshake to filter the cert and subject. IRULE was crafted-reused from a few other DevCentral Post.
Here's where I'm at: Error 4: error: ["unexpected end of arguments;expected argument spec:CERTIFICATE"][X509::subject]
when CLIENTSSL_CLIENTCERT {
if {([SSL::cert 0] eq "") or (![X509::subject] contains "irene")} {
Reset the connection
reject
} else {
set subject_all [X509::subject [SSL::cert 0]] log "Subject: $subject_all" binary scan [md5 $subject_all] H* user_hash log "$user_hash" } }What am I missing?
Cheers!
- eey0re
Cirrostratus
X509::subject needs to be passed the certificate from which to extract the subject, and is missing from your first line.
Try:
if {([SSL::cert 0] eq "") or (![X509::subject [SSL::cert 0]] contains "irene")} {
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