Hi Aleksey,

I'm using xmlsec downloaded from Zlatkovic's page on Win7/64 bit

I have problem to sign some xml (in attachement) from command line.

xmlsec --sign --id-attr:Id signXmlId --output.xml --pkcs12 cert.pfx --pwd
pwd input.xml
returns
expr=xpointer(id('signXmlId'))

xmlsec --sign --id-attr:Id RacunZahtjev --output.xml --pkcs12 cert.pfx
--pwd pwd input.xml
signs xml but output.xml does not have valid signature.

Certificate is tested with another tool and it's working fine on same xml.

Please can you tell me what I'm missing.

BR
Nenad

PS: Please don't point me to FAQ section 3.2 if possible :-)
<?xml version="1.0" encoding="UTF-8"?>
<tns:RacunZahtjev xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:tns="http://www.apis-it.hr/fin/2012/types/f73"; Id="signXmlId">
<tns:Zaglavlje>
<tns:IdPoruke>8c8d77ea-7463-4d13-bfc2-239688a26566</tns:IdPoruke>
<tns:DatumVrijeme>22.10.2012T15:29:46</tns:DatumVrijeme>
</tns:Zaglavlje>
<tns:Racun>
<tns:Oib>10101218551</tns:Oib>
<tns:USustPdv>true</tns:USustPdv>
<tns:DatVrijeme>22.10.2012T15:29:46</tns:DatVrijeme>
<tns:OznSlijed>P</tns:OznSlijed>
<tns:BrRac>
<tns:BrOznRac>12345678900</tns:BrOznRac>
<tns:OznPosPr>POSL2</tns:OznPosPr>
<tns:OznNapUr>1</tns:OznNapUr>
</tns:BrRac>
<tns:Pdv>
<tns:Porez>
<tns:Stopa>25.00</tns:Stopa>
<tns:Osnovica>10.00</tns:Osnovica>
<tns:Iznos>2.50</tns:Iznos>
</tns:Porez>
<tns:Porez>
<tns:Stopa>10.00</tns:Stopa>
<tns:Osnovica>10.00</tns:Osnovica>
<tns:Iznos>1.00</tns:Iznos>
</tns:Porez>
<tns:Porez>
<tns:Stopa>0.00</tns:Stopa>
<tns:Osnovica>10.00</tns:Osnovica>
<tns:Iznos>0.00</tns:Iznos>
</tns:Porez>
</tns:Pdv>
<tns:Pnp>
<tns:Porez>
<tns:Stopa>3.00</tns:Stopa>
<tns:Osnovica>10.00</tns:Osnovica>
<tns:Iznos>0.30</tns:Iznos>
</tns:Porez>
</tns:Pnp>
<tns:OstaliPor>
<tns:Porez>
<tns:Naziv>Porez na luksuz</tns:Naziv>
<tns:Stopa>15.00</tns:Stopa>
<tns:Osnovica>10.00</tns:Osnovica>
<tns:Iznos>1.50</tns:Iznos>
</tns:Porez>
</tns:OstaliPor>
<tns:IznosOslobPdv>12.00</tns:IznosOslobPdv>
<tns:IznosMarza>13.00</tns:IznosMarza>
<tns:IznosNePodlOpor>100.00</tns:IznosNePodlOpor>
<tns:Naknade>
<tns:Naknada>
<tns:NazivN>Povratna naknada</tns:NazivN>
<tns:IznosN>1.00</tns:IznosN>
</tns:Naknada>
</tns:Naknade>
<tns:IznosUkupno>145.68</tns:IznosUkupno>
<tns:NacinPlac>K</tns:NacinPlac>
<tns:OibOper>01234567890</tns:OibOper>
<tns:ZastKod>8c7de36c3cc62be2189bf417ed4ceee9</tns:ZastKod>
<tns:NakDost>false</tns:NakDost>
<tns:ParagonBrRac>9123/458/5</tns:ParagonBrRac>
</tns:Racun>
<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="#signXmlId">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"; />
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />
<DigestValue></DigestValue>
</Reference>
</SignedInfo>
<SignatureValue></SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate></X509Certificate>
<X509IssuerName></X509IssuerName>
<X509SerialNumber></X509SerialNumber>
</X509Data>
</KeyInfo>
</Signature>
</tns:RacunZahtjev>
_______________________________________________
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec

Reply via email to