SSL_GET_EVENT_TIMEOUT(3ossl)
π NAME π
okay so this is SSL_get_event_timeout(3ossl), from the OpenSSL manual, section 3ossl β itβs literally about determining when an SSL object next needs to have events handled, bestie π
β¨ SYNOPSIS β¨
#include <openssl/ssl.h>
int SSL_get_event_timeout(SSL *s, struct timeval *tv, int *is_infinite);
π DESCRIPTION π
SSL_get_event_timeout() determines when the SSL object next needs to perform internal processing due to the passage of time. yes, itβs giving βtimer vibesβ β°β¨
All arguments are required; tv and is_infinite must be non-NULL. no skipping, no NULL shenanigans π
Upon the successful return of SSL_get_event_timeout(), one of the following cases applies:
- The
SSLobject has events which need to be handled immediately; the fields of*tvare set to0and*is_infiniteis set to0. - The
SSLobject has events which need to be handled after some amount of time (relative to the time at whichSSL_get_event_timeout()was called).*tvis set to the amount of time after whichSSL_handle_events(3)should be called and*is_infiniteis set to0. - There are currently no timer events which require handling in the future. The value of
*tvis unspecified and*is_infiniteis set to1.
This function is currently applicable only to DTLS and QUIC connection SSL objects. If it is called on any other kind of SSL object, it always outputs infinity. This is considered a success condition. periodt π«
For DTLS, this function can be used instead of the older DTLSv1_get_timeout(3) function. Note that this function differs from DTLSv1_get_timeout(3) in that the case where no timeout is active is considered a success condition. lowkey iconic behavior π
Note that the value output by a call to SSL_get_event_timeout() may change as a result of other calls to the SSL object. so donβt treat it like a forever-stamped receipt, bestie π§Ύβ¨
Once the timeout expires, SSL_handle_events(3) should be called to handle any internal processing which is due; for more information, see SSL_handle_events(3).
Note that SSL_get_event_timeout() supersedes the older DTLSv1_get_timeout(3) function for all use cases. it ate and left no crumbs π½οΈπ
ngl, if the call toSSL_get_event_timeout()fails, the values of*tvand*is_infinitemay still be changed and their values become unspecified π so donβt trust them blindly after a failure.
π«Ά RETURN VALUES π«Ά
Returns 1 on success and 0 on failure. fr fr, thatβs the whole vibe check β
π SEE ALSO π
π¦ HISTORY π¦
The SSL_get_event_timeout() function was added in OpenSSL 3.2. a whole era π
π 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.
Source/version: OpenSSL 3.5.6 β date: 2026-04-07. Thatβs the SSL_GET_EVENT_TIMEOUT(3ossl) tea, bestie π«Άπβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms