RE: How to get back received data after SSL_accept() ?

2007-07-10 Thread David Schwartz
> Hello, > > David, > > Perfect - thanks! > > Peeking at the first byte with recv(sock, buffer, 1, MSG_PEEK) works :-) > > I'm not very familiar with the SSL handshake. What are the > chances of a "G" > > or "P" being the first byte of the handshake itself? > This is not good solution, Yep, tha

RE: How to get back received data after SSL_accept() ?

2007-07-10 Thread Marek Marcola
Hello, > David, > Perfect - thanks! > Peeking at the first byte with recv(sock, buffer, 1, MSG_PEEK) works :-) > I'm not very familiar with the SSL handshake. What are the chances of a "G" > or "P" being the first byte of the handshake itself? This is not good solution, what if you get OPTIONS, HEA

RE: How to get back received data after SSL_accept() ?

2007-07-10 Thread David Schwartz
> David, > Perfect - thanks! > Peeking at the first byte with recv(sock, buffer, 1, MSG_PEEK) works :-) > I'm not very familiar with the SSL handshake. What are the > chances of a "G" > or "P" being the first byte of the handshake itself? 0% until SSL version 71 comes out. DS

RE: How to get back received data after SSL_accept() ?

2007-07-10 Thread David Schwartz
>>There are right ways and there are easy ways. The easy way is to >>non-destructively read the first character on the connection. >What is the right way? >Zack There are three right ways (and reasons why some or all of these are sometimes impractical): 1) Don't get into this situation in the f

RE: How to get back received data after SSL_accept() ?

2007-07-10 Thread Badda
; > DS > > -- View this message in context: http://www.nabble.com/How-to-get-back-received-data-after-SSL_accept%28%29---tf4054540.html#a11522449 Sent from the OpenSSL - User mailing list archive at Nabble.com. __ Ope

Re: How to get back received data after SSL_accept() ?

2007-07-10 Thread Zack Payton
There are right ways and there are easy ways. The easy way is to non-destructively read the first character on the connection. What is the right way? Zack On 7/10/07, David Schwartz <[EMAIL PROTECTED]> wrote: > -Original Message- > I developed an SSL-enabled web server. I'm firing

RE: How to get back received data after SSL_accept() ?

2007-07-10 Thread David Schwartz
> -Original Message- > I developed an SSL-enabled web server. I'm firing up SSL on incoming > connections with SSL_accept(). > Now, if someone connects to my webserver not using SSL, but sending the > "GET ..." without the SSL handshake, I get an SSL Error > (error:1407609C:SSL routines:

How to get back received data after SSL_accept() ?

2007-07-10 Thread Sebastian Weber
Hi All, I developed an SSL-enabled web server. I'm firing up SSL on incoming connections with SSL_accept(). Now, if someone connects to my webserver not using SSL, but sending the "GET ..." without the SSL handshake, I get an SSL Error (error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http r