Skip to main content

whmapi1 command and cPanel ssl showing different

Comments

9 comments

  • cPanelMichael
    Hello, Have you installed any third-party web server applications such as Nginx on this server? Thank you.
    0
  • syslint
    Hi, Yes, we have nginx. But that is not the problem. Whether nginix exist or not, why the whmapi command show wrong' informations.?
    0
  • cPanelMichael
    Hi, Could you open a support ticket using the link in my signature so we can take a closer look? Thank you.
    0
  • syslint
    Ticket is #9036521 We also found, those domains having issue showing multiple ssl cache files. May be your whmapi is reading from the wrong file
    -rwxr-x--x 1 root root 3369 Aug 21 16:04 /var/cpanel/ssl/installed/certs/foo.com_aea55_f8dc5_1534878225_e08196c40a524ecab2cb06f96f9cee87.crt.cache* -rw-r--r-- 1 root mail 1963 Nov 11 09:53 /var/cpanel/ssl/installed/certs/foo.com_af340_86233_1540771199_d040ea0a8af75d8395a2702a146288d8.crt -rwxr-x--x 1 root root 4936 Nov 11 09:53 /var/cpanel/ssl/installed/certs/foo.com_af340_86233_1540771199_d040ea0a8af75d8395a2702a146288d8.crt.cache* -rwxr-x--x 1 root root 4463 Nov 11 09:36 /var/cpanel/ssl/installed/certs/foo.com_b0b82_9b71b_1518220799_3cf941af0e9dd4db12ee7dc67a6209fd.crt.cache* -rwxr-x--x 1 root root 4985 Nov 10 04:48 /var/cpanel/ssl/installed/certs/foo.com_b4384_3c547_1511222399_ba1b35a51932e0baf7f266c2432da9c3.crt.cache*
    Only of the cache file is correct others are invalid.
    0
  • syslint
    May be this will help 1) Apache use the cert file /var/cpanel/ssl/installed/certs/foo_com_af340_86233_1540771199_d040ea0a8af75d8395a2702a146288d8.crt => This is the correct file. It is same as in /var/cpanel/ssl/apache_tls/foo.com/combined , but 2) whmapi command is reading from the file /var/cpanel/ssl/system/certs/foo_com_af340_86233_1540752034_017c06e605deffd8c162a0d5c64e01fd.crt , which is the wrong certificate, Why whmapi is reading from the wrong file ? I think it is a bug
    0
  • syslint
    The command "/usr/sbin/whmapi1 fetchsslinfo " is full of bugs, right now three issues 1) Show wrong certificates while apache show the correct one 2) Don't show CAB 3) Show nothing even if the domain have ssl These three issues are facing a number of servers randomly. It is probably with reading the cached data or wrong files . You should make both apache and whmapi1 read from the same files.
    0
  • cPanelNick
    This API call retrieves potentially installable certificates for a user. It does not provide the currently installed certificate. Its used to make a guess on what to pre-fill when the user wants to install a certificate. I have opened up DOC-9866 to improve the documentation for this api (WHM API 1 Functions - fetchsslinfo - Software Development Kit - cPanel Documentation)
    0
  • cPanelNick
    If you are looking for currently installed certificates, you probably want this API: WHM API 1 Functions - fetch_vhost_ssl_components - Software Development Kit - cPanel Documentation
    0
  • syslint
    That wrong description on the document page really made a conflict. So I think which don't have an api to retrieve the current ssl certificate of a single domains. Instead it have an api to get all certificates. whmapi1 fetchsslinfo => Only retrieve previously installed ssl certificates and it won't show the current installed ssl certificates ( still the documentation says "This function retrieves certificate information." ) We get rid of this api call to solve the app issue. Thank you very much Nick :)
    0

Please sign in to leave a comment.