[xmlsec] KeyValue by MsCrypto
=?gb2312?B?Sqi5cmdlbiBIZWlzcw==?=
jheiss at Mesonic.com
Fri Aug 25 03:16:16 PDT 2006
I replace the URI how you told me.
<dsig:Reference URI=3D"#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=3DxmlSecXPathDataExecute:file=3D..\src\xpath.c:line=3D273:obj=3Dunkn=
own:subj=3DxmlXPt
rEval:error=3D5:libxml2 library function =
failed:expr=3Dxpointer(id('eb:Invoice'))
func=3DxmlSecXPathDataListExecute:file=3D..\src\xpath.c:line=3D356:obj=3D=
unknown:subj=3Dxm
lSecXPathDataExecute:error=3D1:xmlsec library function failed:
func=3DxmlSecTransformXPathExecute:file=3D..\src\xpath.c:line=3D466:obj=3D=
xpointer:subj=3D
xmlSecXPathDataExecute:error=3D1:xmlsec library function failed:
func=3DxmlSecTransformDefaultPushXml:file=3D..\src\transforms.c:line=3D23=
71:obj=3Dxpoint
er:subj=3DxmlSecTransformExecute:error=3D1:xmlsec library function =
failed:
func=3DxmlSecTransformCtxXmlExecute:file=3D..\src\transforms.c:line=3D120=
7:obj=3Dunknown
:subj=3DxmlSecTransformPushXml:error=3D1:xmlsec library function =
failed:transform=3Dxp
ointer
func=3DxmlSecTransformCtxExecute:file=3D..\src\transforms.c:line=3D1267:o=
bj=3Dunknown:su
bj=3DxmlSecTransformCtxXmlExecute:error=3D1:xmlsec library function =
failed:
func=3DxmlSecDSigReferenceCtxProcessNode:file=3D..\src\xmldsig.c:line=3D1=
568:obj=3Dunkno
wn:subj=3DxmlSecTransformCtxExecute:error=3D1:xmlsec library function =
failed:
func=3DxmlSecDSigCtxProcessSignedInfoNode:file=3D..\src\xmldsig.c:line=3D=
804:obj=3Dunkno
wn:subj=3DxmlSecDSigReferenceCtxProcessNode:error=3D1:xmlsec library =
function failed
:node=3DReference
func=3DxmlSecDSigCtxProcessSignatureNode:file=3D..\src\xmldsig.c:line=3D5=
47:obj=3Dunknow
n:subj=3DxmlSecDSigCtxProcessSignedInfoNode:error=3D1:xmlsec library =
function failed
:
func=3DxmlSecDSigCtxSign:file=3D..\src\xmldsig.c:line=3D303:obj=3Dunknown=
:subj=3DxmlSecDSi
gCtxSigantureProcessNode:error=3D1:xmlsec library function failed:
Error: signature failed
Error: failed to sign file "d:\xmlsigner\in\new.xml"=20
-----Original Message-----
From: Alexandre Kalendarev [mailto:akalend at mail.ru]=20
Sent: Freitag, 25. August 2006 12:07
To: J=A8=B9rgen Heiss
Subject: Re: [xmlsec] KeyValue by MsCrypto
Hi J=A7=BFrgen,
I think, that the element <dsig:Reference URI=3D""> have error =
reference URI.
You must have the URI=3D"#eb:Invoice".
Alexandre
-----Original Message-----
From: J=A7=BFrgen Heiss <jheiss at Mesonic.com>
To: <xmlsec at aleksey.com>
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.
>=20
> <dsig:KeyValue>
> <dsig:RSAKeyValue>
> <dsig:Modulus></dsig:Modulus>
> <dsig:Exponent></dsig:Exponent>
> </dsig:RSAKeyValue>
> </dsig:KeyValue>
>=20
> With this tags the verification in openssl work too.
>=20
> But still I have the problem that I don't know how to fill this tags!
>=20
> When I try to sign this with the command line tool (openssl) I got an =
error.
>=20
> <error >
> D:\XMLSec\libxmlsec-1.2.8.win32\bin>xmlsec --sign --crypto openssl=20
> --output d:\x mlsigner\out\ssl.xml d:\xmlsigner\in\new.xml=20
> =
func=3DxmlSecKeysMngrGetKey:file=3D..\src\keys.c:line=3D1364:obj=3Dunknow=
n:sub
> j=3DxmlSecKe ysMngrFindKey:error=3D1:xmlsec library function failed:
> =
func=3DxmlSecDSigCtxProcessKeyInfoNode:file=3D..\src\xmldsig.c:line=3D871=
:obj=3Dunknown:
> subj=3Dunknown:error=3D45:key is not found:
> =
func=3DxmlSecDSigCtxProcessSignatureNode:file=3D..\src\xmldsig.c:line=3D5=
65:
> obj=3Dunknow n:subj=3DxmlSecDSigCtxProcessKeyInfoNode:error=3D1:xmlsec =
> library function failed:
> =
func=3DxmlSecDSigCtxSign:file=3D..\src\xmldsig.c:line=3D303:obj=3Dunknown=
:subj
> =3DxmlSecDSi gCtxSigantureProcessNode:error=3D1:xmlsec library =
function=20
> failed:
> Error: signature failed
> Error: failed to sign file "d:\xmlsigner\in\new.xml"
>=20
> When I sign with mscrypto it works but the tag(KeyValue) are empty.
>=20
>=20
> <The File I want to sign>
>=20
> <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?> <eb:Invoice=20
> xmlns:eb=3D"http://www.ebinterface.at/schema/2p0/" =
xmlns:dsig=3D"http://www.w3.org/2000/09/xmldsig#" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =
xsi:schemaLocation=3D"http://www.ebinterface.at/schema/2p0/ =
http://www.ebinterface.at/schema/2p0/Invoice.xsd" =
eb:Cancellation=3D"false" eb:GeneratingSystem=3D"MESONIC WINLine 8.4 =
(Build 1112)">
> <dsig:Signature xmlns:dsig=3D"http://www.w3.org/2000/09/xmldsig#">
> <dsig:SignedInfo>
> <dsig:CanonicalizationMethod =
Algorithm=3D"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
> <dsig:SignatureMethod =
Algorithm=3D"http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
> <dsig:Reference URI=3D"">
> <dsig:Transforms>
> <dsig:Transform =
Algorithm=3D"http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
> </dsig:Transforms>
> <dsig:DigestMethod =
Algorithm=3D"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>
> .....
> .....
> ...
>=20
>=20
> Thanks for any help.
>=20
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec
>=20
More information about the xmlsec
mailing list