Public bug reported:
I do this:
ruby -r net/imap -e 'p Net::IMAP.new("imap.gmail.com", 993, ssl: true)'
...and get this:
Traceback (most recent call last):
5: from -e:1:in `<main>'
4: from -e:1:in `new'
3: from /usr/lib/ruby/2.5.0/net/imap.rb:1092:in `initialize'
2: from /usr/lib/ruby/2.5.0/net/imap.rb:1531:in `start_tls_session'
1: from /usr/lib/ruby/2.5.0/net/protocol.rb:44:in `ssl_socket_connect'
/usr/lib/ruby/2.5.0/net/protocol.rb:44:in `connect_nonblock': SSL_connect
returned=1 errno=0 state=error: certificate verify failed (self signed
certificate) (OpenSSL::SSL::SSLError)
But this is not a certificate error, because when I do this:
openssl s_client -showcerts -connect imap.gmail.com -port 993
... certs verifies as fine
And when I do this in Python:
import imaplib
imap = imaplib.IMAP4_SSL('imap.gmail.com')
imap.login("myusername", "mypassword")
...it works just fine (reports success on login).
With Ruby I don't even get to login as the connection to imap.gmail.com
fails.
I have been using a script to fetch my gmail to local imap server, and
this script
(https://github.com/isene/mailfetch/blob/master/mail_fetch.rb) has been
running every minute since 10 years ago (more than 5 million times)
across many Ubuntu releases without a hitch. It stopped working when I
upgraded from 18.04 to 18.10 yesterday.
apt-cache policy ruby
ruby:
Installed: 1:2.5.1
Candidate: 1:2.5.1
Version table:
*** 1:2.5.1 500
500 http://no.archive.ubuntu.com/ubuntu cosmic/main amd64 Packages
100 /var/lib/dpkg/status
I first thought this was a certificate issue and tried updating ca-
certificates, symlinking certs manually, etc. I have had help in
debugging this over at irc/freenode/#ruby and one person running Suse
could not reproduce it. But another running Ubuntu 18.10 was able to
reproduce this.
** Affects: ruby-defaults (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1809500
Title:
Ruby crashes on login to imap.gmail.com (ssl)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ruby-defaults/+bug/1809500/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs