0

here is my situation:

I've 2 X509Certificate2 objects.

  • Object a: Certificate Authority (root-CA)
  • Object b: Certificate , signed bei a.

a is not an trusted root ca!

is there an easy way to verify, that b is realy signed by a?

flotto
  • 535
  • 5
  • 17
  • the right answer is in thes thread: http://stackoverflow.com/questions/3264747/check-signature-for-x509-certificate – flotto Apr 07 '14 at 08:30

1 Answers1

0

I think you need to install your own Certificate validator. In your validator method you can check certificate issuer and return true if it is a.

 private static bool ValidateRemoteCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors policyErrors)
        {
            if ( certificate.Issuer==<a DN goes here>
                return true;
        }

        public static void InstallCertificateValidator()
        {

           ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(ValidateRemoteCertificate);


        }
user2246051
  • 231
  • 1
  • 7