SOLVED cPanel Api 2 install SSL problem

Killy123

Member
Oct 28, 2016
18
2
3
Bulgaria
cPanel Access Level
Root Administrator
Hi, I am trying to install new SSL following the documentation
cPanel API 2 Functions - SSL::installssl - Software Development Kit - cPanel Documentation, but when I make a request to install certificate I get this response from the API:
Code:
{"cpanelresult":{"error":"The ASN.1 data is corrupt. Its header indicates a length of 67 bytes, but its content is 531 bytes long.","postevent":{"result":1},"module":"SSL","event":{"result":1},"preevent":{"result":1},"data":[{"result":0,"output":"The ASN.1 data is corrupt. Its header indicates a length of 67 bytes, but its content is 531 bytes long."}],"func":"installssl","apiversion":2}}
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello,

I'm happy to see you were able to address the issue by using the SSL::install_ssl UAPI function. Regarding the cPanel API 2 function, here's a note from our documentation regarding what likely lead to the issue:

The HTTP GET method has a limited field length that does not accommodate this function's input parameters. You must use HTTP POST.
Thank you.