gtsg86
Altostratus
Mar 13, 2023F5 automation
I would like to automate the csr generation to renew certificate. here is the script tmsh create sys crypto csr {key_name}.csr partition {data["partition"]} common-name {cert[cert_name]["common-nam...
gtsg86 If I had to guess without seeing the entire script I would say that in the section with 'key /{partition}/{key_fullname}' the value of "{partition}" actually has a "/" in the value at the begining so you can change it to be the following instead.
tmsh create sys crypto csr {key_name}.csr partition {data["partition"]} common-name {cert[cert_name]["common-name"] ' 'key {partition}/{key_fullname}'
Thanks Paulius.
I tried with '/' without '/' and it generates errors. I tried with the REST API same error. it work only when the certificate is in the Common partition. I tried on version 14 and on version 15.
I wonder if it is not a bug.
or if you are able to automate csr from a partition, just explain me with an example.
gtsg86 It could be that this is using a relative path that loads for the user that the script is running under. You might consider using the openssl command instead of using the tmsh commands built into the F5 OS because I find that those are a bit more friendly when it comes to automation.