CVSROOT: /cvs Module name: src Changes by: js...@cvs.openbsd.org 2021/10/23 02:34:36
Modified files: lib/libssl : d1_both.c dtls_locl.h ssl_both.c ssl_clnt.c ssl_locl.h ssl_srvr.c Log message: Untangle ssl3_get_message() return values. This function currently has a long return type that may be <= 0 on error/retry (which is then cast to an int in order to return it up the stack), or it returns the length of the handshake message (on success). This obviously means that 0 can be returned for both success and failure, which is the reason why a separate 'ok' argument has to exist. Untangle this mess by changing the return value to an int that indicates success (1) or error/retry (<= 0). The length never needs to actually be returned as it is already stored in s->internal->init_num (which is where the return value is read from anyway). ok tb@