SOAP - issue with openssl verification failure

Discussion in 'Ruby' started by Venkat Alla, May 1, 2009.

  1. Venkat Alla

    Venkat Alla Guest

    I have the following code in a script that I am trying to use at work -

    #!/usr/local/bin/ruby

    require 'rubygems'
    require 'soap/wsdlDriver'

    wsdl = 'myURL'
    driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver

    I have a working perl snippet given, which uses SOAP::Lite. I want to
    use ruby to code my script, but unable to go past the above lines.

    Here is the error I am receiving -


    at depth 0 - 20: unable to get local issuer certificate
    OpenSSL::SSL::SSLError: certificate verify failed

    I am stuck for hours trying to figure a way out. Please help.

    Thanks in advance.
    --
    Posted via http://www.ruby-forum.com/.
     
    Venkat Alla, May 1, 2009
    #1
    1. Advertising

  2. [Note: parts of this message were removed to make it a legal post.]

    This isn't a ruby problem looks like your connecting to a server using ssl
    which has self signed certificate. Hence it can't be verifid. If you get
    hold of the cert you can add it to your trusted certs list. But brware this
    means your trusting the certificate implicitly.

    Fine for testing though.

    On May 1, 2009 10:04 PM, "Venkat Alla" <> wrote:

    I have the following code in a script that I am trying to use at work -

    #!/usr/local/bin/ruby

    require 'rubygems'
    require 'soap/wsdlDriver'

    wsdl = 'myURL'
    driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver

    I have a working perl snippet given, which uses SOAP::Lite. I want to
    use ruby to code my script, but unable to go past the above lines.

    Here is the error I am receiving -


    at depth 0 - 20: unable to get local issuer certificate
    OpenSSL::SSL::SSLError: certificate verify failed

    I am stuck for hours trying to figure a way out. Please help.

    Thanks in advance.
    --
    Posted via http://www.ruby-forum.com/.
     
    Steven Williamson, May 1, 2009
    #2
    1. Advertising

  3. I am having the same problem. Is adding the cert to your trusted certs
    list a Ruby thing or a system related task? It seems that it's not
    possible to specify options to SOAP::WSDLDriverFactory.new, such as an
    SSL cert :).

    Joseph Gutierrez
    Web Developer - Inc21




    Steven Williamson wrote:
    > This isn't a ruby problem looks like your connecting to a server using ssl
    > which has self signed certificate. Hence it can't be verifid. If you get
    > hold of the cert you can add it to your trusted certs list. But brware this
    > means your trusting the certificate implicitly.
    >
    > Fine for testing though.
    >
    > On May 1, 2009 10:04 PM, "Venkat Alla" <> wrote:
    >
    > I have the following code in a script that I am trying to use at work -
    >
    > #!/usr/local/bin/ruby
    >
    > require 'rubygems'
    > require 'soap/wsdlDriver'
    >
    > wsdl = 'myURL'
    > driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
    >
    > I have a working perl snippet given, which uses SOAP::Lite. I want to
    > use ruby to code my script, but unable to go past the above lines.
    >
    > Here is the error I am receiving -
    >
    >
    > at depth 0 - 20: unable to get local issuer certificate
    > OpenSSL::SSL::SSLError: certificate verify failed
    >
    > I am stuck for hours trying to figure a way out. Please help.
    >
    > Thanks in advance.
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    >


    --
    This message has been scanned for viruses and
    dangerous content by MailScanner, and is
    believed to be clean.
     
    Joe Gutierrez, May 2, 2009
    #3
  4. How do you add a cert to your list of trusted certs? Is it possible to
    specify a cert a some point when creating a new SOAP::WSDLDriverFactory?

    Joseph Gutierrez
    Web Developer - Inc21




    Joe Gutierrez wrote:
    > I am having the same problem. Is adding the cert to your trusted certs
    > list a Ruby thing or a system related task? It seems that it's not
    > possible to specify options to SOAP::WSDLDriverFactory.new, such as an
    > SSL cert :).
    >
    > Joseph Gutierrez
    > Web Developer - Inc21
    >
    >
    >
    >
    > Steven Williamson wrote:
    >> This isn't a ruby problem looks like your connecting to a server
    >> using ssl
    >> which has self signed certificate. Hence it can't be verifid. If you get
    >> hold of the cert you can add it to your trusted certs list. But
    >> brware this
    >> means your trusting the certificate implicitly.
    >>
    >> Fine for testing though.
    >>
    >> On May 1, 2009 10:04 PM, "Venkat Alla" <> wrote:
    >>
    >> I have the following code in a script that I am trying to use at work -
    >>
    >> #!/usr/local/bin/ruby
    >>
    >> require 'rubygems'
    >> require 'soap/wsdlDriver'
    >>
    >> wsdl = 'myURL'
    >> driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
    >>
    >> I have a working perl snippet given, which uses SOAP::Lite. I want to
    >> use ruby to code my script, but unable to go past the above lines.
    >>
    >> Here is the error I am receiving -
    >>
    >>
    >> at depth 0 - 20: unable to get local issuer certificate
    >> OpenSSL::SSL::SSLError: certificate verify failed
    >>
    >> I am stuck for hours trying to figure a way out. Please help.
    >>
    >> Thanks in advance.
    >> --
    >> Posted via http://www.ruby-forum.com/.
    >>
    >>

    >


    --
    This message has been scanned for viruses and
    dangerous content by MailScanner, and is
    believed to be clean.
     
    Joe Gutierrez, May 2, 2009
    #4
  5. Venkat Alla

    Venkat Alla Guest

    I am using ruby 1.8.6 on Mac OS X box. Forgot to mention that in my
    first post. Please let me know if you have any thoughts on this. I am
    still stuck on this :(
    --
    Posted via http://www.ruby-forum.com/.
     
    Venkat Alla, May 2, 2009
    #5
  6. [Note: parts of this message were removed to make it a legal post.]

    Hi guys,

    To add the certs to your trusted list using openssl at least you can google
    for the procedure. Basicaly you add the cert to /etc/openssl/certs and
    create a symlink to it. The symlinks name should be the fingerprint of the
    certificate. Openssl will then trust the cert.

    As for macosx I have no idea I don't run it :)

    You could also search the ruby api docs there should be an option to disable
    the verification of certificates. Though this may not be an option.

    Cheers

    Steve.

    On May 2, 2009 1:10 PM, "Venkat Alla" <> wrote:

    I am using ruby 1.8.6 on Mac OS X box. Forgot to mention that in my
    first post. Please let me know if you have any thoughts on this. I am
    still stuck on this :(

    -- Posted via http://www.ruby-forum.com/.
     
    Steven Williamson, May 2, 2009
    #6
  7. Venkat Alla

    Venkat Alla Guest

    This is for my tool at the place of work and there is no harm in
    trusting this cert as it belongs to one of our internal groups. I have
    saved the certificate using firefox. But not sure how to make the
    openssl to trust it. Any clues will be greatly appreciated.

    Thanks
    Venkat

    Steven Williamson wrote:
    > This isn't a ruby problem looks like your connecting to a server using
    > ssl
    > which has self signed certificate. Hence it can't be verifid. If you get
    > hold of the cert you can add it to your trusted certs list. But brware
    > this
    > means your trusting the certificate implicitly.


    --
    Posted via http://www.ruby-forum.com/.
     
    Venkat Alla, May 2, 2009
    #7
  8. [Note: parts of this message were removed to make it a legal post.]

    Hi,

    You can follow the guide at:
    http://gagravarr.org/writing/openssl-certs/others.shtml#ca-openssl

    Cheers
    Steve

    2009/5/2 Venkat Alla <>

    > This is for my tool at the place of work and there is no harm in
    > trusting this cert as it belongs to one of our internal groups. I have
    > saved the certificate using firefox. But not sure how to make the
    > openssl to trust it. Any clues will be greatly appreciated.
    >
    > Thanks
    > Venkat
    >
    > Steven Williamson wrote:
    > > This isn't a ruby problem looks like your connecting to a server using
    > > ssl
    > > which has self signed certificate. Hence it can't be verifid. If you get
    > > hold of the cert you can add it to your trusted certs list. But brware
    > > this
    > > means your trusting the certificate implicitly.

    >
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    >
     
    Steven Williamson, May 2, 2009
    #8
  9. Venkat Alla

    Venkat Alla Guest

    Venkat Alla, May 2, 2009
    #9
  10. Venkat Alla

    Yesh Sriram Guest

    Joe Gutierrez wrote:
    > I am having the same problem. Is adding the cert to your trusted certs
    > list a Ruby thing or a system related task? It seems that it's not
    > possible to specify options to SOAP::WSDLDriverFactory.new, such as an
    > SSL cert :).
    >
    > Joseph Gutierrez
    > Web Developer - Inc21
    >


    If you want to ignore SSL verification simply set the following property
    on the driver object

    obj.options["protocol.http.ssl_config.verify_mode"] =
    OpenSSL::SSL::VERIFY_NONE

    I got the answer from soap4r discussion in google groups.
    http://groups.google.com/group/soap4r

    - Yesh
    --
    Posted via http://www.ruby-forum.com/.
     
    Yesh Sriram, May 3, 2009
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott Rubin

    SOAP and OpenSSL

    Scott Rubin, Apr 1, 2004, in forum: Ruby
    Replies:
    0
    Views:
    125
    Scott Rubin
    Apr 1, 2004
  2. Curt Hibbs
    Replies:
    0
    Views:
    125
    Curt Hibbs
    May 12, 2005
  3. Trey Connell
    Replies:
    0
    Views:
    135
    Trey Connell
    Jan 15, 2008
  4. Christopher Wilson

    OpenSSL/SOAP - keystore/truststore

    Christopher Wilson, Mar 5, 2008, in forum: Ruby
    Replies:
    6
    Views:
    266
    Stephen Fickas
    Mar 6, 2008
  5. Redd Vinylene
    Replies:
    6
    Views:
    335
    Jakub Pawlowicz
    Nov 18, 2008
Loading...

Share This Page