XML / SOAP PHP & C++

php , xml United States
  • 16 years ago
    The problem can be stated as follows:

    Windows application
    -------------------
    Automatically generates entire SOAP message. It uses the selected X509 certificate, (by default) signs the entire message body and adds the corresponding signature to the SOAP header.

    PHP application
    ---------------

    calls openssl_verify() using 3 parameters:

    data - the part of SOAP message that was signed
    signature - the corresponding signature
    public key - the public key from the X509 certificate

    All would seem 100% logical however when break things down problems start.

    What exactly is the 'data' that is signed. We need to know this so we can verify at server. Does it include nested tags or just their contents? Is it binary or base 64 encoded?

    Similarly with 'signature', we have found documentation stating under some circumstances it should be byte reversed because windows sends in wrong order, however we have no control over how signature is transmitted, this is done automatically by SOAP toolkit

    Finally, not sure that windows generated & PHP certificates are entirely compatible.

    Please note that I am aware that in theory all these questions are individually answerable but put together they provide a nightmare combination of variables to the first time soap visitor. Any help much appreciated.

    Thanks in advance!

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook