Aleksey Sanin wrote: > Bingo! "CN=Jiří Novák" is *not* UTF8 encoding. This is > why you got these errors from LibXML2 parser. You need > to either manually convert the string to UTF8 (e.g. using > iconv) or simply specify the native code page (wild guess, > it is 1250 or 1252).
I'm confused. Are you talking about XML file with signature template?
What else should I do then just safe file in UTF-8 and provide correct
encoding declaration at the top of the file?
I have attached real document I have used for testing, so you can see
that it is properly encoded in UTF-8. I'm also attaching exported key,
password is "test".
Thanks,
Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: [email protected] http://xmlguru.cz
------------------------------------------------------------------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------
jannovak.pfx
Description: application/pkcs12
<?xml version="1.0" encoding="utf-8"?> <Invoice xmlns="http://isdoc.cz/namespace/invoice"> <foo>bar</foo> <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"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference URI=""> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <ds:DigestValue></ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue> </ds:SignatureValue> <ds:KeyInfo> <ds:KeyName>CN=JiÅà Novák</ds:KeyName> <ds:X509Data> <ds:X509Certificate/> </ds:X509Data> </ds:KeyInfo> </ds:Signature></Invoice>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ xmlsec mailing list [email protected] http://www.aleksey.com/mailman/listinfo/xmlsec
