Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

gmail ssl #58

Open
whity opened this issue Feb 21, 2013 · 1 comment
Open

gmail ssl #58

whity opened this issue Feb 21, 2013 · 1 comment

Comments

@whity
Copy link

whity commented Feb 21, 2013

Hello,

I'm getting the following error when connecting to gmail:
"OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: sslv3 alert handshake failure (cannot recover)"

any clue how to solve this?

@whity
Copy link
Author

whity commented Feb 21, 2013

Hi,

I fixed this with the following changes:

  1. added a new option --ssl_version
  2. on imap.rb
def initialize
    ...
    ####
    @ssl_options = Hash.new()
    if (@options[:ssl_version])
       @ssl_options[:ssl_version] = @options[:ssl_version]
    end
    ####
end

def unsafe_connect()
    ...
    Thread.new do
      begin
        @conn = Net::IMAP.new(
                host, 
                {
                        :port => port,
                        :ssl  => @ssl_options
                },      
                ssl?, 
                ssl? && @options[:ssl_verify] ? @options[:ssl_certs] : nil, 
                @options[:ssl_verify]
        )
    ...

@whity whity closed this as completed Feb 21, 2013
@whity whity reopened this Feb 21, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant