mirror of
https://github.com/openssl/openssl.git
synced 2024-12-15 06:01:37 +08:00
QUIC APL: Allow DTLSv1 APIs to be used for compatibility
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20879)
This commit is contained in:
parent
a28ac613dc
commit
2f90ea3dae
@ -1057,6 +1057,18 @@ long ossl_quic_ctrl(SSL *s, int cmd, long larg, void *parg)
|
||||
/* This ctrl also needs to be passed to the internal SSL object */
|
||||
return SSL_ctrl(ctx.qc->tls, cmd, larg, parg);
|
||||
|
||||
case DTLS_CTRL_GET_TIMEOUT: /* DTLSv1_get_timeout */
|
||||
{
|
||||
int is_infinite;
|
||||
|
||||
if (!ossl_quic_get_event_timeout(s, parg, &is_infinite))
|
||||
return 0;
|
||||
|
||||
return !is_infinite;
|
||||
}
|
||||
case DTLS_CTRL_HANDLE_TIMEOUT: /* DTLSv1_handle_timeout */
|
||||
/* For legacy compatibility with DTLS calls. */
|
||||
return ossl_quic_handle_events(s) == 1 ? 1 : -1;
|
||||
default:
|
||||
/* Probably a TLS related ctrl. Defer to our internal SSL object */
|
||||
return SSL_ctrl(ctx.qc->tls, cmd, larg, parg);
|
||||
|
Loading…
Reference in New Issue
Block a user