Forum Discussion

Guruprasad_3773's avatar
Guruprasad_3773
Icon for Nimbostratus rankNimbostratus
Dec 13, 2018

Uploading SSL Crt and Key

Using F5 12.1.2

 

Trying to upload ssl crt and key using REST

 

Tried: curl -sk -u "credentials" -H "Content-Type: application/json" -X POST -d '{"command":"install", "name": "mykey", "fromLocalFile": "mykey.key"}'

 

Error: {"code":400,"message":"Unable to copy (/var/service/restjavad/temp/mykey.key) into tempfile (/var/system/tmp/tmsh/huwouz/mykey.key), No such file or directory","errorStack":[],"apiError":26214401}

 

Tried: curl -sk -u "credentials" -H "Content-Type:application/json" -d '{"partition":"Common","name":"mykey","sourcePath":";}' -X POST

 

Error: {"code":400,"message":"Failed! exit_code (37).\n","errorStack":[],"apiError":26214401}

 

Same errors for crt

 

The files have permission: 644

 

Any suggestions?

 

  • How about using my iCR Python module which does the upload and in fact the whole thing for you if you want?

     

    iCR Python Module for iControl REST

     

    Use the create_cert method and in fact there is a create_ssl_profile method as well. Let me know if you want some help.