2

I am trying to build a Google Spreadsheet that will warn any of the upcoming expiry dates on SSLs.

I would like a Google Script to fetch the certificate for a supplied URL and extract the expiry date from it.

Google Scripts are written in a version of JavaScript. I have access to UrlFetchApp which allows me to make HTTP requests but I cannot find anything in the headers about the SSL certificate.

I, obviously, don't have access to openssl which I would normally use to get this information.

My question is, what should I be querying to get the certificate info?

Edit

If someone knows of a free API I could use, that would be a viable alternative.

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65
Jonathan Hodgson
  • 363
  • 1
  • 12
  • This is not a Google Script, but you can get an idea here in this [question](https://stackoverflow.com/questions/6863948) on how to get how to get expiry date from the SSL Certificate. You can also check this [question](https://stackoverflow.com/questions/9679920) that use javascript in getting the SSL certificate. – KENdi Aug 09 '17 at 15:01
  • thanks @KENdi , Unfortunately, I have come across both of those articles. The node version just calls openssl as a child process, the php one has access to PHP Curl which has in built support for querying SSL certificates. Unfortunately, neither is an option on a google script as far as I know. – Jonathan Hodgson Aug 10 '17 at 13:49
  • 1
    @JonathanHodgson were you able to create this sheet? – Shivam Bajpai Nov 01 '19 at 11:55

0 Answers0