RE: Detecting TLS/SSL connection

2010-01-18 Thread Rene Hollan
onger than using bio pairs. -Original Message- From: owner-openssl-us...@openssl.org on behalf of adam.gross...@devitron.com Sent: Sat 1/16/2010 2:01 PM To: openssl-users@openssl.org Subject: RE: Detecting TLS/SSL connection > Adam Grossman wrote: > >> One last questions, and

Re: Detecting TLS/SSL connection

2010-01-16 Thread Dr. Stephen Henson
On Sat, Jan 16, 2010, adam.gross...@devitron.com wrote: > > The problem is that the clients have been hacked to add some information > within the first packet sent over. and i, unfortunately, can't change > that. so i need to be able to read in the raw first 128 bits, get some > info out of tha

RE: Detecting TLS/SSL connection

2010-01-16 Thread David Schwartz
> The problem is that the clients have been hacked to add some > information > within the first packet sent over. and i, unfortunately, can't change > that. so i need to be able to read in the raw first 128 bits, get some > info out of that, and the have the SSL connection go just as normal, > n

RE: Detecting TLS/SSL connection

2010-01-16 Thread adam . grossman
> Adam Grossman wrote: > >> One last questions, and i am done bugging you about this... >> >> These are the steps i am taking: >> >> SSL_set_fd(ssl_data->ssl_ssl, sock_fd); >> sslbio=SSL_get_rbio(ssl_data->ssl_ssl); >> >> internalBIO=BIO_new(BIO_s_bio()); >> BIO_set_write_buf_size(internalBIO, 1024

RE: Detecting TLS/SSL connection

2010-01-16 Thread David Schwartz
Adam Grossman wrote: > One last questions, and i am done bugging you about this... > > These are the steps i am taking: > > SSL_set_fd(ssl_data->ssl_ssl, sock_fd); > sslbio=SSL_get_rbio(ssl_data->ssl_ssl); > > internalBIO=BIO_new(BIO_s_bio()); > BIO_set_write_buf_size(internalBIO, 1024); > > B

Re: Detecting TLS/SSL connection

2010-01-16 Thread Victor Duchovni
On Sat, Jan 16, 2010 at 12:33:47PM -0500, Adam Grossman wrote: > These are the steps i am taking: > > SSL_set_fd(ssl_data->ssl_ssl, sock_fd); No, you do not associate the network socket with the SSL engine, your app copies data back and forth between the SSL engine network bio and the socket. SS

Re: Detecting TLS/SSL connection

2010-01-16 Thread Adam Grossman
On Sat, 2010-01-16 at 11:41 -0500, Victor Duchovni wrote: > On Sat, Jan 16, 2010 at 10:39:13AM -0500, Adam Grossman wrote: > > > On Fri, 2010-01-15 at 17:06 -0500, Victor Duchovni wrote: > > > On Fri, Jan 15, 2010 at 04:11:04PM -0500, Adam Grossman wrote: > > > > > > > A simpler question might be

Re: Detecting TLS/SSL connection

2010-01-16 Thread Victor Duchovni
On Sat, Jan 16, 2010 at 10:39:13AM -0500, Adam Grossman wrote: > On Fri, 2010-01-15 at 17:06 -0500, Victor Duchovni wrote: > > On Fri, Jan 15, 2010 at 04:11:04PM -0500, Adam Grossman wrote: > > > > > A simpler question might be (hopefully), is after i call "SSL_accept", > > > is there a way to re

Re: Detecting TLS/SSL connection

2010-01-16 Thread Adam Grossman
On Fri, 2010-01-15 at 17:06 -0500, Victor Duchovni wrote: > On Fri, Jan 15, 2010 at 04:11:04PM -0500, Adam Grossman wrote: > > > A simpler question might be (hopefully), is after i call "SSL_accept", > > is there a way to retrieve all the raw data which was read in by > > SSL_accept? > > Don't ca

Re: Detecting TLS/SSL connection

2010-01-15 Thread Victor Duchovni
On Fri, Jan 15, 2010 at 04:11:04PM -0500, Adam Grossman wrote: > A simpler question might be (hopefully), is after i call "SSL_accept", > is there a way to retrieve all the raw data which was read in by > SSL_accept? Don't call SSL_accept() unless you know that the client's first message is an SS

Re: Detecting TLS/SSL connection

2010-01-15 Thread Adam Grossman
A simpler question might be (hopefully), is after i call "SSL_accept", is there a way to retrieve all the raw data which was read in by SSL_accept? thanks, -=- adam grossman On Fri, 2010-01-15 at 11:51 -0500, Victor Duchovni wrote: > On Fri, Jan 15, 2010 at 10:57:35AM -0500, Adam Grossman wrote:

Re: Detecting TLS/SSL connection

2010-01-15 Thread Victor Duchovni
On Fri, Jan 15, 2010 at 10:57:35AM -0500, Adam Grossman wrote: > Is there a way i can detect if the incoming connection is not SSL/TLS > (not encrypted) and then retrieve what has been read in already. i will > then use standard read/write to handle the unsecure connection? i know > that sounds l