How to use Datasnap ValidatePeerCertificate to validate the server certificate for an https connection?

693 views Asked by At

I have a Delphi XE7 DataSnap https server and I want the client to verify the signature on connection. It looks like the place to do it in the connection's ValidatePeerCertificate, but the documentation on how to do it is cryptic. Does anyone know of some sample code?

1

There are 1 answers

1
mjn On

The documentation refers to the HTTPS Certificate Verification page. There you can find additional help about the verification event handler arguments:

The certificate itself is a TX509Certificate instance that you can inspect and then set the value of Ok to True if you are satisfied with the certificate, or to False otherwise.

Also, three helper functions are listed and there is documentation about the TX509Certificate class