Google Groups Home Help | Sign in
OpenSSL , SOAP4R
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Ze Maria  
View profile
 More options Feb 22 2007, 7:48 am
Newsgroups: comp.lang.ruby
From: Ze Maria <zemari...@gmail.com>
Date: Thu, 22 Feb 2007 21:48:01 +0900
Local: Thurs, Feb 22 2007 7:48 am
Subject: OpenSSL , SOAP4R
Hi guys,
Does someone knows how to use certificates with SOAP::WSDLDriverFactory
?
for example, to generate a driver from a url like:
https://some.com/something.wsl

Tks in advance
Ze Maria

--
Posted via http://www.ruby-forum.com/.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin Mazzi  
View profile
 More options Feb 22 2007, 3:52 pm
Newsgroups: comp.lang.ruby
From: Justin Mazzi <jma...@gmail.com>
Date: Fri, 23 Feb 2007 05:52:43 +0900
Local: Thurs, Feb 22 2007 3:52 pm
Subject: Re: OpenSSL , SOAP4R

Ze Maria wrote:
> Hi guys,
> Does someone knows how to use certificates with SOAP::WSDLDriverFactory
> ?
> for example, to generate a driver from a url like:
> https://some.com/something.wsl

> Tks in advance
> Ze Maria

If you don't have the CA, you can do:

server.options["protocol.http.ssl_config.verify_mode"] = nil

Or are you referring to use CERTS to authenticate?

--
Posted via http://www.ruby-forum.com/.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ze Maria  
View profile
 More options Feb 23 2007, 5:08 am
Newsgroups: comp.lang.ruby
From: Ze Maria <zemari...@gmail.com>
Date: Fri, 23 Feb 2007 19:08:12 +0900
Local: Fri, Feb 23 2007 5:08 am
Subject: Re: OpenSSL , SOAP4R

if the certificate (.crt) , I don't understanding how do you 've a
variable named "server" with an options hash..

Tks
Ze Maria

--
Posted via http://www.ruby-forum.com/.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Wernsing  
View profile
 More options Feb 23 2007, 11:04 am
From: "Mike Wernsing" <mwerns...@gmail.com>
Date: Sat, 24 Feb 2007 01:04:07 +0900
Local: Fri, Feb 23 2007 11:04 am
Subject: Re: OpenSSL , SOAP4R

> > server.options["protocol.http.ssl_config.verify_mode"] = nil
> if the certificate (.crt) , I don't understanding how do you 've a
> variable named "server" with an options hash..

Hopefully this may clarify,

wsdl = 'https://some.com/something.wsl'
factory = SOAP::WSDLDriverFactory.new( wsdl )
drv = factory.create_rpc_driver
drv.options[ 'protocol.http.ssl_config.ca_file' ] = nil

alternatively:

drv.options['protocol.http.ssl_config.verify_mode'] = openSSL::SSL::VERIFY_NONE

some other possibly useful options:

drv.options['protocol.http.ssl_config.verify_mode'] = OpenSSL::SSL::VERIFY_PEER
drv.options['protocol.http.ssl_config.ca_file'] = 'api_cert_chain.crt'
drv.options['protocol.http.ssl_config.client_cert'] = 'client.cert'
drv.options['protocol.http.ssl_config.client_key'] = 'client.keys'


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
barjunk  
View profile
 More options Feb 23 2007, 12:15 pm
Newsgroups: comp.lang.ruby
From: "barjunk" <barj...@attglobal.net>
Date: Sat, 24 Feb 2007 02:15:07 +0900
Local: Fri, Feb 23 2007 12:15 pm
Subject: Re: OpenSSL , SOAP4R
On Feb 23, 7:04 am, "Mike Wernsing" <mwerns...@gmail.com> wrote:

This is good stuff!  What would be a good link to have found this for
myself?  Thanks!

Mike B.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Wernsing  
View profile
 More options Feb 23 2007, 2:06 pm
From: "Mike Wernsing" <mwerns...@gmail.com>
Date: Sat, 24 Feb 2007 04:06:48 +0900
Local: Fri, Feb 23 2007 2:06 pm
Subject: Re: OpenSSL , SOAP4R

> This is good stuff!  What would be a good link to have found this for
> myself?  Thanks!

Might try these:

http://calagenda.berkeley.edu/calendar-ws/sample-code.html

The following describes using wsdl2ruby:
http://www.pranavbihari.com/articles/2005/12/02/testing-paypal-web-se...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Emil Marceta  
View profile
 More options Feb 24 2007, 1:04 am
Newsgroups: comp.lang.ruby
From: Emil Marceta <emarc...@gmail.com>
Date: Sat, 24 Feb 2007 15:04:31 +0900
Local: Sat, Feb 24 2007 1:04 am
Subject: Re: OpenSSL , SOAP4R

Should be noted that the above actually does not checks the actual
server (peer) certificate. It only validates that the peer certificate
is signed by / issued by the 'api_cert_chain.crt'.

To actually validate the server cert use :
drv.options['protocol.http.ssl_config.verify_callback'] =
method(:validate_certificate)

where method validate_certificate looks like:

def validate_certificate(is_ok, ctx)
  cert = ctx.current_cert

  # Only check the server certificate, not the issuer
  unless (cert.subject.to_s == cert.issuer.to_s)
    is_ok &&= File.open('server_cert.pem').read ==
ctx.current_cert.to_pem
  end
  is_ok
end

emil

--
Posted via http://www.ruby-forum.com/.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google