Validating x509 certificates vb net


Recently I've been involved in some work that deals with signed XML documents outside of a WCF Web service environment.

Ironically the service that is being accessed accepts SOAP data but the service does not expose any WSDL even though it uses some WS-* specification features - namely digital signature of the XML body of the message.

validating x509 certificates vb net-40

You then use a Public key to validate the signature when reading the document.

Both signing and and validation can be done with the Signed Xml class in combination with the X509Certificate and X509Certifcate2 classes.

Since I didn't have much luck finding the information I needed in one place I thought I'd write it up here, so it hopefully helps out some of you (and myself) in the future.

The most frustrating part of the process for me was getting the certificates set up correctly for testing.

pvk2-pvk -spc -pfx This will popup and prompt for your private key password and give you options on how to import the key into the certificate store.