Re: [openssl-users] Getting the retry reason for a "failed" BIO_write/BIO_read

2016-10-10 Thread Ajay Garg
On Mon, Oct 10, 2016 at 2:47 PM, Ajay Garg wrote: > > > On Mon, Oct 10, 2016 at 1:31 PM, Viktor Dukhovni < > openssl-us...@dukhovni.org> wrote: > >> >> > On Oct 10, 2016, at 3:52 AM, Ajay Garg wrote: >> > >> > If(BIO_should_read(socket->ssl_bio)

Re: [openssl-users] Getting the retry reason for a "failed" BIO_write/BIO_read

2016-10-10 Thread Ajay Garg
On Mon, Oct 10, 2016 at 1:31 PM, Viktor Dukhovni wrote: > > > On Oct 10, 2016, at 3:52 AM, Ajay Garg wrote: > > > > If(BIO_should_read(socket->ssl_bio) != 0) > > > > If(BIO_should_write(socket->ssl_bio) != 0) > > In Postfix, we don't bother

Re: [openssl-users] Getting the retry reason for a "failed" BIO_write/BIO_read

2016-10-10 Thread Viktor Dukhovni
> On Oct 10, 2016, at 3:52 AM, Ajay Garg wrote: > > If(BIO_should_read(socket->ssl_bio) != 0) > > If(BIO_should_write(socket->ssl_bio) != 0) In Postfix, we don't bother with the application layer ssl_bio, and just do SSL_read()/SSL_write() directly. You only need this

Re: [openssl-users] Getting the retry reason for a "failed" BIO_write/BIO_read

2016-10-10 Thread Ajay Garg
Following works : If(BIO_should_read(socket->ssl_bio) != 0) If(BIO_should_write(socket->ssl_bio) != 0) With this, I could get the entire end-to-end workflow to work Thanks a ton for all the help !!! On Mon, Oct 10, 2016 at 11:50 AM, Ajay Garg wrote: > Hi All. >

Re: [openssl-users] Getting the retry reason for a "failed" BIO_write/BIO_read

2016-10-10 Thread Ajay Garg
Hi Viktor, I am already setting that. socket->ssl_bio = BIO_new(BIO_f_ssl()); if (!(socket->ssl_bio)) { HANDLE_CATASTROPHIC_INIT_ERROR("client-ssl-bio") return; } SSL_set_connect_state(socket->ssl); SSL_set_bio(socket->ssl, socket->inter_bio,

Re: [openssl-users] Getting the retry reason for a "failed" BIO_write/BIO_read

2016-10-10 Thread Viktor Dukhovni
> On Oct 10, 2016, at 2:20 AM, Ajay Garg wrote: > >BIO *inter_bio; // intermediate-bio, have no idea > what it really is used for. The internal BIO from BIO_new_bio_pair must be attached to the SSL handle via: SSL_set_bio(ssl,

[openssl-users] Getting the retry reason for a "failed" BIO_write/BIO_read

2016-10-10 Thread Ajay Garg
Hi All. Taking the socket-structure as :: # SSL *ssl; BIO *ssl_bio; // app-payload-bytes will be written by app into it. BIO *inter_bio;