Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2004

Tip: Looking for answers? Try searching our database.

SignedXml.CheckSignature();  CryptographicException: Unknown tranform has been encountered

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Curt Smith - 17 Sep 2004 16:33 GMT
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
Hervey Wilson [MSFT] - 22 Sep 2004 18:45 GMT
See my response to your later posting.

Signature

This posting is provided "AS IS", with no warranties, and confers no rights.

> I'm a 2 week newbie to VS.NET, .NET, and C# and need help on this time
> critical project.
[quoted text clipped - 86 lines]
>
>           <cryptoClass

exc14n.comments="Microsoft.Web.Services.Security.XmlDsigExcC14NWithCommentsT
ransform,
> Microsoft.Web.Services.Security" />
>
>           <cryptoClass

envsigTran="System.Security.Cryptography.Xml.XmlDsigEnvelopedSignatureTransf
orm,System.Security.Cryptography.Xml"
> />
>
>           <cryptoClass

digmeth="System.Security.Cryptography.SHA1CryptoServiceProvider,System.Secur
ity.Cryptography"
> />
>
>           <!--
>
>           <cryptoClass sigTran="not done

System.Security.Cryptography.Xml.XmlDsigEnvelopedSignatureTransform,System.S
ecurity.Cryptography.Xml"
> />
>
[quoted text clipped - 9 lines]
>
>         <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" />
>
[quoted text clipped - 13 lines]
>
>   </mscorlib

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.