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.
420
questions
0
votes
0
answers
31
views
SOAP SW-SECURITY SIGNATURE BINARY_TOKEN AND TIMESTAMP
hello i am developing a service for a SOAP call with x509 authentication and i need to sign the body and timestamp, but i can't get it to work java side while in SoapUI it does.
The error (with java ...
1
vote
1
answer
34
views
How to avoid " " (CR) in XMLSignature generated from webapp running on Tomcat 8.5 with JDK8
I'm experiencing a problem with java XMLSignature: when I try to generate the signature and then sign the XML file, an unwanted HTML-like Carriage Return (" ") is placed at then end ...
0
votes
0
answers
65
views
Validate the signature of a response from a web service with .net
I want to validate a signature with c# .net, I already have the Key.cert:
Response SOAP
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="...
2
votes
0
answers
41
views
C# - Cannot ComputeSignature() with mscorlib.dll
I have an app that used to allow users to sign XML files via USB token with their certificate within.
Some days ago, the company of the tokens updated their driver software (SafeNet Authentication ...
0
votes
1
answer
55
views
How to pass a signed image url in JSON, Fetch API, Django
I am having an issue with displaying images from the database when generating content dynamically using javascript and Fetch API. The images display correctly when accessing them with template tags.
I ...
0
votes
0
answers
24
views
SHA256 signature Method for XML files not working on Windows Server 2003
I use the some program on Windows Server 2003. The database is loaded into this program as an XML file. Everything worked correctly until the developers changed the XML signature from sha1 to sha256.
...
0
votes
1
answer
581
views
Why passport-saml can't find a signature - Invalid document signature
Why a signature can't be found?
I've checked the code during execution and saw that signatures was empty:
if (signatures.length !== 1) {
return false;
}
Because an ID from Response didn't match ...
0
votes
0
answers
37
views
ds:X509Certificate in signed xml
I have an xml file to sign digitally.
I have created a private key using
openssl ecparam -name secp256k1 -genkey -noout -out privatekey.pem
Generated a public key using
openssl ec -in privatekey.pem -...
0
votes
0
answers
200
views
Problem generating and verifying signature with signxml in python (namespaces and signature)
sorry for my english firstly. I'm taking my first steps with signxml in Python, and from the articles I've seen it looks quite easy to use, but I haven't been able to correctly sign the document as I ...
1
vote
1
answer
90
views
Why does Python cryptography and xmlsec1 produce different signatures
I am working on an integration with an xml based API. I am able to sign xml requests successfully using xmlsec1 like this...
xmlsec1 --sign --lax-key-search --privkey-pem test_privkey.pem,test_cert....
0
votes
0
answers
93
views
DotnNet6, extracting private key from an X509Certificate throws System.NotSupportedException: 'The certificate key algorithm is not supported.'
In a Dotnet6 console application, I'm trying to digitally sign an xml string using a p12 file. My code is as follows:
static System.Security.Cryptography.X509Certificates.X509Certificate2 ...
0
votes
0
answers
30
views
I need to sign a XML with a specific format, I have an example of what I should get but I'm not being able to replicate it
In the correct form of the file there are thee fields coming from the same .pfx certificate and ends with something like this:
<ds:X509Data>
<ds:X509Certificate>
MIIHYTCCBkmgAwIBA.....
1
vote
0
answers
173
views
How to add digital signature to SOAP request which has an attachment in java
I need to add a digital signature to the SOAP request which has an attachment. I have tried several methods using xmlsec-3.0.2.jar and javax.xml.crypto library. But none of them worked as expected.
...
0
votes
1
answer
156
views
How to set a Java digital signature to an XML DSIG DTO
I have a requirement to send a signed XML message via REST. The XSD contains the schema https://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd. I was able to successfully ...
0
votes
2
answers
777
views
Signature validation failed after formatting an XML with SignatureValue on it
From apache santuario xmlsignature test,
I do a test: add a signature to the XML file, then save it as a file, after that read it from that file, and verify the signature.
Please refer to the comments ...
0
votes
0
answers
137
views
How to sign soap message in Python and generate wss security header?
I would like to sign below soap message in python....and resultant message should have security headers as mentioned later.How can I achieve this?
<SOAP-ENV:Body xmlns:wsu="http://docs.oasis-...
0
votes
0
answers
125
views
Soap request signing
Hello fellow developers,
I have no experience working on soap, saml and xml signing,
I am trying to generate this structure and then add 2 signature tags to it.
<env:Envelope xmlns:env="http://...
0
votes
0
answers
457
views
Xmlsec - key is not found [ECDSA, DSA]
I am trying to sign an XML, I can successfully do this with RSA, but can't seem to sign it with ECDSA or DSA. For this example, I am trying ECDSA. Any help will be appreciated.
The error I am getting:
...
0
votes
0
answers
55
views
convert SignedXML to nodejs algorithm
I'm trying to pass a digital signature implementation in c# with nodejs, the implementation using native c# libraries is the only one that my provider supports, the current implementation is this.
...
1
vote
0
answers
153
views
XAdES external signing using client privateKey
I'm trying to digitally sign XML document using client-server signing.
The certificate is in a Workstation, I'm using a C# desktop app to read the certificates and do the signing with the private key.
...
1
vote
0
answers
151
views
XMLSigner - sign multiple references
I'm developing a digital signature system and I have a question about the XMLSigner library. I could not find my answer by looking at documentation, so I'm gonna ask here.
I have a XML file, which I ...
1
vote
1
answer
387
views
Signed payload is not valid when using signxml but xmlsec one is valid
Could you help me to find out why the two libraries (signxml and xmlsec) do not sign the same.
The signature accepted by the server is xmlsec.
Code sign signxml:
signer = XMLSigner(
method=methods....
0
votes
1
answer
116
views
What is getting signed in XML Signature (XMLDsig)?
I want to parse an XML-DSIG file and it's content. I've read on wikipedia about it's structure and a little of RFC. But I can't figure out some things, let's say this is an example XML-DSIG I got:
<...
1
vote
1
answer
505
views
Python: xmlsec.VerificationError: Signature is invalid Error, even after receiving HTTP 200 and successful response
I have the following code -
import os
import requests
import urllib3
from zeep import Client, Settings
from zeep.transports import Transport
from requests import Session
from requests_pkcs12 import ...
0
votes
1
answer
338
views
Adding Digital Signature to an XML Document - Error Bad UID
I'm trying a digital signature to xml file. This code is running asynchronous
ExecutorService executor = Executors.newFixedThreadPool(10);
When the code run a time then output exception:
javax.xml....
0
votes
1
answer
269
views
Python signxml XML signature package. Set signature id
I have an issue tryton to assign an Id to the ds:Signature tag. According to https://signxml.readthedocs.io/en/latest/
The SAML assertion schema specifies a location for the enveloped XML signature (...
1
vote
1
answer
96
views
How to refer certificate element from KeyInfo in Apache Santuario
I want to create a xml signature with Apache Santuario and KeyInfo should refer the certificate element(BinarySecurityToken) like below
<ds:KeyInfo Id="KI-FBB16D2886CB8FE58213384666945692"...
0
votes
1
answer
233
views
C# sign part of xml but can't verify in java
There is a cetificate and original.xml
when I try to sign full part of this xml(set url in Reference as ""), I can get the same result in C# and java.
but when I try to sign part of this ...
3
votes
3
answers
1k
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 required to validate the signed xml in the followign website validate XML. ...
0
votes
1
answer
292
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
554
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-...
1
vote
2
answers
681
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 ...
1
vote
1
answer
485
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 ...
1
vote
0
answers
387
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
1
answer
468
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
1k
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
1
answer
2k
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 ...
-1
votes
2
answers
326
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
159
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 "...
3
votes
1
answer
267
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:
&...
1
vote
0
answers
358
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&...
2
votes
2
answers
10k
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 ...
1
vote
1
answer
1k
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 ...
3
votes
0
answers
792
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
53
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
209
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
283
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
1k
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
1k
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
1k
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="...