xml-dsig

Java & XMLDSig: Reference with no URI

橙三吉。 提交于 2021-02-18 19:32:53
问题 I'm trying to sign some text using XMLDSig with javax.xml.crypto.dsig.* package. I need to make a reference to some content being signed. And according to project requirements this reference should not have any URI, it means not <Reference URI="">...</Reference>, but <Reference>...</Reference>. I haven't found any info whether it is possible and correct, but requirement says that XMLDSig allows such references, maximum one per signature. Have someone faced the same problem? What can be done

Java & XMLDSig: Reference with no URI

ぃ、小莉子 提交于 2021-02-18 19:32:08
问题 I'm trying to sign some text using XMLDSig with javax.xml.crypto.dsig.* package. I need to make a reference to some content being signed. And according to project requirements this reference should not have any URI, it means not <Reference URI="">...</Reference>, but <Reference>...</Reference>. I haven't found any info whether it is possible and correct, but requirement says that XMLDSig allows such references, maximum one per signature. Have someone faced the same problem? What can be done

digitally sign XML file with PHP

谁说我不能喝 提交于 2020-01-23 16:52:33
问题 I need to sign a XML file with a private RSA key to be verified with my C# application. When I sign the xml with my C# application, this is the final output: <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> <Reference URI=""> <Transforms> <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"

digitally sign XML file with PHP

点点圈 提交于 2020-01-23 16:50:07
问题 I need to sign a XML file with a private RSA key to be verified with my C# application. When I sign the xml with my C# application, this is the final output: <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> <Reference URI=""> <Transforms> <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"

Xsd2Code and xmldsig

為{幸葍}努か 提交于 2019-12-24 10:34:06
问题 I have a problem with generating code from xsd with Xsd2Code. The xsd looks like this: <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:ns1="urn:oasis:names:specification:ubl:schema:xsd:CountryIdentificationCode-1.0" xmlns:ns2="urn:oasis:names:specification:ubl:schema:xsd:LocationIdentificationCode-1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:import namespace="http:/

Verify XMLDSIG chain in .NET?

允我心安 提交于 2019-12-19 10:15:11
问题 I'm using XMLDSIG to sign a configuration file. I'd like my CA to be able to issue keys that can be used to sign XML. I'd then like to verify that the XML was signed with a key issued by my CA. How do I get the signing certificate out of the SignedXml object? How do I follow the certificate chain back to a specific CA? Note that the public key for my CA will be stored in my executable, rather than the certificate store. 回答1: To attach arbitrary certificates to an XML-DSIG file, add an

XML Relationship Transform Algorithm

ぃ、小莉子 提交于 2019-12-12 17:32:33
问题 I'm trying to validate a MS Word *.docx file with digital signature. In order to do validation, i have to calculate digest of referenced nodes and to check if it is same as one given in the signature (sig1.xml). I can't find info about how ti implement relationship transformation in order to calculate that digest. the part of signature XML (sig1.xml) is as follows: <Object Id="idPackageObject" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature"> <Manifest><Reference

How to sign only specific part of XML

无人久伴 提交于 2019-12-12 08:06:47
问题 I am trying to do some XML Signature by signing only parts of the xml however after much searching I have not been able to find a solution. I am using java to sign an XML using Xpath2 transform and EXCLUSIVE canonicalization. If I have the following XML <?xml version="1.0" encoding="UTF-8"?> <msg xmlns="http://someaddress/ad/m1" xmlns:ns1="http://someotheraddres/ad/m2" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#"> <header> <id>wsfrwerwerwer</id> <name>addr</name> <somenode> <trace>ND</trace

What exactly to digest and sign on XMLDSIG and how? (or, OSX-native client mismatches XMLDSIG calculated on server)

我的未来我决定 提交于 2019-12-11 12:26:29
问题 I'm trying to sign a xml document following XMLDSIG specification with an enveloped signature, sha1 digest and rss-sha1 signature, and the server keeps returning a "297 - Rejection: Signature does not match calculated [result]" ("297 - Rejeicao: Assinatura difere do calculado" in Brazilian Portuguese original) My client application needs to be Mac OS X native (so Objective-C and Swift). I'm adhering to Apple's CryptoCompatibility guidelines and using Security.framework's SecSignTransform and

WCF - SignedXml.CheckSignature failing on signed soap body

杀马特。学长 韩版系。学妹 提交于 2019-12-11 12:05:52
问题 I'm trying to validate a signature on a signed SOAP message. (Just to get this out of the way, I have no control at all over the message I'm receiving) The Body of the message is signed and sent over by a Java appliance. The SignedXml.CheckSignature method fails but I'm certain that the message I'm receiving is correct. relevant bit: Dim sdoc As New SignedXml(doc) Dim nodeList As XmlNodeList = doc.GetElementsByTagName("Signature", "http://www.w3.org/2000/09/xmldsig#") sdoc.LoadXml(CType