I have an account that I have been testing with LetsEncrypt. I've generated several "real" SSL certs for this account, and also some "test" certificates via LetsEncrypt. in each case, I deleted the currently installed cert via cPanel, then ran my script to get a new certificate and install it. I only ever have one certificate installed on the account according to cPanel's SSL page where it lists the SSL certificates installed on the account. If I use cPanel to delete that one certificate listed on the SSL management page, the site is no longer available as an https: site, so I know that is the only certificate cPanel recognizes as active on this account.
After a number of tests installing and deleting certificates (again only one is currently showing as installed in cPanel), I decided to write a function to display the currently installed certificate's information. I couldn't find an API function to get just the one installed certificate according to cPanel, so I used list_certs, specifying this account's domain. It successfully returns, but it contains elements for all the certificates I ever installed on this account, even though they're not listed in cPanel for this account (only one is shown). Although this seemed odd, I figured I would loop over them and only one would have the "domain_is_configured" value set to "1", as cPanel only shows one certificate installed on the account, but they ALL come back with "1" for this value.
Is there an API method to do what cPanel is doing? That is, retrieve the information for the *one* SSL certificate that is shown as actively installed on the account?
Thanks,
Vinnie
After a number of tests installing and deleting certificates (again only one is currently showing as installed in cPanel), I decided to write a function to display the currently installed certificate's information. I couldn't find an API function to get just the one installed certificate according to cPanel, so I used list_certs, specifying this account's domain. It successfully returns, but it contains elements for all the certificates I ever installed on this account, even though they're not listed in cPanel for this account (only one is shown). Although this seemed odd, I figured I would loop over them and only one would have the "domain_is_configured" value set to "1", as cPanel only shows one certificate installed on the account, but they ALL come back with "1" for this value.
Is there an API method to do what cPanel is doing? That is, retrieve the information for the *one* SSL certificate that is shown as actively installed on the account?
Thanks,
Vinnie
Last edited: