In server side, I have self-signed CA (certificate and private key). I use them to issue my device certificate, and I want to make sure that if the remote cert is not signed by CA, there will be exception.
I'm referring to links below, but it seems that they don't work to me, please help:
C# How can I validate a Root-CA-Cert certificate (x509) chain?
Verify Remote Server X509Certificate using CA Certificate File