Getting expiry date of SSL certificate

Alain Stouder Omnis omnis at smartway.ch
Sat Jan 20 08:29:25 UTC 2024


Hi Kelly,

The cmd works on Windows with .cer files too.

HTH,
Alain
—
Learn something new every day !

> On 19 Jan 2024, at 22:37, Kelly Burgess <kellyb at montana.com> wrote:
> 
> By the way, for certs on Mac that are not in your keychain, you can feed a file path directly to the openssl x509 tool.  But I only had success with a .pem file -- it would not take a .cer, a .p12 or a .crt file.  Maybe there's a way to do the same with a different openssl command, or maybe you can convert the other formats to .pem first.
> 
>  Calculate certname as '/Applications/Omnis Studio 11.app/Contents/Resources/jsworker/localhost-cert.pem'
>  Calculate script as con('openssl x509 -enddate -noout -in ',kSq,certname,kSq)
>  Calculate script as con('Do shell script ',kDq,script,kDq)
>  Do $root.$runapplescript(script,result,error)
>  ## result = e.g. "notAfter=May 14 10:33:07 2023 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