Cannot connect to gmail imap server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot connect to gmail imap server

Vikraman
Hi,

I can't seem to be able to connect to the gmail imap server from apps using
openssl. I am on an university network, behind a firewall.

% openssl s_client -debug -connect imap.gmail.com:993
CONNECTED(00000004)
write to 0x1026ef0 [0x1026f70] (184 bytes => 184 (0xB8))
0000 - 16 03 01 00 b3 01 00 00-af 03 03 50 3f ad 8c 19   ...........P?...
0010 - 37 ec cf 88 00 24 ca 9d-08 e1 15 d7 ab 21 3a 12   7....$.......!:.
0020 - 39 ec 69 83 c1 1d 87 5b-57 42 be 00 00 60 c0 22   9.i....[WB...`."
0030 - c0 21 00 a3 00 9f 00 6b-00 6a 00 39 00 38 00 88   .!.....k.j.9.8..
0040 - 00 87 00 9d 00 3d 00 35-00 84 c0 1c c0 1b 00 16   .....=.5........
0050 - 00 13 00 0a c0 1f c0 1e-00 a2 00 9e 00 67 00 40   .............g.@
0060 - 00 33 00 32 00 9a 00 99-00 45 00 44 00 9c 00 3c   .3.2.....E.D...<
0070 - 00 2f 00 96 00 41 00 07-00 05 00 04 00 15 00 12   ./...A..........
0080 - 00 09 00 14 00 11 00 08-00 06 00 03 00 ff 02 01   ................
0090 - 00 00 25 00 23 00 00 00-0d 00 18 00 16 06 01 06   ..%.#...........
00a0 - 02 05 01 05 02 04 01 04-02 03 01 03 02 02 01 02   ................
00b0 - 02 01 01 00 0f 00 01 01-                          ........
read from 0x1026ef0 [0x102c4d0] (7 bytes => 0 (0x0))
139900035073704:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 184 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
% openssl version
OpenSSL 1.0.1c 10 May 2012

What could be the issue here?

--
Vikraman

signature.asc (237 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Cannot connect to gmail imap server

Charles Mills
Is the firewall possibly blocking traffic to or from the server? "SSL
handshake has read 0 bytes" sounds like that is a possibility. Can other
applications (some e-mail client, I suppose) connect to imap.gmail.com:993?

Charles
-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Vikraman
Sent: Thursday, August 30, 2012 11:18 AM
To: [hidden email]
Subject: Cannot connect to gmail imap server

Hi,

I can't seem to be able to connect to the gmail imap server from apps using
openssl. I am on an university network, behind a firewall.

% openssl s_client -debug -connect imap.gmail.com:993
CONNECTED(00000004)
write to 0x1026ef0 [0x1026f70] (184 bytes => 184 (0xB8))
0000 - 16 03 01 00 b3 01 00 00-af 03 03 50 3f ad 8c 19   ...........P?...
0010 - 37 ec cf 88 00 24 ca 9d-08 e1 15 d7 ab 21 3a 12   7....$.......!:.
0020 - 39 ec 69 83 c1 1d 87 5b-57 42 be 00 00 60 c0 22   9.i....[WB...`."
0030 - c0 21 00 a3 00 9f 00 6b-00 6a 00 39 00 38 00 88   .!.....k.j.9.8..
0040 - 00 87 00 9d 00 3d 00 35-00 84 c0 1c c0 1b 00 16   .....=.5........
0050 - 00 13 00 0a c0 1f c0 1e-00 a2 00 9e 00 67 00 40   .............g.@
0060 - 00 33 00 32 00 9a 00 99-00 45 00 44 00 9c 00 3c   .3.2.....E.D...<
0070 - 00 2f 00 96 00 41 00 07-00 05 00 04 00 15 00 12   ./...A..........
0080 - 00 09 00 14 00 11 00 08-00 06 00 03 00 ff 02 01   ................
0090 - 00 00 25 00 23 00 00 00-0d 00 18 00 16 06 01 06   ..%.#...........
00a0 - 02 05 01 05 02 04 01 04-02 03 01 03 02 02 01 02   ................
00b0 - 02 01 01 00 0f 00 01 01-                          ........
read from 0x1026ef0 [0x102c4d0] (7 bytes => 0 (0x0))
139900035073704:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake
failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 184 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
% openssl version
OpenSSL 1.0.1c 10 May 2012

What could be the issue here?

--
Vikraman

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Cannot connect to gmail imap server

Vikraman
Charles Mills <charlesm@...> writes:

>
> Is the firewall possibly blocking traffic to or from the server? "SSL
> handshake has read 0 bytes" sounds like that is a possibility. Can other
> applications (some e-mail client, I suppose) connect to imap.gmail.com:993?
>

Yes, I think the firewall is blocking traffic to port 993, since I could not
connect to other imap servers too. All email clients I have tried use gnutls or
openssl, and have failed to connect.

I managed to get around it using an ssh tunnel.

--
Vikraman
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]