I'm working on the single sign on project. Does anybody know how to validate a signed XML against X.509 certificate (public key certificate is provided) in .NET? I already tried using the SignXML.CheckSignature() object, but I kept getting an invalid/false result. The CheckSignature method has no way for me to specify which certificate to be validated against. Any web link or sample will be very helpful. Thanks people!
The following my code. The information sent from the client is in base64 encoding and comply to SAML specification.
=================================================================================
Dim SAMLResponse As StringDim BC As New ASCIIEncodingDim DecodedData() As ByteDim sDecodedData As String
SAMLResponse = Request("SAMLResponse")DecodedData = Convert.FromBase64String(SAMLResponse)sDecodedData = BC.GetString(DecodedData)
Dim RSA As New RSACryptoServiceProviderDim publicKey As String
...
Go to the complete details ...