CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced: Re: [FishMonger] Trying to add a digital signature to an XML with XML::Sig: Edit Log



Zippy1970
Novice

Jan 31, 2014, 3:32 PM


Views: 26477
Re: [FishMonger] Trying to add a digital signature to an XML with XML::Sig

Well... I don't know.

It looks like XML::Sig is working... although I can't get it to work with my code so I can't be sure.

Like I said, I'm trying to digitally sign this:


Code
<DirectoryReq xmlns=" http://www.idealdesk.com/ideal/messages/mer-acq/3.3.1" version="3.3.1">  
<createDateTimestamp>2012-02-17T09:30:47.0Z</createDateTimestamp>
<Merchant>
<merchantID>100000001</merchantID>
<subID>1</subID>
</Merchant>
</DirectoryReq>


Now in order for XML::Sig->sign() to work (see: http://search.cpan.org/~byrne/XML-Sig-0.22/lib/XML/Sig.pm#METHODS, I need to add an ID:


Code
<DirectoryReq xmlns=" http://www.idealdesk.com/ideal/messages/mer-acq/3.3.1" ID="someID" version="3.3.1">  
<createDateTimestamp>2012-02-17T09:30:47.0Z</createDateTimestamp>
<Merchant>
<merchantID>100000001</merchantID>
<subID>1</subID>
</Merchant>
</DirectoryReq>


But the problem is, that changes what the bank expects and it returns the following error:


Code
        <errorMessage>Received XML not valid</errorMessage> 
<errorDetail>Field generating error: DirectoryReq xmlns="http:www.idealdesk.comidealmessagesmer-acq3.3.1" ID="DR" version="3.3.1"</errorDetail>


So I just hit another wall. I have no idea how to simply sign the entire XML.


(This post was edited by Zippy1970 on Jan 31, 2014, 3:35 PM)


Edit Log:
Post edited by Zippy1970 (Novice) on Jan 31, 2014, 3:34 PM
Post edited by Zippy1970 (Novice) on Jan 31, 2014, 3:35 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives