I replace the URI how you told me.
<dsig:Reference URI="#eb:Invoice">
But still I can't sign ;o(
D:\XMLSec\libxmlsec-1.2.8.win32\bin>xmlsec --sign --crypto openssl --output d:\x
mlsigner\out\crypto.xml d:\xmlsigner\in\new.xml
func=xmlSecXPathDataExecute:file=..\src\xpath.c:line=273:obj=unknown:subj=xmlXPt
rEval:error=5:libxml2 library function failed:expr=xpointer(id('eb:Invoice'))
func=xmlSecXPathDataListExecute:file=..\src\xpath.c:line=356:obj=unknown:subj=xm
lSecXPathDataExecute:error=1:xmlsec library function failed:
func=xmlSecTransformXPathExecute:file=..\src\xpath.c:line=466:obj=xpointer:subj=
xmlSecXPathDataExecute:error=1:xmlsec library function failed:
func=xmlSecTransformDefaultPushXml:file=..\src\transforms.c:line=2371:obj=xpoint
er:subj=xmlSecTransformExecute:error=1:xmlsec library function failed:
func=xmlSecTransformCtxXmlExecute:file=..\src\transforms.c:line=1207:obj=unknown
:subj=xmlSecTransformPushXml:error=1:xmlsec library function failed:transform=xp
ointer
func=xmlSecTransformCtxExecute:file=..\src\transforms.c:line=1267:obj=unknown:su
bj=xmlSecTransformCtxXmlExecute:error=1:xmlsec library function failed:
func=xmlSecDSigReferenceCtxProcessNode:file=..\src\xmldsig.c:line=1568:obj=unkno
wn:subj=xmlSecTransformCtxExecute:error=1:xmlsec library function failed:
func=xmlSecDSigCtxProcessSignedInfoNode:file=..\src\xmldsig.c:line=804:obj=unkno
wn:subj=xmlSecDSigReferenceCtxProcessNode:error=1:xmlsec library function failed
:node=Reference
func=xmlSecDSigCtxProcessSignatureNode:file=..\src\xmldsig.c:line=547:obj=unknow
n:subj=xmlSecDSigCtxProcessSignedInfoNode:error=1:xmlsec library function failed
:
func=xmlSecDSigCtxSign:file=..\src\xmldsig.c:line=303:obj=unknown:subj=xmlSecDSi
gCtxSigantureProcessNode:error=1:xmlsec library function failed:
Error: signature failed
Error: failed to sign file "d:\xmlsigner\in\new.xml"
-----Original Message-----
From: Alexandre Kalendarev [mailto:[EMAIL PROTECTED]
Sent: Freitag, 25. August 2006 12:07
To: Jürgen Heiss
Subject: Re: [xmlsec] KeyValue by MsCrypto
Hi JЭrgen,
I think, that the element <dsig:Reference URI=""> have error reference URI.
You must have the URI="#eb:Invoice".
Alexandre
-----Original Message-----
From: JЭrgen Heiss <[EMAIL PROTECTED]>
To: <[email protected]>
Date: Fri, 25 Aug 2006 11:28:46 +0200
Subject: [xmlsec] KeyValue by MsCrypto
> I sign my File by using an template.
> I till now works fine with mscrypto. But when I try to verify the files with
> openSSL.
> I got an Error. After debugging I found out that the problems are some
> missing tags.
>
> <dsig:KeyValue>
> <dsig:RSAKeyValue>
> <dsig:Modulus></dsig:Modulus>
> <dsig:Exponent></dsig:Exponent>
> </dsig:RSAKeyValue>
> </dsig:KeyValue>
>
> With this tags the verification in openssl work too.
>
> But still I have the problem that I don't know how to fill this tags!
>
> When I try to sign this with the command line tool (openssl) I got an error.
>
> <error >
> D:\XMLSec\libxmlsec-1.2.8.win32\bin>xmlsec --sign --crypto openssl
> --output d:\x mlsigner\out\ssl.xml d:\xmlsigner\in\new.xml
> func=xmlSecKeysMngrGetKey:file=..\src\keys.c:line=1364:obj=unknown:sub
> j=xmlSecKe ysMngrFindKey:error=1:xmlsec library function failed:
> func=xmlSecDSigCtxProcessKeyInfoNode:file=..\src\xmldsig.c:line=871:obj=unknown:
> subj=unknown:error=45:key is not found:
> func=xmlSecDSigCtxProcessSignatureNode:file=..\src\xmldsig.c:line=565:
> obj=unknow n:subj=xmlSecDSigCtxProcessKeyInfoNode:error=1:xmlsec
> library function failed:
> func=xmlSecDSigCtxSign:file=..\src\xmldsig.c:line=303:obj=unknown:subj
> =xmlSecDSi gCtxSigantureProcessNode:error=1:xmlsec library function
> failed:
> Error: signature failed
> Error: failed to sign file "d:\xmlsigner\in\new.xml"
>
> When I sign with mscrypto it works but the tag(KeyValue) are empty.
>
>
> <The File I want to sign>
>
> <?xml version="1.0" encoding="ISO-8859-1"?> <eb:Invoice
> xmlns:eb="http://www.ebinterface.at/schema/2p0/"
> xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.ebinterface.at/schema/2p0/
> http://www.ebinterface.at/schema/2p0/Invoice.xsd" eb:Cancellation="false"
> eb:GeneratingSystem="MESONIC WINLine 8.4 (Build 1112)">
> <dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
> <dsig:SignedInfo>
> <dsig:CanonicalizationMethod
> Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
> <dsig:SignatureMethod
> Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
> <dsig:Reference URI="">
> <dsig:Transforms>
> <dsig:Transform
> Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
> </dsig:Transforms>
> <dsig:DigestMethod
> Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
> <dsig:DigestValue></dsig:DigestValue>
> </dsig:Reference>
> </dsig:SignedInfo>
> <dsig:SignatureValue></dsig:SignatureValue>
> <dsig:KeyInfo>
> <dsig:KeyName>SomeBody</dsig:KeyName>
> <dsig:KeyValue>
> <dsig:RSAKeyValue>
> <dsig:Modulus></dsig:Modulus>
> <dsig:Exponent></dsig:Exponent>
> </dsig:RSAKeyValue>
> </dsig:KeyValue>
> <dsig:X509Data>
> </dsig:X509Data>
> </dsig:KeyInfo>
> </dsig:Signature>
> .....
> .....
> ...
>
>
> Thanks for any help.
>
> _______________________________________________
> xmlsec mailing list
> [email protected]
> http://www.aleksey.com/mailman/listinfo/xmlsec
>
_______________________________________________
xmlsec mailing list
[email protected]
http://www.aleksey.com/mailman/listinfo/xmlsec