Questions tagged [xml-signature]
XML Signatures provide integrity, message authentication, and/or signer authentication services for data of any type, whether located within the XML that includes the signature or elsewhere.
401
questions
0
votes
0
answers
16
views
Remove "ds:" in signed XML tree namespace in python's signxml
I am working with Python's lxml and signxml to generate an xml file and sign it with a pem certificate and private key. I am also required to validate the signed xml file with an XSD file.
I will not ...
0
votes
0
answers
14
views
How to canonicalize and digest the Body of SOAP with xmlib2
I am trying to sign manually a SOAP request. Using libxml2 in my cpp app I can canonicalize and digest the whole xml soap document using the xmlC14NDocDumpMemory function with xmlNodeSetPtr as null ...
0
votes
1
answer
94
views
How to validate Aadhaar XML signature in Python?
I'm trying to do XML signature validation.
Here is the link to Aadhaar Paperless Offline e-kyc tutorial https://uidai.gov.in/ecosystem/authentication-devices-documents/about-aadhaar-paperless-offline-...
0
votes
1
answer
74
views
How to verify aadhar XML signature with the help of public key certificate in Java?
I am working on Aadhaar Paperless Offline e-kyc, trying to validate aadhaar XML signature using public key certificate. But I'm not sure is this the right way to do. Below is the java code for the ...
0
votes
0
answers
42
views
Why is my signed XML getting rejected by authorization?
I'm trying to create a signed XML post request. The XML needs to be sent in the body of the request.
The signing needs to have the following:
The digest needs to have inclusive canonicalization ...
0
votes
0
answers
36
views
On verify XAdES TBES signature the excepion "invalid token signature" is thrown
I'm making simple sign and verify XAdES TBES java methods but I'm getting the error. I reproduced the same issue in xades4j library test methods. Method SignerTTest -> ...
0
votes
0
answers
34
views
Verifying Xml Signature gives me "Cannot find Reference in Manifest"
I'm trying to verify my XML signature but when making the XMLSignature object it gives me "Cannot find Reference in Manifest".
Here's my signing and verification methods.
private void sign(...
1
vote
0
answers
49
views
golang/goxmldig - Signed element verification failed
I am trying to sign a xml file in Golang. I have used goxmldig to create the digital signature. I am unable to sign any document except very simple elements without any child in etree. I have used the ...
0
votes
0
answers
73
views
What is difference between RawECDSA and NoneWithECDSA signature algorithm
I'm searching for a perfect answer what is the basic difference between "RawECDSA" and "NoneWithECDSA" signature algorithm. At glance I did not see any difference between them, as ...
0
votes
1
answer
131
views
how sign correctly xml python using signxml?
Hi everybody i'm trying create and sign xml from json data.
I retrieve my object as json from this i create the xml with my xsd file.
when i sign at the output file i can't see (this is empty on my ...
0
votes
0
answers
56
views
XML Signature verification failure
I'm working on retrieving XML data from a pdf file and then further verifying it with the help of a provided certificate. I'm using fitz to extract the text and signxml to verify the data.
PDF FILE
...
0
votes
0
answers
11
views
SignedXml with a reference URI that isn't Id [duplicate]
According to the EBICS specification parts of the sent XML must be signed like this:
<?xml version="1.0" encoding="UTF-8"?>
<ebicsRequest
xmlns="urn:org:ebics:H005&...
0
votes
1
answer
184
views
SAML failed to verify signature
I am using PySaml2 to implement a SAML service provider.
When I receive a payload (base64 SAMLResponse), my server fails to accept it with an error SignatureError('Failed to verify signature').
The ...
0
votes
0
answers
77
views
Package for signing XML in Dart/Flutter?
I am creating an app that needs to send Digitally Signed XMLs as the body for an http request.
Unfortunately, I can't find a package that can sign an XML on Pub.
Is there such a package available?
If ...
0
votes
0
answers
241
views
SIgning document with XAdes-BES in python2
I'm trying to sign a document using python2 version o XAdes and XMLSIG. I wan't to sign said document with Xades-BES standard.
What's I'm doing is the following
def get_signature(self, root, cert_file,...
-1
votes
1
answer
60
views
Signing XML Document with Timestamp
I am in the process of setting up a service allowing to sign XML documents, for that I use the JAVA XmlSignature class.
My question is how I can add a timestamp token to this signature ?
1
vote
0
answers
89
views
How to generate a "Partial Xml Signature" (ie the content of the SignedInfo tag)?
I need to generate a "partial XML Signature" message.
To summarize, when we need to sign one kind of XML document, we create a digested "partial XML Signature" message, this "...
0
votes
0
answers
95
views
How do I get "SignatureValue" and the "DigestValue" values for my SOAP message?
I'm new at soap and I'm trying to send a SOAP message via SoapUI, I was able to obtain the private and public key from the key pair from a self-signed certificate (.pfx file), I used this page for ...
3
votes
1
answer
74
views
Xml Signature in Java but only on elements where attribute authenticate='true'
I have been able to sign and verify my XML signature when using Apache Santuario, but now I want to only apply the signature to fields where the attribute authenticate="true"
For example:
&...
0
votes
0
answers
19
views
Is there a way to use other algorithms in XMLCipher rather than aes and rsa?
I'm working on a project that encrypt and sign a soap message ,i need to change the alogrithms to sm2 and sm4 ,but the XML Sercurity standard doesn't support those alogrithms .I've been working on it ...
1
vote
0
answers
176
views
How to Sign Just a part of XML File - Java XMLSignature - But was well-up error
I'm just trying to digital sign a part of an XML.
The XML to sign is like this:
<Invoice>
<DataInvoice Id="data">
----
</DataInvoice>
<DataSignature&...
1
vote
2
answers
2k
views
In SAML Response should we sign Response or Assertion
When returning SAML Response to SP, most IdP like AzureAD, Okta, Onelogin, GSuite have the following options about signature:
sign Response
sign Assertion
sign Response and Assertion
And without any ...
0
votes
1
answer
440
views
How to configure SignedXML to sign XML document with prefixes and other ceremonies?
I need to sign XML documents with a cert, using .NET Core and SignedXml, but I don't know how to configure some of the elements expected by the other side in the signature tag. I've checked many ...
2
votes
0
answers
388
views
How to create a CADES-BES PKCS#7 signed message in c# with a precomputed signature?
I am using key Vault HSM to compute the signature. However i need a CADES-BES PKCS#7 structure to contain the signature .
I tried using CMS Signer library, however CMS Signer need private key, but in ...
1
vote
0
answers
29
views
Error in KeyGenerator Java Xml Digital Signature
public static void main(String[] args) {
String data1 = "Test Data";
KeyGenerator kgen = KeyGenerator.getInstance("AES"); //Line 34
kgen.init(256);
SecretKey key =...
2
votes
0
answers
109
views
Python signxml custom namespace
I am trying to change the namespace that signxml creates when I sign an xml document in python. currently it signs the signature with ds: and I would like to change it to dsig:
I am using
signed_root =...
0
votes
1
answer
72
views
Why sending certificates again in SAML request/response if they were already exchanged via IdP/SP metadata?
Just wondering, in SAML SSO, the SP can include its certificates in the SAML request, and the IdP can include its certificates in the SAML response/assertion, so they can verify the signatures of the ...
0
votes
1
answer
606
views
python - xml signature validation is getting fails
I have generated private key and public cert using the openssl command:
openssl req -x509 -newkey rsa:4096 -keyout private_key.pem -out public_cert.pem -nodes -days 1460 -subj "/C=YOURCOUNTRY/O=...
1
vote
1
answer
409
views
Calculating SignatureValue from SignedInfo using RSACryptoServiceProvider
I am new to XML digital signing topic. After reading some tutorials, I decided to do some hands-on activity and tried to follow some examples to improve my understanding. There's one particular point ...
0
votes
0
answers
532
views
How to verify the digital signature of downloaded xml file in java
I have an XML file, given below
<OfflinePaperlessKyc referenceId="686820201209011401091">
<UidData>
<Poi dob="21-01-1945" e="...
1
vote
0
answers
139
views
Wrong DigestValue: "Hash values do not match" XML with PHP
I am trying to sign an XML file and in all the requests I make I get the error "Hash values do not match."
This is my XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap....
0
votes
0
answers
649
views
How to set the Digest and Signature Method for XmlDsigEnvelopedSignatureTransform
I'm currently trying to sign an xml document using a provided p12 file, and I've managed to sign it I suppose, but after sending the document via SOAP, the response I always get is "Invalid ...
0
votes
1
answer
75
views
CXF JAX-RS how to sign XML message (using XAdES-T)
I am trying to build REST service using Apache CXF.
One of the requirement is to sign XML using XAdES-T standard.
I was going over
jax-rs-xml-security
and made it to sign XML document.
How can I add a ...
1
vote
1
answer
306
views
C# signing a xml document with out using System.Security.Cryptography.Xml
Is there a way to sign a Xml file with out using classes form System.Security.Cryptography.Xml ?
Can the SignedXml.ComputeSignature() functionality be realized with a "manual" implementation ...
1
vote
0
answers
519
views
Unsupported Signature Method sha256-rsa-MGF1 for XML digital signature validation
I'm doing XML digital signature validation, but the algorithm SHA256WITHRSAANDMGF1 is not supported.
Here's the related part in XML file:
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/...
6
votes
1
answer
787
views
Configure TSA in Xml Signature in C#
I am trying to sign an XML file in C# using Signature Class library by Microsoft.
What I have done is like this-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
...
0
votes
1
answer
57
views
Producing xml-signature with windows line-break running in LINUX
First of all, sorry for my poor English!!
I have to digitally sign some XML documents to send to Chilean SII, including in them the Digital Signature. When I'm developing under JAVA in Windows, I can ...
1
vote
0
answers
116
views
XML signature to validate/verify with .cer (public key) in Android
I need some help to validate my XML signature to .cer(public key).
Basically this process happened for the offline ekyc verification on government-issued id card.
regarding sample of xml and .cert ...
0
votes
1
answer
199
views
How to convet XML file to string properly?
I have an XML signature verification code below:
public static boolean isXmlDigitalSignatureValid(String xmlString) throws Exception {
boolean validFlag = false;
String pubicKeyFilePath = &...
0
votes
1
answer
225
views
What are the security implications of sending SAML assertions unsigned?
I don't have much knowledge about SAML so can someone tell me what is the purpose of signing SAML assertions and what are the security implications of not having them signed.
0
votes
1
answer
206
views
how to read line without skipping end of line character in java using buffered reader [closed]
I am using BufferedReader object to read line from HTTP server through FileInputStream. readline() function returns a line skipping end of line character. But my requirement need to read full ...
0
votes
0
answers
138
views
[Error in Signature Verification]:Signature length not correct: got 780 but was expecting 256
Requirement :
Program will have an xml file as input with 3 tags: , and All these data are Base64 encoded.
Program needs to decode them and verify the data for its authenticity using the signature ...
0
votes
1
answer
91
views
XML namespace location after canonical form
Does turning XML into its Canonical involve the process of moving common/repeated XML namespaces in an XML document into a parent XML node?
The W3 XML specification for the C14N11 transform in ...
0
votes
1
answer
2k
views
Python signxml XML signature package. How to add xml placehoder for Signature tag?
I am new to Python. I have installed signxml package and I am doing xml signature process.
Link to python package : https://pypi.org/project/signxml/
My xml file is getting generated. However XML ...
3
votes
0
answers
1k
views
`com.sun.org.slf4j.internal.Logger` in JDK and wrong usage
When dealing with XMLSignature generation and verification I had to debug and came across strange logging behavior (I would call it bugs, but maybe I don't have the full picture).
The logger access ...
4
votes
1
answer
634
views
Unable to create the correct signature for SAML response
I am using go-saml library in our project to enable SSO in which the service provider will be Salesforce and Identity Provider will be the Golang code. Golang code will first verify the user then it ...
5
votes
1
answer
888
views
Receiving side failing to validate signed XML message
I'm trying to sign some XML with C# according to the spec sheet laid out to us for our test application. We have to:
Canonicalize the message.
Use the Digest algorithm to create digest of the entire ...
2
votes
1
answer
858
views
XML Signature validation failing in some messages and passing on others
I have a java application that checks in with a .NET server for licensing purposes. The licensing server responds with signed xml. For some messages the Java application fails to validate the ...
0
votes
1
answer
123
views
signedXml.LoadXml((XmlElement)nodeList[0]); returns Malformed SignedInfo/Reference
I've been developing this console application for about close to 2-3 months now.
What I'm trying to achieve from the console application is to generate data files and sign the files into a "signature....
0
votes
1
answer
260
views
XML Schema Definition (XSD) for XML files
How can I check whether a XML file uses a XML Schema Definition (XSD)? For example, if you decompress a signed odt file (LibreOffice or OpenOffice text document), in the directory META-INF is the ...