Re: [openssl-users] Root-Level queries while using SSL-connections wrapping "sockets"

2016-10-09 Thread Ajay Garg
Hi Viktor. On Fri, Oct 7, 2016 at 11:17 PM, Viktor Dukhovni wrote: > On Fri, Oct 07, 2016 at 10:30:06PM +0530, Ajay Garg wrote: > >> Ok, so for sending app-payload-bytes, we do a bio_write() to "bio1", >> and if "bio1" requires reading from bio2/peer, bio_write() will

Re: [openssl-users] Root-Level queries while using SSL-connections wrapping "sockets"

2016-10-09 Thread Viktor Dukhovni
> On Oct 9, 2016, at 10:47 AM, Ajay Garg wrote: > >> However, it might sometimes return SSL_ERROR_WANT_READ, in which >> case, the SSL layer wants to read, even though the application >> wants to write. Your job is to do the read on the SSL layer's >> behalf, and then

Re: [openssl-users] Root-Level queries while using SSL-connections wrapping "sockets"

2016-10-09 Thread Ajay Garg
On Sun, Oct 9, 2016 at 10:55 PM, Viktor Dukhovni wrote: > >> On Oct 9, 2016, at 10:47 AM, Ajay Garg wrote: >> >>> However, it might sometimes return SSL_ERROR_WANT_READ, in which >>> case, the SSL layer wants to read, even though the

[openssl-users] Sequence of steps to initialize a ssl-session (only client-mode)

2016-10-09 Thread Ajay Garg
Hi All. We are just dealing with the client-side, and following are the steps :: SSL_library_init(); OpenSSL_add_ssl_algorithms(); OpenSSL_add_all_algorithms(); SSL_load_error_strings(); ERR_load_crypto_strings(); solitary_ssl_ctx = SSL_CTX_new(TLSv1_2_client_method());

[openssl-users] [PLEASE IGNORE] Re: Sequence of steps to initialize a ssl-session (only client-mode)

2016-10-09 Thread Ajay Garg
Sorry, the "send" button was clicked accidentally :( On Mon, Oct 10, 2016 at 10:55 AM, Ajay Garg wrote: > Hi All. > > We are just dealing with the client-side, and following are the steps :: > > SSL_library_init(); > OpenSSL_add_ssl_algorithms(); >

[openssl-users] [Version-2] Sequence of steps to initialize a ssl-session (only client-mode)

2016-10-09 Thread Ajay Garg
[Thanks Viktor, I made the change as suggested by you in the other incomplete email that I sent accidentally]. Hi All. We are just dealing with the client-side, and following are the steps :: #

Re: [openssl-users] Sequence of steps to initialize a ssl-session (only client-mode)

2016-10-09 Thread Viktor Dukhovni
> On Oct 10, 2016, at 1:25 AM, Ajay Garg wrote: > >solitary_ssl_ctx = SSL_CTX_new(TLSv1_2_client_method()); Don't use TLSv1_2_client_method(), instead use either: SSLv23_client_method() -- OpenSSL <= 1.0.2 TLS_client_method() -- OpenSSL >=

Re: [openssl-users] Root-Level queries while using SSL-connections wrapping "sockets"

2016-10-09 Thread Ajay Garg
Thanks Michael for the reply. And yes, your points are absolutely valid. We do not assume anything at the client/server as such, we just read the byte-streams, and generate (MQTT) packets out of bytestreams as and when the starting- and ending- boundaries of a (new) MQTT-packet are received.

Re: [openssl-users] [Version-2] Sequence of steps to initialize a ssl-session (only client-mode)

2016-10-09 Thread Ajay Garg
Damn the semicolon at the end :( Sorry for the noise. Thanks and Regards, Ajay On Mon, Oct 10, 2016 at 11:23 AM, Ajay Garg wrote: > [Thanks Viktor, I made the change as suggested by you in the other > incomplete email that I sent accidentally]. > > > Hi All. > > We are

Re: [openssl-users] Root-Level queries while using SSL-connections wrapping "sockets"

2016-10-09 Thread Michael Wojcik
> From: openssl-users [mailto:openssl-users-boun...@openssl.org] On Behalf > Of Ajay Garg > Sent: Sunday, October 09, 2016 14:12 > > Also, for all my cases, Nagle's algorithm has been disabled on the > client as well as the server, so every write (at client/server) > constitutes a