6 Commits

Author SHA1 Message Date
Azat Khuzhin
41b5ab0f49 bufferevent_ssl: check return value of the evbuffer_drain()
Refs: #1163
2021-09-19 00:39:54 +03:00
Azat Khuzhin
59e31c9667 Do not try to do SSL handshake if the connect() fails
This will avoid this icky error:

    $ https-client -4 -url https://127.1
    some request failed - no idea which one though!
    error:00000005:lib(0):func(0):DH lib

And instead will report only:

    $ https-client -4 -url https://127.1
    some request failed - no idea which one though!
    socket error = Connection refused (111)

Refs: #1115
2020-11-05 00:57:39 +03:00
Azat Khuzhin
a490172d69 Introduce new BUFFEREVENT_SSL_BATCH_WRITE flag to avoid Nagle effect in SSL 2020-10-31 23:04:46 +03:00
Azat Khuzhin
7e0fc878c5 Introduce new API for flags of the SSL bufferevent
Introduce more generic API (like for evbuffer):
- bufferevent_ssl_set_flags()
- bufferevent_ssl_clear_flags()
- bufferevent_ssl_get_flags()

And deprecate existing:
- bufferevent_openssl_get_allow_dirty_shutdown()
- bufferevent_openssl_set_allow_dirty_shutdown()
- bufferevent_mbedtls_get_allow_dirty_shutdown()
- bufferevent_mbedtls_set_allow_dirty_shutdown()
2020-10-31 22:51:40 +03:00
Azat Khuzhin
5671575a1c Join le_ssl_ops.post_init with le_ssl_ops.init 2020-07-22 23:08:50 +03:00
okhowang(王沛文)
d095b834a9 Merge ssl implementations (openssl and mbedtls)
This patch splits common part out to avoid copy-paste from the
- bufferevent_openssl.c
- bufferevent_mbedtls.c

It uses VFS/bufferevent-like approach, i.e. structure of callbacks.
2020-07-22 23:03:17 +03:00