[PATCH] Possible case of 0 return on error in tls_read/tls_write

2018-02-13 Thread Devchandra L Meetei
Hi While going through code of `tls_read` listed below. It looks like to me that there is possibility of returning 0 on error when following code-flow takes place 1) if tls_handshake(ctx) returns 0, Now rv is 0. It goes to if ((ctx->state & TLS_HANDSHAKE_COMPLETE) == 0) { if ((rv

[PATCH] Possible case of 0 return on error in tls_read/tls_write

2018-02-13 Thread Devchandra L Meetei
Hi While going through code of `tls_read` listed below. It looks like to me that there is possibility of returning 0 on error when following code-flow takes place 1) if tls_handshake(ctx) returns 0, Now rv is 0. It goes to if ((ctx->state & TLS_HANDSHAKE_COMPLETE) == 0) { if ((rv