Getting expiry date of SSL certificate

malkishtini at malkishtini at
Fri Jan 19 13:18:46 UTC 2024

Hi Kelly,

That's great to know.
Thank you very much for sharing your solution.

Best regards,

-----Original Message-----
From: omnisdev-en <omnisdev-en-bounces at> On Behalf Of
Kelly Burgess
Sent: Thursday, January 18, 2024 10:43 PM
To: OmnisList <omnisdev-en at>
Subject: Re: Getting expiry date of SSL certificate

On the Mac, I can do the following to get the expiration date of a named
certificate in my keychain -

	Calculate certname as "Developer ID Application: Kelly Burgess
	Calculate script as con('security find-certificate -p -c
',kSq,certname,kSq,' | openssl x509 -enddate -noout')
	Calculate script as con('Do shell script ',kDq,script,kDq)
	Do $root.$runapplescript(script,result,error)

That pipes the security find-certificate output to the openssl x509 tool,
and in result I get something I could parse and convert to a date -

	'notAfter=Aug 16 11:11:48 2026 GMT'

Manage your list subscriptions at Start a new
message -> mailto:omnisdev-en at 

More information about the omnisdev-en mailing list