You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Andrzej Matejko <an...@pro.onet.pl> on 2004/06/23 00:14:32 UTC

Detached signature - reference (URI) coding.

Hi,

Problem:
  How to encode non-ascii characters in URI that is used in reference?
Description:
  I create detached signature. Reference is pointing to some file on
disk. This file name contains nonascii characters.
  According to w3c XML Base recommendation
(http://www.w3.org/TR/xmlbase/#escaping) this characters should be utf8
converted and 'escaped' (using %). So, before calling createReference I
convert reference (utf8 and escape).
  Unfortunatelly, cleanURIEscapes from xsecdomutils.cpp (which is called
by calculateHash() in sign()) does not convert this characters from utf8
back to 'original' code. (it simply concatenat codes - lines 653 and
654)?
  Is it a bug or am I complicating it too much :)). Maybe I should not
convert nonascii characters using utf8?
  
 
Looking for help,
 andrzeJ


Re: Detached signature - reference (URI) coding.

Posted by Berin Lautenbach <be...@wingsofhermes.org>.
Andrzej,

I *think* this is a bug, but I'm open to suggestions.  I suspect the 
library should convert back to local code page?

But what happens if the filename on disk is in UTF-8?

Open to suggestions on this one :>.

Cheers,
	Berin

Andrzej Matejko wrote:

> Hi,
> 
> Problem:
>   How to encode non-ascii characters in URI that is used in reference?
> Description:
>   I create detached signature. Reference is pointing to some file on
> disk. This file name contains nonascii characters.
>   According to w3c XML Base recommendation
> (http://www.w3.org/TR/xmlbase/#escaping) this characters should be utf8
> converted and 'escaped' (using %). So, before calling createReference I
> convert reference (utf8 and escape).
>   Unfortunatelly, cleanURIEscapes from xsecdomutils.cpp (which is called
> by calculateHash() in sign()) does not convert this characters from utf8
> back to 'original' code. (it simply concatenat codes - lines 653 and
> 654)?
>   Is it a bug or am I complicating it too much :)). Maybe I should not
> convert nonascii characters using utf8?
>   
>  
> Looking for help,
>  andrzeJ
> 
> 
>