Re : Proper use of non-blocking sockets, ideas for application design.

2014-07-18 Thread nicolas . kox
error code) this means you should check the result, and may need to write the (num - ret) remaining bytes in another call - Mail d'origine - De: Eric Shufro À: openssl-users@openssl.org Envoyé: Fri, 18 Jul 2014 14:05:54 +0200 (CEST) Objet: Proper use of non-blocking sockets, idea

Proper use of non-blocking sockets, ideas for application design.

2014-07-18 Thread Eric Shufro
Hello. I am looking for advice for designing the transmit/receive network module of my application using openSSL. I originally designed the application using two threads, a transmit thread and a receive thread. These threads relied on a single BIO that was set for blocking more that would conne

Conflicting information regarding non-blocking sockets

2014-06-05 Thread Barbe, Charles
Hello, I have implemented an SSL server on the ecos platform and it seems to be working well however I am a tiny bit unclear about the requirements around whether or not calls to SSL_read and SSL_write need to be syncrhonized and I want to avoid doing something incorrect. The specific question

Re: Query on non blocking sockets

2014-02-19 Thread Darryl Miles
) function. My query is do we need to update SSL_CTX with these modes when we use "non blocking sockets"? SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE); SSL_CTX_set_mode(ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); Or without setting this also non blocking sockets work? If you want

Query on non blocking sockets

2014-01-28 Thread Rajeswari K
query is do we need to update SSL_CTX with these modes when we use "non blocking sockets"? SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE); SSL_CTX_set_mode(ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); Or without setting this also non blocking sockets work? Please provid

