How to extract the Start/End Dates of the Sangoma Connect Certificate via Command line

Hi, the following CLI command does not expose any of the installed Certificate start/end dates (only their respective names/type etc.)

fwconsole cert --list

Consequently, I use the following to extract the Start/End dates of the LE Certificate within the CLI/Shell Script for PBXact/FreePBX installations;

echo | openssl s_client -connect FQDN:443 -servername FQDN 2> /dev/null | openssl x509 -noout -dates

Please can anyone advise how I can extract the same info (start/end dates) from the Sangoma Connect Certificate (127.0.0.1_sangoma_connect).

Try using

openssl x509 -in /etc/asterisk/keys/127.0.0.1_sangoma_connect.crt -noout -dates

maybe this cli command help you to check ssl cert validation.

openssl s_client -showcerts -connect asterisk-server.com:443

openssl x509 -in /etc/asterisk/keys/127.0.0.1_sangoma_connect.crt -noout -dates

That works for me (& makes sense) - Thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.