WHM API 1 - install_service_ssl_certificate - cabundle confusion
Hi guys,
I've got a script working that installs service SSL certs.
It works fine if the server already has the correct cabundle.
However, if, say, I'm on a fresh server load without the cabundle, it will fail.
I've tried specifying the ca-bundle as:
plaintext ( with or without newlines )
uri-encoded text ( with or without newlines )
a filepath to a file on the server containing the cabundle
etc
I can't seem to figure this out.
-
Hello :) You should pass the contents of the CRT for "cabundle" the same way you do for "crt" and "key". Do you receive a specific failure message? Thank you. 0 -
This is what I get: {"metadata":{"version":1,"reason":"Certificate verification failed!\nThe system did not find the Certificate Authority Bundle that matches this certificate.\nContact "GlobalSign nv-sa" to obtain the Certificate Authority Bundle for "AlphaSSL CA - SHA256 - G2".","result":0,"command":"install_service_ssl_certificate"}} This only occurs if the server is a fresh load and has never had an SSL installed via WHM, yet. It seems once we login to WHM and setup the cert with the "autofill by certificate" option, it corrects the issue. After adding the cert via WHM, I can then remove it completely and then the API call will now work. I'm guessing that the CA Bundle is getting cached somewhere or something after using the autofill option. btw this is using: json-api/install_service_ssl_certificate?api.version=1&service=cpanel&crt=$cert&key=$key&cabundle=$cab Sorry for the late reply, and thanks :) 0 -
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments