diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-05-03 20:22:15 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-05-29 08:51:12 +0200 |
commit | 2f90ea3daef94ab9806ae20eab1f37986d53eade (patch) | |
tree | 0155ce9a63ccfafdaf5fe686bff313755136abaf /ssl/quic/quic_impl.c | |
parent | QUIC: Update documentation for SSL_get_event_timeout (diff) | |
download | openssl-2f90ea3daef94ab9806ae20eab1f37986d53eade.tar.xz openssl-2f90ea3daef94ab9806ae20eab1f37986d53eade.zip |
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)
Diffstat (limited to '')
-rw-r--r-- | ssl/quic/quic_impl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index 8f319ec977..d9ee5cf96e 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -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); |