Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8075285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:56:25+00:00 2026-06-05T14:56:25+00:00

I am stucked at one place while writing a web service using wso2/php. I

  • 0

I am stucked at one place while writing a web service using wso2/php.
I want to use secure mtom.
While using either encryption or signing, how do I come to know which client’s public certificate to use in security token???
Or should I try matching with all present client public certificates?

I need to know, who the current user is. As the service is customer specific.
Please help…its urgent 🙂

Regards
Charanjeet Kaur

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:56:27+00:00Added an answer on June 5, 2026 at 2:56 pm

    I know it’s a bit late, but i’ve come across your same question. Somehow this is is a confusing topic, (maybe because of lack of precise documentation).
    When configuring the service by code (instead of using a policy file), you are quite limited. Here is what i found:

    When a client only signs a message, he attachs his certificate as a security token (wsse:binarysecuritytoken) in the header. The server takes that certificate and uses it to check the signature. So, you need to specify:

    in the client: client certificate and private key.

    in the service: service certificate and private key (takes client certificate from header).

    When a client signs and encrypts a message, the client encrypts with the server certificate and also sends his certificate along so that the server can check the signature and encrypt back. Here, the service uses the certificate from the header to encrypt the response. So, you only need to specify:

    in the client: client certificate and private key, and server certificate.

    in the server: server certificate and private key (takes client certificate from header).

    When the client only encrypts a message, he doesn’t send his certificate in the request, so you have to specify the client certificate in the service.

    in the client: client certificate and private key, and server certificate.

    in the server: server certificate and private key and client certificate.

    So, in the first to cases you dont need to specify your client’s certificate, and you can take it from the request header and do some further processing if you need to authenticate the user (may be check it against some pre-shared certificates). In the last case, I couldn’t find a way around (may be using xml policies).

    To retrieve the certificate in php you will need to deal with namespaces (the hardwired) code would be something like this (inside your reply function):

    $xml = simplexml_load_string($inMessage->outputHeaders[3]->str,  NULL, NULL, "http://schemas.xmlsoap.org/soap/envelope/");
    $ss= $xml->children("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")
        ->BinarySecurityToken;
    

    warning!! outputHeaders[3] is not a secure way to get the security header!! It’s just to show a simple way to get the client certificate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just stucked up to call the reference from one class to another class
I'm trying to find a way to place divs side by side without using
i am stucked in a problem and looking for help here. I want to
I have a bunch of UIViews stacked one upon the other(not nested). I want
i am stuckd in one place in my biztalk solution, i have an orchestraion
stucked with one problem that in my application i have one button which is
I'm developing a mobile site in HTML for use on 2 Blackberry models, one
I want to create 4 rectangles stacked to one row. |----|--|------|------------| The width of
I'm creating a stacked bar chart just like this one . Notice that the
Please tell me any one, how to kill previous stacked activity.My requirement is like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.