Forum Discussion

Dor_206641's avatar
Dor_206641
Icon for Nimbostratus rankNimbostratus
Jul 17, 2016

import pfx certificate using rest api

I'm trying to import pfx certificate file using the f5 ltm rest api I have tried the command:

 

curl -sk -u admin: -H "Content-Type: application/json" -X POST https:///mgmt/tm/sys/crypto/pkcs12 -d '{"command":"install","name":"test","from-local-file":"/tmp/file.pfx","passphrase":""}'

 

I get error : "code":400,"message":"Failed to open /tmp/file.pfx "errorStack":[]

any idea how to import fx certificate using rest api?

Thanks!

 

1 Reply

  • when i look at this question and then specially the remark from IanB then it could be there is something wrong with the file you are sending. if you just import it via the GUI, does it work?

     

    https://devcentral.f5.com/questions/-quotcode-quot404-quotmessage-quot-quotfailed-to-open-rest-when-trying-to-install-certificate

     

    does loading seperate files work? so not the full container.