Hi all, i make template (this template is correct when using envelope and is <Reference> )
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI="file://h:/xmlsec/src/data.xml"> <Transforms> <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> </Transforms> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue/> </Reference> </SignedInfo> <SignatureValue/> <KeyInfo> <X509Data> <X509Certificate/> </X509Data> </KeyInfo> </Signature> and sign correct command (in the template with null URI attr <Reference>): H:\xmlsec\src> xmlsec sign --output output.xml --privkey-pem:sec rsakey.pem,rsacert.pem test_tpl.xml I have errors: func=xmlSecTransformInputURIOpen:file=..\src\io.c:line=423:obj=input-uri:subj=opencallback:error=7:io I think, the open uri from local disk (URI="file://h:/xmlsec/src/data.xml" ) unsupported. Alexandre Kalendarev -----Original Message----- From: JЭrgen Heiss <[EMAIL PROTECTED]> To: "Alexandre Kalendarev" <[EMAIL PROTECTED]>,<[email protected]> Date: Wed, 12 Apr 2006 13:49:49 +0200 Subject: RE: [xmlsec] Help by References > Does no one have any Ideas? > > -----Original Message----- > From: JЭrgen Heiss > Sent: Mittwoch, 12. April 2006 11:53 > To: 'Alexandre Kalendarev'; [email protected] > Subject: RE: [xmlsec] Help by References > > Sorry this was an posting mistake from my side ;o( It look like this. > > <?xml version="1.0" encoding="UTF-8"?> > <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="file:///D:/invoice.xml"> > <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></dsig:KeyName> > <dsig:X509Data> > > <dsig:X509Certificate></dsig:X509Certificate><dsig:X509SubjectName></dsig:X509SubjectName><dsig:X509IssuerSerial></dsig:X509IssuerSerial> > </dsig:X509Data> > </dsig:KeyInfo> > </dsig:Signature> > > And I get the following errors when I use the command line tool. > > > D:\XMLSec\libxmlsec-1.2.8.win32\bin>xmlsec sign --crypto mscrypto > D:\XMLSec\libxmlsec-1.2.8.win32\bin\rechnung.xml > func=xmlSecTransformEnvelopedExecute:file=..\src\enveloped.c:line=108:obj=enveloped-signature:subj=unknown:error=34:same > document is required for transform > : ;last error=0 (0x00000000);last error msg=The operation completed > successfully. > > func=xmlSecTransformDefaultPushXml:file=..\src\transforms.c:line=2371:obj=enveloped-signature:subj=xmlSecTransformExecute:error=1:xmlsec > library function f > ailed: ;last error=0 (0x00000000);last error msg=The operation completed > successfully. > > func=xmlSecParserPushBin:file=..\src\parser.c:line=222:obj=xml-parser:subj=xmlSecTransformPushXml:error=1:xmlsec > library function failed: ;last error=0 (0x 00000000);last error msg=The > operation completed successfully. > > func=xmlSecTransformPump:file=..\src\transforms.c:line=1634:obj=xml-parser:subj=xmlSecTransformPushBin:error=1:xmlsec > library function failed: ;last error= 0 (0x00000000);last error msg=The > operation completed successfully. > > func=xmlSecTransformCtxUriExecute:file=..\src\transforms.c:line=1160:obj=unknown:subj=xmlSecTransformPump:error=1:xmlsec > library function failed:uri=file:/ //D:/invoice.xml;last error=0 > (0x00000000);last error msg=The operation completed successfully. > > func=xmlSecTransformCtxExecute:file=..\src\transforms.c:line=1280:obj=unknown:subj=xmlSecTransformCtxUriExecute:error=1:xmlsec > library function failed: ;la st error=0 (0x00000000);last error msg=The > operation completed successfully. > > func=xmlSecDSigReferenceCtxProcessNode:file=..\src\xmldsig.c:line=1568:obj=unknown:subj=xmlSecTransformCtxExecute:error=1:xmlsec > library function failed: ; last error=0 (0x00000000);last error msg=The > operation completed successfully. > > func=xmlSecDSigCtxProcessSignedInfoNode:file=..\src\xmldsig.c:line=804:obj=unknown:subj=xmlSecDSigReferenceCtxProcessNode:error=1:xmlsec > library function f ailed:node=Reference;last error=0 (0x00000000);last error > msg=The operation completed successfully. > > func=xmlSecDSigCtxProcessSignatureNode:file=..\src\xmldsig.c:line=547:obj=unknown:subj=xmlSecDSigCtxProcessSignedInfoNode:error=1:xmlsec > library function f > ailed: ;last error=0 (0x00000000);last error msg=The operation completed > successfully. > > func=xmlSecDSigCtxSign:file=..\src\xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec > library function failed: ;last erro r=0 (0x00000000);last error msg=The > operation completed successfully. > > Error: signature failed > Error: failed to sign file "D:\XMLSec\libxmlsec-1.2.8.win32\bin\rechnung.xml" > > > > Any Ideas? > Thanks for any help > > JЭrgen > > > > > _______________________________________________ xmlsec mailing list [email protected] http://www.aleksey.com/mailman/listinfo/xmlsec
