Hi,

I got the updated file and after a slight change (I don't have cleanURIEscapes)
I have tested it and everything is now working fine

        Thanks, Vin

> -----Original Message-----
> From: Berin Lautenbach [mailto:[EMAIL PROTECTED]
> Sent: 29 May 2005 01:10
> To: security-dev@xml.apache.org
> Subject: Re: URI resolution problem
> 
> 
> Hmm.  We use XMLUri from Xerces, so I wonder if the behaviour 
> might have 
> changed a bit there as well.  Either way, we also updated the URI 
> handling in xsec as it did not behave correctly in a number 
> of instances.
> 
> Anyway - I have patched the Generic resolver to look for hostname="". 
> Are you able to test CVS?
> 
> Cheers,
>       Berin
> 
> Vincent Finn wrote:
> > Hi,
> > 
> > It is a file URI
> > It has the following values
> > fScheme=(0x03a73778)"file"
> > fHost=(0x03a737c0)""
> > 
> fPath=(0x03a73b58)"/C:/DOCUME~1/vincent/LOCALS~1/Temp/Temporar
> yDALMLDocument.xml"
> > 
> > I have included the xml document as well
> > 
> > Hope it helps
> > 
> >     Vin
> > 
> > 
> >>-----Original Message-----
> >>From: Berin Lautenbach [mailto:[EMAIL PROTECTED]
> >>Sent: 26 May 2005 12:25
> >>To: security-dev@xml.apache.org
> >>Subject: Re: URI resolution problem
> >>
> >>
> >>Vincent,
> >>
> >>What kind of URI is this?  Can you give us a sample XML file?
> >>
> >>Cheers,
> >>    Berin
> >>
> >>Vincent Finn wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>I have what I hope is a simple problem
> >>>
> >>>I have recently upgraded to xsec 1.1
> >>>
> >>>My call to sign() now fails
> >>>I traced the code and it fails in 
> >>
> >>XSECURIResolverGenericWin32::resolveURI()
> >>
> >>>The reason it fails is because it thinks the URI is not to 
> >>
> >>a localhost
> >>
> >>>The reason for this is that xmluri->getHost() returns "" not NULL
> >>>
> >>>I have got it to work again by changing the if statement to 
> >>>if (xmluri->getHost() == NULL || 
> >>>   !XMLString::compareIString(xmluri->getHost(), 
> >>
> >>XMLUni::fgLocalHostString) || 
> >>
> >>>   !XMLString::compareIString(xmluri->getHost(), L"")) {
> >>>
> >>>Any idea what might be causing this?
> >>>The code for creating the resolver is below
> >>>
> >>>I am using VC7 if that makes a difference
> >>>
> >>>   Thanks, Vin
> >>>
> >>>//////////////////////////////////////////////////////////////
> >>>// setting the URI
> >>>char baseURI_[(MAX_PATH * 2) + 10]; \
> >>>strcpy(baseURI_, "file:///"); \
> >>> \
> >>>char acTempPath_[MAX_PATH]; \
> >>>::GetTempPath(MAX_PATH, acTempPath_); \
> >>>strcat(baseURI_, acTempPath_); \
> >>> \
> >>>/* need to replace '\' with '/' */ \
> >>>for (size_t i_ = 0; i_ < strlen(baseURI_); ++i_) \
> >>>{ \
> >>>   if ('\\' == baseURI_[i_]) \
> >>>   { \
> >>>           baseURI_[i_] = '/'; \
> >>>   } \
> >>>} \
> >>> \
> >>>XMLUri uri_(MAKE_UNICODE_STRING(baseURI_)); \
> >>>XSECURIResolverGenericWin32 theResolver_; \
> >>>theResolver_.setBaseURI(uri_.getUriText()); \
> >>>Sig->setURIResolver(&theResolver_);
> >>>
> >>>
> >>
> > 
> > 
> > 
> --------------------------------------------------------------
> ----------
> > 
> > <?xml version="1.0" encoding="UTF-16" standalone="no" 
> ?><Start><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
> > <ds:SignedInfo>
> > <ds:CanonicalizationMethod 
> Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#Wit
> hComments"/>
> > <ds:SignatureMethod 
> Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>
> > <ds:Reference URI="TemporaryDALMLDocument.xml">
> > <ds:DigestMethod 
> Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
> > <ds:DigestValue>Not yet calculated</ds:DigestValue>
> > </ds:Reference>
> > </ds:SignedInfo>
> > <ds:SignatureValue>Not yet signed</ds:SignatureValue>
> > </ds:Signature></Start>
> 

Reply via email to