473,837 Members | 1,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

digital signature on resources and element

AK
Hello,

Is it possible to sign resources pointed to from an xml doc and the
element that contains those urls at the same time?

This is the xml:

<osfm:assets name="">
<osfm:asset media-type="text/xml" name="META-INF/
Container.xml" />
<osfm:asset media-type="text/xml" name="META-INF/
Manifest.xml" / >
<osfm:asset media-type="text/xml" name="META-INF/
Metadata.xml" / >
</osfm:assets>

So, after hashing those three files I would also like to hash the
osfm:assets element, but I can't find a way to do that without
creating a new SignedXml object, which then means I've got two
signatures. Does anyone know if I can add the element here as well?

This is the code so far:

public void hashAssets(XmlD ocument Doc, RSA Key)
{
// Create a SignedXml object
SignedXml signedXml = new SignedXml(Doc);

// Add the key
signedXml.Signi ngKey = Key;

// Get urls to assets with signed = true
assetUris = getAssetUris();

foreach (string assetUri in assetUris)
{
// Create a reference to be signed
Reference reference = new Reference();
reference.Uri = assetUri;

//// Add an enveloped transformation to the reference
//XmlDsigEnvelope dSignatureTrans form env = new
XmlDsigEnvelope dSignatureTrans form();
//reference.AddTr ansform(env);

// Add the reference to the SignedXml object
signedXml.AddRe ference(referen ce);
}
// This is where I would like to hash the xml element
XmlElement assetElement =
Doc.GetElements ByTagName("osfm :assets")[0]
as XmlElement;
// Compute the signature
signedXml.Compu teSignature();

// Get the XML representation of the signature and save it to
an
XmlElement object
XmlElement xmlDigitalSigna ture = signedXml.GetXm l();

// Append the element to the XML document

Doc.DocumentEle ment.AppendChil d(Doc.ImportNod e(xmlDigitalSig nature,
true));
}

Is this information enough to help solve the problem, or is there
something else I can do to better explain it?

Many thanks,

AK
Nov 6 '08 #1
0 1046

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1161
by: Kim H Madsen | last post by:
I have created a .Net Service that is sending mails using SMTP Server/Exchange Server how do i put in a Digital Signature so the reciver is 100% sure that the mail i from the owner of Server where the Service is running ? It should worke something lige Outlook does it you type in your secret password and Outlook together with the code create a Mail with digital signature Thank Ki If I have to use another way of sending mails to use...
2
3775
by: Targa | last post by:
Can anyone point me to resources relating to web based signature capture? I'm working on an ASP application that will be used on mobile tablet PCs. I need to add the ability for someone to sign their name on the screen and then have it converted to an image (.gif/.jpg/.png) for printng & storage. Is this even possible with a web application? Any suggestion greatly appreciated!
7
7654
by: Guangxi Wu | last post by:
Hi all, Happy New Year. I am using SignedXML and an X509 certificate to digitally sign a SOAP message body and put the signature in the SOAP header for a B2B business application. Can you suggest which type of digital certificates from VeriSign is for this purpose? I checked VeriSign's web site but didn't find it obvious to decide.
5
4834
by: John Campbell | last post by:
Hi everyone I've been doing my best to understand the specifics of implimentating XML Digital Signatures, but I seem to be missing a fundamental concept. Let me start with a description of the problem I am trying to solve. In my application, people send an XML file that contains data for loans. The application then takes that data and performs various calculations returning the results in an XML file that combines both the initial data and...
2
10315
by: S. Baumann | last post by:
Hello, I use a code very similar to that found in the MSDN sample attached to the class XmlDsigEnvelopedSignatureTransform (code attached below). The code works fine and produces somethink like <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod
1
3694
by: Marco Moioli | last post by:
Hi, I have a problem with a X509 digital signature. I want to sign a Word 2003 document saved in .xml format. the problem is that after the signature, Word 2003 don't want to open the document. If I apply a standard W3C signature to an Xml file wrote in Word 2003 I obtain: <?mso-application progid="Word.Document"?> <w:wordDocument
2
3681
by: Martin Høst Normark | last post by:
Hi everyone Has anyone got the least experience in integrating the Digital Signature with an ASP.NET Web Application? Here in Denmark, as I supose in many other countries, they're promoting the digital signature. A lot of people already has one, to do their taxes, and much more. I have to use for a business-to-business e-commerce solution, where it's vital that the right user is being logged on, and not give his username and password...
1
6245
by: claudia_usa | last post by:
Hello, Does anyone know how to include the signature field when creating PDF crystal reports with VB.net? Our intension is to allow the user to generate the report with their digital signature included or at least with the signature field available within Adobe Reader so that it can be signed independently with Reader. Is there an SDK, plug-in or license that we need?
0
1120
by: AK | last post by:
Hello, Is it possible to sign resources pointed to from an xml doc and the element that contains those urls at the same time? This is the xml: <osfm:assets name=""> <osfm:asset media-type="text/xml" name="META-INF/ Container.xml" />
0
9682
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10564
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10621
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9396
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6998
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5668
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.