Get TLS cert expiry time
S This expression returns the expiry time of the currently loaded SSL/TLS certificate.
It takes two parameters:
- The first parameter is either 0 for the expiry time to be in the server machine's local timezone, or 1 for the expiry time in UTC timezone.
You probably want 0. - Format of date time.
You can pass "" for the default datetime format, which is:
"%I:%M:%S%p on %A %d %B %Y"
…which translates to:
"11:23:45PM on Sunday 03 January 2022"
Otherwise, you can use a custom format in strftime. Both C++11 and C++17 strftime modifiers are supported.
You can use this expression when a certificate is loaded, even when the Secure WebSocket Server is not hosting.
If no certificate is loaded, then the expression will return:
Secure WebSocket server not hosting
If the custom format you give is broken, the expression will return:
Format "(your strftime format)" is invalid
No On Error event will be generated for either of these errors.