RE: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-23 Thread Steffen DETTMER
> Since I wait until the SSL_connect() function succeeds I > wanted to know if there is a better approach. Yes, there is a better approach, for example the one mentioned in the manual: * http://www.openssl.org/docs/ssl/SSL_connect.html > If the underlying BIO is non-blocking, SSL_connect() will a

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-22 Thread Arjun SM
t; > > > > SSL_ERROR_WANT_WRITE > > > > > In that case you need to redo *SSL_connect.* > > > > > * > > > > > * > > > > > Huaqing > > > > > > > > > > On Tue, Nov 15, 2011 at 5:51 AM, Arjun SM > wrote: >

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-21 Thread Michael S. Zick
#x27;t respond to the want-write and/or want-read. Something which your code must do when using non-blocking sockets. Mike > ~Arjun > > On Thu, Nov 17, 2011 at 11:50 PM, Michael S. Zick wrote: > > > On Thu November 17 2011, Arjun SM wrote: > > > Hi, > > >

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-21 Thread Arjun SM
wbie to openssl any help is greatly appreciated. > > >> > > >> I have a requirement of fetching the Common name (domin name ) from > the > > >> certificate that I request from any HTTPS websites. I followed the > regular > > >> method of > &

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-17 Thread Michael S. Zick
) from the > >> certificate that I request from any HTTPS websites. I followed the regular > >> method of > >> > >> 1. establish a connection with the ip address using *connect() *system > >> call. > >> 2. Use *SSL_connect()* system call to perform handshake. > &g

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-17 Thread Arjun SM
the ip address using *connect() *system >> call. >> 2. Use *SSL_connect()* system call to perform handshake. >> 3. Use *SSL_get_peer_certificate()* to get the certificate. >> >> The problem I faced was that, the connect() call would at times return a >> errno 4 (EIN

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-15 Thread Huaqing Wang
to perform handshake. > 3. Use *SSL_get_peer_certificate()* to get the certificate. > > The problem I faced was that, the connect() call would at times return a > errno 4 (EINTR) error . So i changed code from blocking to non-blocking > sockets and used select() call to have a vali

SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-15 Thread Arjun SM
call. 2. Use *SSL_connect()* system call to perform handshake. 3. Use *SSL_get_peer_certificate()* to get the certificate. The problem I faced was that, the connect() call would at times return a errno 4 (EINTR) error . So i changed code from blocking to non-blocking sockets and used select() call

Re: SSL_MODE_AUTO_RETRY and non-blocking sockets

2004-01-17 Thread Dr. Stephen Henson
On Fri, Jan 16, 2004, Joseph Bruni wrote: > > On Jan 16, 2004, at 5:57 PM, Dr. Stephen Henson wrote: > > >On Fri, Jan 16, 2004, Joseph Bruni wrote: > > > >>After reading the man page for SSL_CTX_set_mode, I have to ask, > >>what happens if you set AUTO_RETRY with a non-blocking socket? > >> > >

Re: SSL_MODE_AUTO_RETRY and non-blocking sockets

2004-01-16 Thread Joseph Bruni
On Jan 16, 2004, at 8:26 PM, David Schwartz wrote: The AUTO_RETRY flag disables a case where the SSL/TLS code would signal a retry even though the underlying transport did not during a session renegotiation. This is there to support some applications which brokenly use select() and blocking I/O.

RE: SSL_MODE_AUTO_RETRY and non-blocking sockets

2004-01-16 Thread David Schwartz
> > The AUTO_RETRY flag disables a case where the SSL/TLS code would > > signal a retry even > > though the underlying transport did not during a session > > renegotiation. This is > > there to support some applications which brokenly use select() and > > blocking I/O. > Now you have me curious:

Re: SSL_MODE_AUTO_RETRY and non-blocking sockets

2004-01-16 Thread Joseph Bruni
On Jan 16, 2004, at 5:57 PM, Dr. Stephen Henson wrote: On Fri, Jan 16, 2004, Joseph Bruni wrote: After reading the man page for SSL_CTX_set_mode, I have to ask, what happens if you set AUTO_RETRY with a non-blocking socket? The AUTO_RETRY flag disables a case where the SSL/TLS code would signal

Re: SSL_MODE_AUTO_RETRY and non-blocking sockets

2004-01-16 Thread Dr. Stephen Henson
On Fri, Jan 16, 2004, Joseph Bruni wrote: > After reading the man page for SSL_CTX_set_mode, I have to ask, > what happens if you set AUTO_RETRY with a non-blocking socket? > The AUTO_RETRY flag disables a case where the SSL/TLS code would signal a retry even though the underlying transport did

SSL_MODE_AUTO_RETRY and non-blocking sockets

2004-01-16 Thread Joseph Bruni
After reading the man page for SSL_CTX_set_mode, I have to ask, what happens if you set AUTO_RETRY with a non-blocking socket? __ OpenSSL Project http://www.openssl.org User Support Mailing List

Re: Non-Blocking Sockets for SSL HandShake?

2003-03-24 Thread Tim Regovich
unctionality was disabled intentionaly (God > > > knows > > > > > why) > > > > > > > > > > - raj > > > > > > > > > > --- Tim Regovich <[EMAIL PROTECTED]> > wrote: > > > > > > There are tw

Re: Problems with non-blocking sockets and SSL

2002-06-14 Thread Bodo Moeller
On Fri, Jun 14, 2002 at 04:17:58PM +0200, Martin Sjögren wrote: > I'm having a few delicate problems, and I think at least one of them > adheres to non-blocking sockets, which is what I use. > > 1) Is it possible to get a WANT_WRITE error when I actually don't have >

Problems with non-blocking sockets and SSL

2002-06-14 Thread Martin Sjögren
Hello. I'm having a few delicate problems, and I think at least one of them adheres to non-blocking sockets, which is what I use. 1) Is it possible to get a WANT_WRITE error when I actually don't have anything to send (on my high-level layer)? In that case, how should I handle this?

RE: SSL_read, non-blocking sockets, and Windows.

2000-10-09 Thread James Gaskell
m: Pablo J. Royo [mailto:[EMAIL PROTECTED]] |Sent: 09 October 2000 9:52 AMj |To: [EMAIL PROTECTED] |Subject: Re: SSL_read, non-blocking sockets, and Windows. | | |I think you should change the line | |int tNumSocketsReady = select(1, &tSet, NULL, NULL, &tTimeout); | | by | |int tNumSoc

Re: SSL_read, non-blocking sockets, and Windows.

2000-10-09 Thread Pablo J. Royo
() doesn´t works. -Original Message- From: James Gaskell <[EMAIL PROTECTED]> To: 'SSLU' <[EMAIL PROTECTED]> Date: lunes 9 de octubre de 2000 10:33 Subject: SSL_read, non-blocking sockets, and Windows. >Hi. > >I'm just starting out with the OpenSSL library,

SSL_read, non-blocking sockets, and Windows.

2000-10-09 Thread James Gaskell
Hi. I'm just starting out with the OpenSSL library, and I've got a problem that I don't know how to fix. I'm trying to read data using SSL_read() from a non-blocking socket on a Windows machine. The problem is that when the SSL_read returns SSL_ERROR_WANT_READ, I don't know how to wait for da

Non-Blocking Sockets and EAGAIN

2000-07-06 Thread Andy Foster
eb server. In our O/S, we use non-blocking sockets which return -EAGAIN without setting errno. I'm particularly confused with how to handle a sock_read return of -EAGAIN or a return of 0. The code I've been looking at is in bss_sock.c. Do any of the layers above this depend on having err

Re: Non-blocking sockets

2000-03-13 Thread Bodo Moeller
Peter Edwards <[EMAIL PROTECTED]>: > Is there any documentation or example code how to program SSL_* operations for > non-blocking sockets (other than the documentation of error returns)? > > In particular, how do I determine after a SSL_read, whether there is more >

Non-blocking sockets

2000-03-13 Thread Peter Edwards
Hi, Is there any documentation or example code how to program SSL_* operations for non-blocking sockets (other than the documentation of error returns)? In particular, how do I determine after a SSL_read, whether there is more incoming data already buffered? With openssl-0.9.4 I found I could

Re: Bug in BIO_should_retry() under Win32 with non-blocking sockets (sconnect.c)

1999-10-10 Thread Bodo Moeller
On Sat, Oct 09, 1999 at 09:52:09PM -0500, Richard Wagner wrote: > I compiled and ran demos/bio/sconnect.c. In this I found a problem > with BIO_should_retry() [on Windows] > for (;;) > { > i=BIO_write(out,&(p[off]),len); > if (i <= 0) > { > if (BIO_

Bug in BIO_should_retry() under Win32 with non-blocking sockets (sconnect.c)

1999-10-09 Thread Richard Wagner
I compiled and ran demos/bio/sconnect.c. In this I found a problem with BIO_should_retry(). This is the code that doesn't work like it should: for (;;) { i=BIO_write(out,&(p[off]),len); if (i <= 0) { if (BIO_should_retry(out))