I state that I am not an expert.
I'm trying to create a TCP server / client encrypted. I have implemented SSL, and I created a key selfsigned and its certificate.
I realized, thanks to many post also read on this site that i do not need to use the certificate. I refer in particular to a user's response Remy Lebeau: Delphi Indy - How to get SSL certificates for a SSL-TCP Client/Server link with Indy 10
Now I was wondering if you can, somehow, prevent attacks man in the middle.
Or rather, if I implement the code of the app the signature and fingerprint of the certificate and verify during event OnVerifyPeer is enough?