LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-14-2007, 10:15 AM   #1
jmarmol
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
Linux and SSL Handshake


Hello,

Is there something in Linux that might hinder an SSL Handshake?

I know almost nothing about Linux. My client application works fine on Windows. It connects to a external server via SSLSocket. To do so, there is a handshake protocol to manage certificates issue. That occurs below my application.

The fact is that when I run the same application on Linux machines, the handshake is not completed. The application sends the ClientHello and receives the ServerHello. Then it should reveive a server certificate, but it doesn't. After a few seconds the connection times out.

I tried in Linux Red Hat 7.3, REHL4.3 and CentOS. The problem is always the same.


In all my tests (on Windows and Linux):
- The network and proxy are the same.
- The JDK are almost the same (jre1.4.2_03 and jre1.4.2_13).
- The keystores are the same, so the certificates.

The only difference that I find is that the length of the ClientHello that I send on Windows PCs is 98, and on Linux it is 77, but this is something that I can't handle.

So, to me, it seems that the problem lies on the OS Linux. Is there any Linux security directive, any service, anything that might affect ssl communications?

Thank you.
 
Old 02-14-2007, 11:31 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i'd suggest getting a copy of wireshark and actaully exploring the ssl handshake in more detail. these sorts of issues have usually been down to incompatible cipher specs when they've caught me up.
 
Old 02-16-2007, 10:14 AM   #3
jmarmol
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Original Poster
Rep: Reputation: 0
I used Ethereal to monitor the handshake. After establishing the SSL Session, in Windows the client receives two mesages:

- Server Hello Certificate [Unreassembled packet], which is 1380 bytes long.
- Continuation Data [Unreassembled packet], which is 705 bytes long.

In Linux, the client receives the following:

%% Created: [Session-1, SSL_RSA_WITH_RC4_128_SHA]
** SSL_RSA_WITH_RC4_128_SHA
[read] MD5 and SHA1 hashes: len = 74
0000: 02 00 00 46 03 01 45 D5 AA 44 68 02 76 87 D9 0E ...F..E..Dh.v...
0010: 53 A0 DB 97 CF 56 11 CA E3 8B 5F 30 44 26 2E 6F S....V...._0D&.o
0020: CD 8C A9 DD 31 B4 20 6F ED F5 9F 91 C0 AD 97 68 ....1. o.......h
0030: BE FD 59 62 C6 B5 86 30 1D 39 90 03 06 09 7C E3 ..Yb...0.9......
0040: DA 6C A8 10 FE C3 B7 00 05 00 .l........
[Raw read]: length = 5
0000: 16 03 01 08 18 .....
[Raw read]: length = 1376
0000: 0B 00 08 14 00 08 11 00 04 84 30 82 04 80 30 82 ..........0...0.
0010: 03 E9 A0 03 02 01 02 02 10 62 76 EC A2 A8 88 DA .........bv.....
0020: 1A 17 11 83 6B F0 1D A9 22 30 0D 06 09 2A 86 48 ....k..."0...*.H
...........lots of bytes till the end of the message..........
0540: 30 81 BA 31 1F 30 1D 06 03 55 04 0A 13 16 56 65 0..1.0...U....Ve
0550: 72 69 53 69 67 6E 20 54 72 75 73 74 20 4E 65 74 riSign Trust Net
----- And the socket is closed -----


So to me it seems that the client application is receiving an incomplete message, but I don't know why.
 
Old 02-16-2007, 10:27 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Without delving into the data on a packet by packet basis, it may well be that the client is sending a reset before the other frame has arrived as the data is known to already be unacceptable for some reason or other.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSL Connections / second and SSL Accelerator Cards on Linux LinuxGeek Linux - Networking 0 06-10-2006 08:18 AM
up2date SSL handshake problem kamii47 Red Hat 1 04-21-2005 03:16 PM
modem handshake!!! help!!!! novice_din Programming 1 02-11-2005 08:18 AM
RS 232 & Handshake Hugo Orlando Programming 1 08-03-2004 12:36 AM
qpopper TLS/SSL Handshake failed: -1 frerotjs Linux - Software 0 07-15-2003 07:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration