xml-signature

Xml signing with remote applet devices

偶尔善良 提交于 2019-12-11 19:03:13
问题 All files are stored in the cloud system. The average size of file 200MB.Very large size of the files.Also Usb token on the client side. I don't want to transfer entire file from the server to client. I just want to sign the hash of the file on the client side. How can I do this with the xades4j library? 回答1: I'm not sure I fully understood, but here are some ideas: Make the file accessible via HTTP. Xade4j (actually, the underlying Apache Santuario) already supports HTTP data object

Sign Pdf Using ITextSharp and XML Signature

守給你的承諾、 提交于 2019-12-11 15:21:53
问题 I am trying to sing a pdf using a remote web service which returns a XML signature that consists of PKCS#1 signature with end users certificate. I need to use this signature to sign pdf via IText deferred signing because the web service works asynchronously . All the IText examples uses PKCS#7 message format but I am not sure what should I do for XML signature. Code That Adds Empty Signature Field and Gets Signable Bytes of Pdf public static string GetBytesToSign(string unsignedPdf, string

Malformed reference element signing a xml file of bills

人走茶凉 提交于 2019-12-11 05:38:57
问题 I'm developing a program to digitally sign invoices in xml. I followed this guide https://www.profissionaisti.com.br/2010/07/assinando-digitalmente-um-xml-usando-c/#comment-197297. However, i'm getting an error Malformed reference element. The code is : static void Main(string[] args) { //open certificates of current user var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); store.Open(OpenFlags.ReadOnly); //Open screen to choose certificate var selectedCertificate =

Problem with conversion of org.dom4j.Document to org.w3c.dom.Document and XML Signature

限于喜欢 提交于 2019-12-10 13:06:24
问题 I have some classes that already use DOM4J to read XML files and provide getter methods to the data. Now, I need to add the possibility of checking XML digital signatures. Using org.w3c.dom and following http://java.sun.com/developer/technicalArticles/xml/dig_signature_api/ everything works correctly. So, I try to use DOMWriter to convert from org.dom4j.Document to org.w3c.dom.Document, but after this the signature validation doesn't work. I think it happens because DOMWiter is changing the

XSLT transform in xmlsignature form, a part of xmldocument?

陌路散爱 提交于 2019-12-09 07:59:27
问题 I have a HTML page(A Form) where user will enter his details. Details to enter are Name age salary state City Now when user enters all details and click Button then I will create xml file containing the user details like <root> <name>abc</name> <age>40</age> <salary>20000</age> <state>xyz</state> <city>abc</city> </root> After this I want to sign this xml file using XMLSignature . I want to sign only two elements of document i.e name and salary element using XSLT transform and some digest and

How To Use XmlDsigC14NTransform Class in C#

亡梦爱人 提交于 2019-12-06 03:26:33
问题 I am trying to canonicalize an xml node by using System.Security.Cryptography.Xml.XMLDsigC14nTransform class of c# .net Framework 2.0. The instance expects three different input types, NodeList, Stream and XMLDocument. I try the transform with all of these input types but I get different results. What I really want to do is to canonicalize a single node, but as you can see in the output file, the output does not contain any of the inner xml. Any suggestions about the proper way to

In a WCF Client How Can I add SAML 2.0 assertion to SOAP Header?

旧巷老猫 提交于 2019-12-04 12:20:42
I'm trying to add the saml 2.0 assertion node from the soap header example below - I came across the samlassertion type in the .net framework but that looks like it is only for saml 1.1. <S:Header> <To xmlns="http://www.w3.org/2005/08/addressing">https://rs1.greenwaymedical.com:8181/CONNECTGateway/EntityService/NhincProxyXDRRequestSecured</To> <Action xmlns="http://www.w3.org/2005/08/addressing">tns:ProvideAndRegisterDocumentSet-bRequest_Request</Action> <ReplyTo xmlns="http://www.w3.org/2005/08/addressing"> <Address>http://www.w3.org/2005/08/addressing/anonymous</Address> </ReplyTo>

'SignatureMethod' Algorithm vs. 'DigestMethod' Algorithm in XML Signature

独自空忆成欢 提交于 2019-12-04 12:19:55
问题 If we take the following Signature element as an example: <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> <ds:Reference URI="#_884D49DAD03AD60748547F8322C11AA0"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /> <ds:Transform Algorithm="http://www.w3.org/2001

Getting “WS Security Header in the message is invalid.” when calling ACAGetTransmitterBulkRequestStatus

大兔子大兔子 提交于 2019-12-03 21:35:43
I've been able to make successfull call to first ACA web service and I thought, that getting status would be a breeze. Bo-o-oy how I have been wrong! I've used same settings for the status service as I did for the submit one... and I got "WS Security header is invalid error!" What gives?!?! Signature generation code is the same as I been using for submission! I would appreciate if any one would be able shed some light what possibly is wrong here? I am aware, that following tags should be digitally signed(and I do signed them): ACABusinessHeader ACABulkRequestTransmitterStatusDetailRequest

How to sign only specific part of XML

北战南征 提交于 2019-12-03 13:39:34
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> </somenode> </header> <payload><ns0:addr xmlns:ns0="http://someaddres/ad/m3"><ns2:data xmlns:ns2=