Getting expiry date of SSL certificate

malkishtini at gmail.com malkishtini at gmail.com
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,
Mayada

-----Original Message-----
From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of
Kelly Burgess
Sent: Thursday, January 18, 2024 10:43 PM
To: OmnisList <omnisdev-en at lists.omnis-dev.com>
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
(76LPV4WMTA)"
	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'

Kelly
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com Start a new
message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list