18-Jun-2020 13:23
I have a script that I use to upload certs to our LTM with Powershell. I'm wondering if there is an endpoint or something that I can use to upload the cert into a specific partition instead of the default /Common/ Partition?
22-Jun-2020
08:13
- last edited on
04-Jun-2023
21:24
by
JimmyPackets
Hello JoshBarrow.
First you need to upload cert & key files to the BIG-IP. You can do that in many ways. For example:
https://devcentral.f5.com/s/articles/file-upload-via-icontrol-rest
After that, you can install them in a specific partition using next commands:
curl -sk -u admin:<PASS> -H "Content-Type: application/json" -X POST https://x.x.x.x/mgmt/tm/sys/crypto/cert -d '{"command":"install","name":"<CERT_NAME>","partition":"<PARTITION>","from-local-file":"<PATH>/<CERT_FILE>"}'
curl -sk -u admin:<PASS> -H "Content-Type: application/json" -X POST https://x.x.x.x/mgmt/tm/sys/crypto/key -d '{"command":"install","name":"<KEY_NAME>","partition":"<PARTITION>","from-local-file":"<PATH>/<KEY_FILE>"}'
Regards,
Dario.