Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

API2 SSL listcrts get expiration date

Discussion in 'cPanel Developers' started by stapuff106, Aug 4, 2017.

Tags:
  1. stapuff106

    stapuff106 Member

    Joined:
    Aug 4, 2017
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chicago
    cPanel Access Level:
    Root Administrator
    Main objective is to get the expiration date from the SSL.


    cPanel API2 SSl listcrts

    returns nothing:

    object(SimpleXMLElement)#2 (4) { ["apiversion"]=> string(1) "2" ["event"]=> object(SimpleXMLElement)#3 (1) { ["result"]=> string(1) "1" } ["func"]=> string(8) "listcrts" ["module"]=> string(3) "SSL" }


    However, I can see the SSL information exists using:

    cPanel API2 SSLInfo fetchinfo

    returns a complete SSL [data] array


    redhat-release:CentOS release 6.8 (Final)
    version:11.66.0.8
    envtype:virtuozzo
    CPANEL:current
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,659
    Likes Received:
    1,428
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. stapuff106

    stapuff106 Member

    Joined:
    Aug 4, 2017
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chicago
    cPanel Access Level:
    Root Administrator
    I appreciate the response back.

    API1 and API2 are pretty simple to use with php.

    I have looked at UAPI briefly, but have not found a "How to Setup & Use cPanel UAPI for Dummies" yet.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,659
    Likes Received:
    1,428
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    stapuff106 likes this.
  5. stapuff106

    stapuff106 Member

    Joined:
    Aug 4, 2017
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chicago
    cPanel Access Level:
    Root Administrator
    I appreciate your response. Looked over your initial response over the weekend and found the class you suggested in your latest response. Got it up and running last night.... so I appreciate you taking the time out to respond.

    Thanks,

    Puff
     
    cPanelMichael likes this.
  6. stapuff106

    stapuff106 Member

    Joined:
    Aug 4, 2017
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chicago
    cPanel Access Level:
    Root Administrator
    cPanelMichael - I had 1 question.... when I run the uapi SSL list_certs it return 6 data arrays in a var_dump response. I am using the AutoSSL in WHM so it is creating 1 SSL for domain, mail, etc. I see 1 date in WHM, but 6 different dates when I convert the not_after's. Why is it listing 6, why are the dates different, and only 1 not_after comes within a day of matching what is shown in WHM.

    Ok sorry... had more than 1 question.

    Puff
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,659
    Likes Received:
    1,428
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    This indicates the certificates were issued at different times. For instance, this would happen if a subdomain or addon domain name was added to the cPanel account at later date than when the account was setup.

    Thank you.
     
Loading...

Share This Page