Forum Discussion

Jaz_170005's avatar
Jaz_170005
Icon for Nimbostratus rankNimbostratus
Feb 26, 2018

import p12 using tmsh

Hello,

 

not able to make import p12 to work via CLI command line b/c of encrypted password. same password works using GUI. I tried adding quotes around it with no luck. if I try simple password e.g abc.. it works and return "bad password" which tell me that command it correct and for sure it does not like password with weird characters :).

 

tmsh install sys crypto pkcs12 myFile from-local-file /shared/tmp/myFile.p12 prompt-for-password 35'7,97?!*

 

any suggestion is highly appreciated. thank you.

 

1 Reply

  • A workaround could be change P12's password using openssl:

    tmsh run util bash
    

    From bash:

    1-Open PFX and generate temporal pem

    openssl pkcs12 -in myfile.p12 -out tmpmycert.pem -nodes    
    

    2- Generate myfile2.p12 with a simple password

       openssl pkcs12 -export -out myfile2.p12 -in tmpmycert.pem
    

    3- Import new p12