public static bool Verify(XmlElement xmlElement, KeyInfoX509Data keyInfoX509Data, SignedXml signedXml) { if (keyInfoX509Data.Certificates.Count == 0) { throw new SamlSignatureException("No X.509 certificates in key info."); } X509Certificate2 x509Certificate = new X509Certificate2((X509Certificate)keyInfoX509Data.Certificates[0]); return(XmlSignature.Verify(xmlElement, x509Certificate, signedXml)); }
public static bool Verify(XmlElement xmlElement, KeyInfo keyInfo, SignedXml signedXml) { AsymmetricAlgorithm signingKeyFromKeyInfo = XmlSignature.GetSigningKeyFromKeyInfo(keyInfo); if (signingKeyFromKeyInfo == null) { throw new SamlSignatureException("No signing key could be found in the key info."); } return(XmlSignature.Verify(xmlElement, signingKeyFromKeyInfo, signedXml)); }
public static bool Verify(XmlElement xmlElement) { return(XmlSignature.Verify(xmlElement, (SignedXml) new SignedMetadata(xmlElement))); }
public static bool Verify(XmlElement xmlElement, AsymmetricAlgorithm signingKey) { return(XmlSignature.Verify(xmlElement, signingKey, (SignedXml) new SignedMetadata(xmlElement))); }
public static bool Verify(XmlElement xmlElement, X509Certificate2 x509Certificate) { return(XmlSignature.Verify(xmlElement, x509Certificate, (SignedXml) new SignedMetadata(xmlElement))); }
public static bool Verify(XmlElement xmlElement, KeyInfoX509Data keyInfoX509Data) { return(XmlSignature.Verify(xmlElement, keyInfoX509Data, (SignedXml) new SignedMetadata(xmlElement))); }
public static bool Verify(XmlElement xmlElement, SignedXml signedXml) { return(XmlSignature.Verify(xmlElement, (AsymmetricAlgorithm)null, signedXml)); }
public static bool Verify(XmlElement xmlElement, X509Certificate2 x509Certificate, SignedXml signedXml) { return(XmlSignature.Verify(xmlElement, x509Certificate != null ? x509Certificate.PublicKey.Key : (AsymmetricAlgorithm)null, signedXml)); }