Is it possible to get the SSL certificate expiration date that the XDATA server is using?
I'm thinking that is it possible from inside of the XDATA services method?
The main reason is to check ssl certificate expiration date and warn about this the WebApp user that e.g. for 30 days the certificate will be expired you must import a new valid certificate.
Fun question!! Here's a way to check the SSL Certificate of any server, not just whatever XData is running on. Note that I've tried this on Delphi 10.3 using the TNetHTTPClient component. Something similar could also be done with Indy, if that's not available.
Steps:
Drop a TNetHTTPClient component on the form (Unit2.pas in the XData default project).
Set the SecureProtocols property to be just SSL3 and TLS12, or whatever you need.
In the OnValidateServerCertificate event, add something like this.
Note that this also makes it easy to add additional SSL checks for other servers that your XData server may depend upon, such as a mail server, for example. Just add another Get call for each server that is of interest, even if it isn't one you control yourself.