SSL_GET_EVENT_TIMEOUT(3ossl)
πΈ SSL_get_event_timeout β the "when do I need to check in on my SSL baby" girlie π
okay so this is from the 3ossl manual fam, and it's literally the function that tells you when your SSL object is gonna need a little attention next. bestie, it's giving "calendar reminder for your TLS situationship" ποΈβ¨
β¨ NAME β¨
SSL_get_event_timeout β determine when an SSL object next needs to have events handled π«Ά
π SYNOPSIS π
#include <openssl/ssl.h>
int SSL_get_event_timeout(SSL *s, struct timeval *tv, int *is_infinite);
π¦ DESCRIPTION π¦
SSL_get_event_timeout() figures out when your SSL object next needs to do some internal processing just because time passed. like, no data arrived, nobody said anything, it's just been sitting there and the clock is ticking, yk? β°
All arguments are required β no skipping, no "oops I forgot", tv and is_infinite must be non-NULL. periodt. π«
When SSL_get_event_timeout() returns successfully, one of these three iconic scenarios applies:
- Immediate girlie π¨ β the
SSLobject has events that need handling right now. The fields of*tvare set to0and*is_infiniteis set to0. - Soonβ’ β³ β the object has events that need handling after some amount of time (relative to the time you called
SSL_get_event_timeout(), iykyk).*tvis set to the amount of time after whichSSL_handle_events(3)should be called, and*is_infiniteis set to0. - Nothing on the schedule π β there are currently no timer events that need handling in the future. The value of
*tvis unspecified and*is_infiniteis set to1.
Real talk: this function is currently applicable only to DTLS and QUIC connection SSL objects. If you call it on any other kind of SSL object, it always outputs infinity β and that's actually considered a success condition, not a fail. slay. π
For DTLS, you can use this instead of the older DTLSv1_get_timeout(3). The glow-up here? This function differs from DTLSv1_get_timeout(3) in that the case where no timeout is active is considered a success condition. no cap, that's the upgrade. π
β οΈ heads up bestie: the value output by a call toSSL_get_event_timeout()may change as a result of other calls to theSSLobject. so don't go clutching that value like it's forever.
Once the timeout expires, SSL_handle_events(3) should be called to handle any internal processing which is due β for more info, go read SSL_handle_events(3). it's all connected, fr fr. π
Also, SSL_get_event_timeout() supersedes the older DTLSv1_get_timeout(3) function for all use cases. out with the old, in with the new. π
π if the call toSSL_get_event_timeout()fails, the values of*tvand*is_infinitemay still be changed, and their values become unspecified. so like... don't trust them after a fail, okay?
π RETURN VALUES π
1β success, we ate π0β failure, RIP π
π§ SEE ALSO π§
π HISTORY π
The SSL_get_event_timeout() function was added in OpenSSL 3.2. a modern icon, honestly. π
π COPYRIGHT π
Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
okay that's the whole page, no notes π this was 3.5.0, dated 2026-09-25, from the SSL_GET_EVENT_TIMEOUT(3ossl) fam β mwah, go handle ur events bestie ππ β¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms