Forum Discussion
zafer
Nimbostratus
Dec 24, 2009subject alternative name
Hello
i try to get subject alternative name from ssl certificate with this syntax but i see empty value in log file.
how can i get subject alternative name from ssl certificate?
when CLIENTSSL_CLIENTCERT {
set cert [SSL::cert 0]
session add ssl [SSL::sessionid] $cert 600
set sn [X509::serial_number $cert]
set issuer [X509::issuer $cert]
set subject [X509::subject $cert]
set not_valid_after [X509::not_valid_after $cert]
set not_valid_before [X509::not_valid_before $cert]
set san [substr [findstr [findstr [X509::extensions $cert] "X509v3 Subject Alternative Name:" 33 "\n"] "email:" 6 ,] 0 @]
}
regards
zafer
2 Replies
- hoolio
Cirrostratus
Hi Zafer,
If you log the value for [X509::extensions $cert] do you see the SAN there? If so, can you post an anonymized copy of the output?
Thanks,
Aaron - AEisiminger_192Historic F5 AccountJust in case anyone else runs into this like I did here is the correct code to pull Subject Alternative Name.
SUBJECT ATERNATIVE NAME
set santemp [findstr [X509::extensions $c_cert] "Subject Alternative Name" 32 ","]
set san [findstr $santemp "email" 6]
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