Skip to main content

cPanel API2 installSSL issue

Comments

3 comments

  • cPanelLauren
    Hi @resolv_25 First I want to suggest using the UAPI function rather than the cPapi2 function for this: UAPI Functions - SSL::install_ssl - Developer Documentation - cPanel Documentation I would also suggest reading the following: Tutorial - Call UAPI's SSL::install_ssl Function in Custom Code - Developer Documentation - cPanel Documentation I believe the method's for installing an SSL listed in the documentation for the Install SSL function in Custom Code will be helpful in this instance. Thanks!
    0
  • resolv_25
    Hi @resolv_25

    Hi, thanks for your reply. One thing isn't clear from manual, do I have to parse cert, cabundle and key on the same format: -----BEGIN CERTIFICATE-----\\nMIIEsTCCetc
    I mean, do I have to put \\n in the space between lines. Probably yes as on the cpapi2. I would prefer to use shell instead Perl or PHP because one can use a ssh key and install it on various servers without need of further authentication. Well, I was hoping to use cpapi2 because it is not asking the private key. WHM GUI is also smart enough when providing the cert, it can automatically populate cabundle and key. However, I'll try with that. Regards,
    0
  • cPanelLauren
    Hi @resolv_25 You're correct for cPapi2 it should include \\n for lines as indicated in the example the UAPI function should behave the same way as well. Thanks!
    0

Please sign in to leave a comment.