[Xml-compile] WSSE example: referencing the body data to be encoded

Karen Etheridge perl at froods.org
Tue Sep 25 23:43:25 GMT 2012


Regarding the WSSE example in XML::Compile::WSS, i.e.:
https://metacpan.org/source/MARKOV/XML-Compile-WSS-0.911/examples/wsse/write_example.pl
...which generates a document like
http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/com.ibm.cics.ts31.doc/dfhws/wsSecurity/dfhws_soapsigning.htm

My understanding is that the content of the ds:Signature element is an
encoded-and-signed representation of the contents of the ds:SignedInfo
element, which in turn contains an encoded-and-signed representation of the
Body element (I hope I got that mostly right).  Indeed, in
write_example.pl, we see that $security references $signature, which
references $the_body.

What I'm not sure about is what bits in these data structures I replace
with my real body structure - do I simply replace the 'tic tac toe' string
with a hashref containing my body parameters?  e.g.:

    my $body_params = {
       body_key1 => 'body_val1',
       # ... more data here, etc..
    };

    my $the_body =
      { URI             => '#TheBody'
      , ...
      # , ds_DigestValue  => 'tic tac toe'  # original
      , ds_DigestValue  => $body_params,
      };

    # ... more code snipped...

    my ($data, $trace) = $getVersion->(
      wsse_Security => $security,
      %other_headers,
      %$body_params,
    );

Or should I be referencing the body data in some other way?

thanks muchly,
Karen Etheridge
ether at cpan.org



More information about the Xml-compile mailing list