mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
QUIC APL: Wire SSL_get_[rw]poll_descriptor for TLS/DTLS
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)
This commit is contained in:
parent
3432157ba1
commit
f26244336f
@ -7318,26 +7318,32 @@ int SSL_get_event_timeout(SSL *s, struct timeval *tv, int *is_infinite)
|
||||
|
||||
int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc)
|
||||
{
|
||||
#ifndef OPENSSL_NO_QUIC
|
||||
if (!IS_QUIC(s))
|
||||
return -1;
|
||||
SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
|
||||
|
||||
return ossl_quic_get_rpoll_descriptor(s, desc);
|
||||
#else
|
||||
return -1;
|
||||
#ifndef OPENSSL_NO_QUIC
|
||||
if (IS_QUIC(s))
|
||||
return ossl_quic_get_rpoll_descriptor(s, desc);
|
||||
#endif
|
||||
|
||||
if (sc == NULL || sc->rbio == NULL)
|
||||
return 0;
|
||||
|
||||
return BIO_get_rpoll_descriptor(sc->rbio, desc);
|
||||
}
|
||||
|
||||
int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc)
|
||||
{
|
||||
#ifndef OPENSSL_NO_QUIC
|
||||
if (!IS_QUIC(s))
|
||||
return -1;
|
||||
SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
|
||||
|
||||
return ossl_quic_get_wpoll_descriptor(s, desc);
|
||||
#else
|
||||
return -1;
|
||||
#ifndef OPENSSL_NO_QUIC
|
||||
if (IS_QUIC(s))
|
||||
return ossl_quic_get_wpoll_descriptor(s, desc);
|
||||
#endif
|
||||
|
||||
if (sc == NULL || sc->wbio == NULL)
|
||||
return 0;
|
||||
|
||||
return BIO_get_wpoll_descriptor(sc->wbio, desc);
|
||||
}
|
||||
|
||||
int SSL_net_read_desired(SSL *s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user