Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > XmlDsigC14NTransform framework 1.0 vs 1.1. Bug?

Thread Tools

XmlDsigC14NTransform framework 1.0 vs 1.1. Bug?

A programmer
Posts: n/a

I have been using XmlDsigC14NTransform class and I am getting different
result with framework 1.1 and framework 1.0. It looks like the 1.1 version
handles newlines between elements differently - it replaces newline
charaacter (ASCII) 10 with escaped version - 

This means, that XML digital signatures, created with one version of the
framework are invalid with the other one!

Any ideas?


static byte[] CreateC14NXml()

XmlDsigC14NTransform t=new XmlDsigC14NTransform(false);
XmlDocument doc=new XmlDocument();

// load XML:

byte[] ret;
// copy output to byte array
using (Stream s=(Stream) t.GetOutput(typeof(Stream)))
ret=new byte[s.Length];
if (s.Read(ret,0,(int)s.Length)!=s.Length)
throw new Exception("Error while reading C14N stream!");
return ret;

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
delete .NET FRAMEWORK 1.1 before installing .NET FRAMEWORK 2 ???? moi ASP .Net 3 09-26-2008 02:19 PM
Installing 1.1 Framework and 2.0 Framework on the same web server Mark ASP .Net 4 11-17-2005 03:30 PM
spring framework versus struts framework Java 2 09-11-2005 09:54 PM
microsoft.public.dotnet.faqs,microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.windowsforms,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb Charles A. Lackman ASP .Net 1 12-08-2004 07:08 PM
COMInterop does not work in Framework 1.1 without Framework 1.0 Anatoly Volodko ASP .Net 1 08-14-2003 08:11 PM