Sign Soap Message from client certificate from UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Sign Soap Message from client certificate from UNIX
# 1  
Old 06-12-2014
Sign Soap Message from client certificate from UNIX

I have to call a webservice , I need to pass the static request from Unix which should have message signing details in the soap header . I am using cURL command for this. I do not have java , I need to do it through Unix only .
Below is the kind of Soap envelop I want to wrap around my request . Can you please tell me how do I create the parameters required for message signing from the pfx , .cer files that I have ? so that I can pass the same in my request

Code:
 <env:Envelope
xmlns:wsa="301 Moved Permanently"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> 
<env:Header> 
<wsse:Security env:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/...secext-1.0.xsd"
> 
<wsse:BinarySecurityToken ValueType="404 Not Found" EncodingType="404 Not Found" wsu:Id="BST-xEkpRht620EQD9YhIlTFAg22"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/...tility-1.0.xsd"
>MIICXTCCAcagAwIBAgIETg5IUzANBgkqhkiG9w0BAQUFADBzMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQVoxEDAOBgNVBAcTB1Bob2VuaXgxGTAXBgNVBAoTEEFtZXJpY2FuIEV4cHJlc3MxDTALBgNVBAsTBFVTSVQxGzAZBgNVBAMMElByb2Nlc3Nlc0V2ZW50c19FMTAeFw0xMTA3MDEyMjIxMDdaFw0xNDA2MzAyMjIxMDdaMHMxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJBWjEQMA4GA1UEBxMHUGhvZW5peDEZMBcGA1UEChMQQW1lcmljYW4gRXhwcmVzczENMAsGA1UECxMEVVNJVDEbMBkGA1UEAwwSUHJvY2Vzc2VzRXZlbnRzX0UxMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfKxu3kPEHnHmi6PS9c/zZxGKyUEH0ucWEllL9Yq+tckZ3SEAqiavu19w9Byk9Us+oVk2O0BW1x+1PRBGrYXvSdP8JlPn2Dr8tb1cH4G5Ndx3JZmigZHWBXBc+R6VDefoomZ5PpiBIFFqCc5NLoY8Ja2VOBoUKFJft/o6E2iwpyQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABKKdzFMfQIJK5LtZjjr6YFS5pkZeho1AjEVnCxoOcDAN2eQztvPCYG91MjVfW7WwfUGQVvRMjMQ3XJy0Ak6J2STc2O7KGDdpMBZFTshLe8t58I7lqaFZLYwfZWeGhAS8qWczcEIrhYqdW0QlvNUEkbpSxW1MYOqRiw0mTqGpdIo</wsse:BinarySecurityToken>
<dsig:Signature
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
> 
<dsig:SignedInfo> 
<dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<dsig:Reference URI="#Body-_1"> 
<dsig:Transforms> 
<dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>QMbxbIfmd2l6UD565LzcpNOUT8w=</dsig:DigestValue>
</dsig:Reference>
</dsig:SignedInfo>
<dsig:SignatureValue>X+5HYL1+U/zIkeM49N5gX0O4S/REqy7vyAFoEz/81TQfDITn0+7ELXMOziT2VSogUXWoFouLw03DjsdUHB1P4BsHbN6Zue+FPdgGSOLALBE1SX/VU1t6J5S74l0UQ4Uj9iBzLJRYymo18wBcU/aCbHQSj9QFS3jqbiJTcpblGd8=</dsig:SignatureValue>
<dsig:KeyInfo Id="KeyInfo-1w6eNWAMBixpw3kaVag0VA22"> 
<wsse:SecurityTokenReference> 
<wsse:Reference URI="#BST-xEkpRht620EQD9YhIlTFAg22" ValueType="404 Not Found" />
</wsse:SecurityTokenReference>
</dsig:KeyInfo>
</dsig:Signature>
</wsse:Security>
</env:Header>


Last edited by bakunin; 06-13-2014 at 03:49 AM.. Reason: changed IOCDE- to CODE-tags
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Python- Client and server certificate validation

Hello Team, I have to verify the Client server certificate validation in HTTPS request(SSL hand shake before the actual HTTPS post request), And tried various ways and failed to verify it successfully. here are the trials and errors, resp = requests.post(url, req, verify=True, timeout=5,... (0 Replies)
Discussion started by: chandana.hs
0 Replies

2. UNIX for Beginners Questions & Answers

How to install new certificate in HPUX client store?

We have a HPUX server that talks to a web service. We recently updated the web service certificate to a new SHA256 cert that has an updated intermediate cert. The HPUX server is now unable to connect because it cannot validate the cert chain due to it not having the new intermediate CA cert. I... (0 Replies)
Discussion started by: techmattr
0 Replies

3. UNIX for Advanced & Expert Users

Does vsftpd support user access with client certificate with priv/pub key + vsftpd certificate?

:rolleyes:I am trying to setup all certificate based client-server environment in Linux using vsftpd and curl with openssl. I would like to make a user access with vsftpd certificate and user own client certificate (self-signed) with private/public key. I don't see google posts about the my plan... (4 Replies)
Discussion started by: gogogo
4 Replies

4. UNIX for Dummies Questions & Answers

Calling a webservice and pass a client certificate

Hi, I am trying to call a http soap webservice using curl command , I have tried the below option but I am getting a failure . curl -H "Content-Type: text/xml; charset=utf-8" -H SOAPAction:" -d @Request.xml -X POST... (1 Reply)
Discussion started by: IshuGupta
1 Replies

5. Shell Programming and Scripting

SOAP Client server program

Hi, I have taken the below code from Quick Start with SOAP - Perl.com and modified to my requirement.Server program runs without error.I have kept Demo.pm under /usr/local/apache2/cgi-bin directory.When I run the client program I am not getting any output.Whether the client program should be... (1 Reply)
Discussion started by: liyakathali
1 Replies

6. Shell Programming and Scripting

Soap client script

Hi everybody, I`d llike to know if it is possible to create a script that call a specific soap method and collect the response time of this method. Can someone give some tips and examples ? Thank you so much ! (0 Replies)
Discussion started by: robdcb
0 Replies

7. Programming

SOAP Client..!

Hi, Can anybody provide me a simple SOAP client in C/C++ ..? Thanks in advance....!! (1 Reply)
Discussion started by: Kattoor
1 Replies

8. UNIX for Advanced & Expert Users

mod_ssl redirect to site if client does not have valid certificate

Hello! I have setup a site to which users authenticate against with openssl certificates. Everything works just fine, be I wish to be able to redirect to a error page with instructions instead of displaying the default error page that firefox displays. How to? I got nothing out of google...... (6 Replies)
Discussion started by: Esaia
6 Replies

9. Solaris

no SOAP encoding under unix?

Under Unix however we had many many many many problems. We had to use Ansi2utf8(), repstr() and XMLval() to prevent "Invalid token" errors. And because we didn't know what the raw XML result was, it allways was a big problem to find the cause of it. (0 Replies)
Discussion started by: devotedsinner
0 Replies

10. Shell Programming and Scripting

Making a SOAP call from within unix shell scripts

Hi guys, Is it possible to make SOAP calls from within Unix shell scripts? I need to access a web service from within UNIX in order to lookup something while I am doing some parsing on a file. Regards, Laud (2 Replies)
Discussion started by: Laud12345
2 Replies
Login or Register to Ask a Question