Forum Discussion
Extract info from client ssl profile
You can do this
[root@awaf:Active:Standalone] config # tmsh list ltm profile client-ssl key cert chain | sed -z 's/{\n\([^}]*\)\n*}/{\1}/g; s/\n/ /g; s/} */}\n/g'
ltm profile client-ssl clientssl { cert default.crt chain none key default.key }
ltm profile client-ssl clientssl-insecure-compatible { cert default.crt chain none key default.key }
ltm profile client-ssl clientssl-quic { cert default.crt chain none key default.key }
ltm profile client-ssl clientssl-secure { cert default.crt chain none key default.key }
ltm profile client-ssl crypto-server-default-clientssl { cert default.crt chain none key default.key }
ltm profile client-ssl splitsession-default-clientssl { cert default.crt chain none key default.key }
ltm profile client-ssl wom-default-clientssl { cert default.crt chain none key default.key }
And then awk the hell out of it.
Since I did it half-way, I can also do it completely
[root@awaf:Active:Standalone] config # tmsh list ltm profile client-ssl key cert chain | sed -z 's/{\n\([^}]*\)\n*}/{\1}/g; s/\n/ /g; s/} */}\n/g' | awk '/^ltm profile client-ssl/ {name = $4; cert = chain = key = ""; for (i = 5; i <= NF; i++) {if ($i == "cert") cert = $(i+1); if ($i == "chain") chain = $(i+1); if ($i == "key") key = $(i+1)} printf "%s cert=%s chain=%s key=%s\n", name, cert, chain, key}'
clientssl cert=default.crt chain=none key=default.key
clientssl-insecure-compatible cert=default.crt chain=none key=default.key
clientssl-quic cert=default.crt chain=none key=default.key
clientssl-secure cert=default.crt chain=none key=default.key
crypto-server-default-clientssl cert=default.crt chain=none key=default.key
splitsession-default-clientssl cert=default.crt chain=none key=default.key
wom-default-clientssl cert=default.crt chain=none key=default.key
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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