SignedXml.CheckSignature(); CryptographicException: Unknown tranform has been encountered
From: Curt Smith (chsmith_at_speakeasy.net)
Date: 09/17/04
- Next message: Eugene Mayevski: "Re: Creating an object (event, mutex) with "everybody allowed" securit"
- Previous message: Eugene Mayevski: "Re: Creating an object (event, mutex) with "everybody allowed" securit"
- Next in thread: Hervey Wilson [MSFT]: "Re: SignedXml.CheckSignature(); CryptographicException: Unknown tranform has been encountered"
- Reply: Hervey Wilson [MSFT]: "Re: SignedXml.CheckSignature(); CryptographicException: Unknown tranform has been encountered"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 17 Sep 2004 08:33:49 -0700
I'm a 2 week newbie to VS.NET, .NET, and C# and need help on this time
critical project.
TIA
I'm using WSE 1.0sp1/.NET 1.0 and signing and verifying xml documents
not SOAP. So I'm using WSE's SignedXml and getting this exception.
My guess ???: machine.config doesn't have the transform
implementation class found for all the namespaces in the <signature>.
BTW, I'm on XPsp1 and our IT department creates the XP image. There
might be something they strip out of XP?? I did check what CSC's are
install and the MS_ENANCED_PROV seem to be installed. But I wouldn't
know if any are missing.
Although I can sign a doc, I can't validate??
I started guessing at the transform namespace to impl classes in my
machine.config (end of email).
Any thoughts??
Thanks Curt
Exception Details: System.Security.Cryptography.CryptographicException:
Unknown tranform has been encountered.
Source Error:
Line 193:
Line 194: XmlNodeList nodeList =
signedDoc.GetElementsByTagName("Signature",
SignedXml.XmlDsigNamespaceUrl);
Line 195:
sx.LoadXml((XmlElement)nodeList[0]);
Line 196:
Line 197: bool isValid =
sx.CheckSignature(key);
Source File: c:\inetpub\wwwroot\browserpost\samlutils.cs Line: 195
Stack Trace:
[CryptographicException: Unknown tranform has been encountered.]
Microsoft.Web.Services.Security.Reference.LoadXml(XmlElement value)
Microsoft.Web.Services.Security.SignedInfo.LoadXml(XmlElement
value)
Microsoft.Web.Services.Security.SignedXmlSignature.LoadXml(XmlElement
value)
Microsoft.Web.Services.Security.SignedXml.LoadXml(XmlElement value)
BrowserPost.SAMLUtils.ValidateDocument(XmlDocument signedDoc,
String keyName) in c:\inetpub\wwwroot\browserpost\samlutils.cs:195
BrowserPost.TestScenarios.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\browserpost\testscenarios.aspx.cs:84
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +720
-- I just started guesing for the crypto packages...
<mscorlib>
<cryptographySettings>
<cryptoNameMapping>
<cryptoClasses>
<cryptoClass
exc14n="Microsoft.Web.Services.Security.XmlDsigExcC14NTransform,
Microsoft.Web.Services.Security" />
<cryptoClass
c14n="System.Security.Cryptography.Xml.XmlDsigC14NTransform,
System.Security.Cryptography.Xml" />
<cryptoClass
exc14n.comments="Microsoft.Web.Services.Security.XmlDsigExcC14NWithCommentsTransform,
Microsoft.Web.Services.Security" />
<cryptoClass
envsigTran="System.Security.Cryptography.Xml.XmlDsigEnvelopedSignatureTransform,System.Security.Cryptography.Xml"
/>
<cryptoClass
digmeth="System.Security.Cryptography.SHA1CryptoServiceProvider,System.Security.Cryptography"
/>
<!--
<cryptoClass sigTran="not done
System.Security.Cryptography.Xml.XmlDsigEnvelopedSignatureTransform,System.Security.Cryptography.Xml"
/>
-->
</cryptoClasses>
<nameEntry name="http://www.w3.org/2001/10/xml-exc-c14n#"
class="exc14n" />
<nameEntry name="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
class="c14n" />
<nameEntry name="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
class="exc14n.comments" />
<nameEntry name="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
class="envsigTran" />
<nameEntry name="http://www.w3.org/2000/09/xmldsig#sha1"
class="digmeth" />
<!--
<nameEntry name="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
class="sigTran" />
-->
</cryptoNameMapping>
</cryptographySettings>
</mscorlib>
- Next message: Eugene Mayevski: "Re: Creating an object (event, mutex) with "everybody allowed" securit"
- Previous message: Eugene Mayevski: "Re: Creating an object (event, mutex) with "everybody allowed" securit"
- Next in thread: Hervey Wilson [MSFT]: "Re: SignedXml.CheckSignature(); CryptographicException: Unknown tranform has been encountered"
- Reply: Hervey Wilson [MSFT]: "Re: SignedXml.CheckSignature(); CryptographicException: Unknown tranform has been encountered"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|