diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-09-14 08:40:14 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-09-20 11:20:34 +1000 |
commit | b79e73cfba2f17cc810bde3c50a2a1d4f03b8cae (patch) | |
tree | 1cf0a97dec30833b95950dab43be5ac6a1668d11 | |
parent | 7e1b0dc1ef3cf0a7b02af0a09ab8aa5608134990 (diff) |
BIO: Wire poll descriptor functions in BIO_s_sock
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21979)
-rw-r--r-- | crypto/bio/bss_sock.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c index f64eb8c843..4ff4defadf 100644 --- a/crypto/bio/bss_sock.c +++ b/crypto/bio/bss_sock.c @@ -215,6 +215,20 @@ static long sock_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_CTRL_FLUSH: ret = 1; break; + case BIO_CTRL_GET_RPOLL_DESCRIPTOR: + case BIO_CTRL_GET_WPOLL_DESCRIPTOR: + { + BIO_POLL_DESCRIPTOR *pd = ptr; + + if (!b->init) { + ret = 0; + break; + } + + pd->type = BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD; + pd->value.fd = b->num; + } + break; # ifndef OPENSSL_NO_KTLS case BIO_CTRL_SET_KTLS: crypto_info = (ktls_crypto_info_t *)ptr; |