Skip to content

NetSSL_OpenSSL: non-blocking functions return value #4906

Open
@obiltschnig

Description

@obiltschnig

Non-blocking functions currently can return special return values, ERR_SSL_WANT_READ (-1) and ERR_SSL_WANT_WRITE (-2). However, it turns out that also a third value, ERR_SSL_WOULD_BLOCK is needed.

New definitions should be:

ERR_SSL_WOULD_BLOCK = -1,
ERR_SSL_WANT_READ  = -2,
ERR_SSL_WANT_WRITE = -3

Currently in case of EWOULDBLOCK, functions would return ERR_SSL_WANT_WRITE, which is wrong.

Unfortunately, this breaks the API in a minor version, but given that non-blocking TLS functions weren't working properly before 1.4.0 anyway, this is acceptable.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions