host name does not match the server certificate (HTTPI::SSLError)

118 views
Skip to first unread message

shirle...@gmail.com

unread,
Jun 23, 2015, 2:24:27 AM6/23/15
to railsin...@googlegroups.com
When I'm trying to connect to a WSDL( I'm writing a client to connect to a WSDL), I'm getting following error:
Ruby2.1.0/lib/ruby/gems/2.1.0/gems/httpi-2.4.1/lib/httpi/adapter/net_http.rb:46:in `rescue in request': hostname does not match the server certificate  (HTTPI::SSLError)

Ruby Version :2.1, Windows 7 64 bit OS. Following are the options i tried
1. I tried changing source to http://rubygems.org/ instead of https://rubygems.org/ as suggested in some posts..

2. I updated gem version to 2.2.3 
3. Added Cacert.pem
http://stackoverflow.com/questions/30942747/ssl-error-in-ruby-on-windows-7-64-bit?noredirect=1
Exists on Ruby 2.0 Version also
I tried connecting the WSDL through SOAP UI. And it doesnot have any issues.. I could get correct response
Could some one let me know to resolve this error?

Dušan D. Majkić

unread,
Jun 23, 2015, 5:27:13 AM6/23/15
to railsin...@googlegroups.com
> hostname does not match the server certificate (HTTPI::SSLError)

Looks like your server certificate is for one name, but you are
accesing it via another.

Common situation si that ssl certificate is for www.example.com, and
you are accesing
https://example.com, which is another domain from certificate point of view.

shirley g

unread,
Jun 23, 2015, 7:16:33 AM6/23/15
to railsin...@googlegroups.com
I'm accessing WSDL say xxx, but this WSDL is hosted on server which has SSL enabled. By passing this ssl didnot help me. 
i wrote client = Savon.client(wsdl: "WSDL", ssl_verify_mode: :none)


--
You received this message because you are subscribed to a topic in the Google Groups "RailsInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/railsinstaller/q0kpzXE0WjA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to railsinstalle...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages