We have a WPF application built on .Net Framework 4.7. This application acts as an LDAPS client by which it authenticates a user against an LDAPS active directory.
We have a requirement to validate the LDAPS x509 v3 certificate before providing access to a user. Can you please let us know the best way to validate the below mentioned parameters:
- The signature
- The stored certificates
- The validity against Certificate Revocation List (CRL)
- The validity date
- The IP address checking on Subject Alternative Name
We have attached the code in the question.
We are aware of the 'ServerCertificateValidationCallback' function used for HTTPS certificate validation. We wanted to know if there anything similar in LDAPS or any other better way to validate an LDAPS connection using certificate.
Any suggestion is welcome.
Thank you in advance