I have problem with signing XML Document. I need to sign external (detached) document like it’s made in this url : https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.xml.signedxml.computesignature?view=net-5.0 This example works in my code but, my xml document is secured by JWT and TLS certificate so when I try computeSignature I reach exception “cannot create secured ssl/tls channel” :/ I had similar error when i tried create get request on the server and when i attached tls certificate problem solved. Unfortunetly I don’t have idea how can I attach jwt token and tls in this case (in sign mechanism) :/
Signing detached xml secured by jwt and tls
138 Views Asked by Daxter44 At
1
There are 1 best solutions below
Related Questions in .NET
- Does compiler optimize operation on const variable and literal const number?
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- Deleting Orphans with Fluent NHibernate
- IOrderedEnumerable to vb.net IOrderedEnumerable Conversion
- What is this namespace ITypeOfObjectsBoundToListBox ? Couldn't find it
- .net rest service with JSON string and consumed with java client
- What is best way to check if any of the property of object is null or empty?
- Telerik's WPF RadColorPicker NoColorText property not working
- Possible consequences of duplicate ProgId for different classes
- How are multiple requests to Task.Run handled from a resource management standpoint?
- Optimizing C++ call from C#
- Make a per-web-application object available to Web API and SignalR controllers
- System.ComponentModel.DataAnnotations.Schema namespace conflict
- LINQ Except/Distinct based on few columns only, to not add duplicates
- Not displaying content by its URL string - absolute urls
Related Questions in XML
- Impose component restriction to a series of parsys-CQ
- Wrong xml being inflated android
- Shorten the XSD
- Writing/Overwriting to specific XML file from ASP.NET code behind
- Magento custom block. Can't get block's file
- Layout not shifting up when keyboard is open
- CSV to XML XSLT: How to quote excape
- Getting deeply embedded XML element values
- Saving FileSystemInfo Array to File
- how to apply templates within xsl:for-each
- Spring - configure Jboss Intros for xml with java config?
- Problems with implementing custom actionbar android
- Can Apache Ant be told to cache its XML files?
- Is Log4j2 xml configuration case sensitive?
- How to get a specific node value in XML Pull Parser
Related Questions in SSL
- How to Fix TLS CBC Incorrect Padding Abuse Vulnerability on Windows 2003 Server
- SSL: Error parsing the certificate: Ok
- PHP mysqlnd sha256_password plugin "Access denied", user works from cli mysql
- CFNetwork SSLHandshake failed iOS 9
- Java does not accept 2 methods with same name
- Expected Compatibility Issues with upcoming TLS/SSL Cipher Suite update on Azure WebApps?
- python requests SSLError
- Connecting via mutual SSL fails reading incoming changeCipherSpec
- HTTP to HTTPS mapping using proxy servers
- Ruby on Windows XP: How to change directory of SSL certificates
- KeyStore file is not found in jar, although present in jar
- How do I accept a self-signed SSL certificate using iOS 7's NSURLSession
- Chef remote_file from https site with self signed certificate
- Meteor force-ssl on a staging system without ssl cert?
- Use python SSL to download google.com.au page
Related Questions in XADES
- Digital signature on Local IIS vs IIS Express. XAdES
- Can I use ECDSA certificate to generate signature with xades4j?
- Chilkat - Delphi DLL - XADES - CkXmlDSigGen_AddExternalTextRef
- C#- How to sign certificate XML document without URI attribute on <Reference> tag?
- .NET XAdES Signing throws CryptographicException
- Is it possible to strip the content from the enveloped XaDES signature to get the detached signature
- Convert enveloped XaDES to detached
- XAdES creation with manual signature entry
- XADES Signature Verification
- XAdES external signing using client privateKey
- C# method CheckSignature returns false for valid XAdES signed document
- How to sign xml with XAdES4j, and reference URI (#DatosEmision)?
- XAdES validation fails with Reference URI="" for document with stylesheet processing instruction
- Append XML with XAdES-T Timestamp Response (TSR)
- Signing detached xml secured by jwt and tls
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
So... after some hour of work i found some solution. Problem is in System.Security.Cryptography.Xml Reference class. In this class when reference is to some external xml, method GetHash make simple GET request and you cant sign Your own resolver. unfortunately i cant edit System.Security.Cryptography .dll. BUT i can edit Medicom.XADES, so in method BuildDigestedReferences i need to comment this line : //object m_containingDocument = SignedXml_m_containingDocument.GetValue(this); //Reference_UpdateHashValue.Invoke(reference2, new object[] { m_containingDocument, refList });
And prepare my own DigestValue for reference :
Where GetHashXML(Reference reference) is method which make request to external (secured by ssl/tls ) xml, and then compute SHA256 hash and return its value by BYTE to reference2.DigestValue