473,320 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

XML-signature with XPath

Hi!

I have a problem signing a XML-document. I need to sign a subnode of a
document. So I need to refer to this subnode from within my signature. But
how can I do that with XPath?

I tried the following, but I couldn't verify it using an online-verifier
(http://www.aleksey.com/xmlsec/xmldsig-verifier.html).
Could anybody please help me with that reference? Thanx a lot!
And here's my document:

<?xml version="1.0" encoding="UTF-8"?>

<Request xmlns="http://...">
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo><ds:CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<ds:Reference URI="">
<ds:Transforms>
<ds:Transform
Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath
xmlns:msg="http://...">/Request[1]/msg:Message[1]</ds:XPath>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"
/>
<ds:DigestValue>uT3v+Iq3LQUxokKorQq4xrNL5HI=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>...</ds:SignatureValue>
<ds:KeyInfo>
<ds:KeyValue>
<ds:RSAKeyValue>
<ds:Modulus>...</ds:Modulus>
<ds:Exponent>AQAB</ds:Exponent>
</ds:RSAKeyValue>
</ds:KeyValue>
</ds:KeyInfo>
</ds:Signature>

<Message xmlns:msg="...">
Hello
</Message>

</Request>
Jul 20 '05 #1
0 1613

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

Similar topics

0
by: Phil Powell | last post by:
// PROCESS XML CONTENT INTO DYNAMICALLY-NAMED ARRAYS foreach (array('mime', 'state', 'country') as $val) { $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);...
8
by: Robert J Egan | last post by:
Hi i'm trying to search a remote website page. The form returns xml information, though the page extension is missing. I retrieve the information and write it to the screen. So far so good -...
1
by: felipe_azv | last post by:
a got this code in asp to construct a xml , to export it to a url this is de asp code: <% SQL = "Select * from User where CodeUser in ("& request.form("C1" &")" set rs =...
2
by: Simon Strandgaard | last post by:
I am trying to understand how to create a 'catalog.xml' file for my docbook-xml documents. If I understand correct a local catalog.xml file can both avoid hardcoding in makefiles (portability),...
0
by: MarionEll | last post by:
Premier XML Industry Event Slated for Dec. 7-12 in Philadelphia; Presenters Include Adobe, BEA, Microsoft, IBM, Sun, Hewlett-Packard, Oracle Alexandria, Va. Sept. 30, 2003 - IDEAlliance, a...
0
by: Stylus Studio | last post by:
World's Most Advanced XML Schema Editor Adds Support for IBM AlphaWorks XML Schema Quality Checker to Improve XML Schema Style and Quality BEDFORD, MA -- 09/13/2005 -- Stylus Studio...
0
by: jts2077 | last post by:
I am trying to create a large nested XML object using E4X methods. The problem is the, the XML I am trying to create can only have xmlns set at the top 2 element levels. Such as: <store ...
0
by: UncleRic | last post by:
Environment: Mac OS X (10.4.10) on MacBook Pro I'm a Perl Neophyte. I've downloaded the XML::Parser module and am attempting to install it in my working directory (referenced via PERL5LIB env): ...
9
by: Lie | last post by:
Why this generates AttributeError, then not? Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) on linux2 Type "help", "copyright", "credits" or "license" for more information. Traceback (most...
10
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I had a program and it always works fine and suddenly it gives me the following message when a pass a xml file to our server program: error code: -1072896680 reason: XML document must...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.