SSL_GET_VALUE_UINT(3ssl)
β¨ NAME β¨
okay so welcome to the SSL_GET_VALUE_UINT(3ssl) page, bestie β this is literally the control room for managing negotiable features and configuration values for an SSL object. π
The whole squad is:
SSL_get_value_uint, SSL_set_value_uint, SSL_get_generic_value_uint,
SSL_set_generic_value_uint, SSL_get_feature_request_uint,
SSL_set_feature_request_uint, SSL_get_feature_peer_request_uint,
SSL_get_feature_negotiated_uint, SSL_get_quic_stream_bidi_local_avail,
SSL_get_quic_stream_bidi_remote_avail,
SSL_get_quic_stream_uni_local_avail,
SSL_get_quic_stream_uni_remote_avail, SSL_VALUE_CLASS_GENERIC,
SSL_VALUE_CLASS_FEATURE_REQUEST, SSL_VALUE_CLASS_FEATURE_PEER_REQUEST,
SSL_VALUE_CLASS_FEATURE_NEGOTIATED,
SSL_VALUE_QUIC_STREAM_BIDI_LOCAL_AVAIL,
SSL_VALUE_QUIC_STREAM_BIDI_REMOTE_AVAIL,
SSL_VALUE_QUIC_STREAM_UNI_LOCAL_AVAIL,
SSL_VALUE_QUIC_STREAM_UNI_REMOTE_AVAIL, SSL_VALUE_QUIC_IDLE_TIMEOUT,
SSL_VALUE_QUIC_UDP_PAYLOAD_SIZE_MAX, SSL_VALUE_QUIC_WINDOWCON,
SSL_VALUE_QUIC_WINDOWBSTR, SSL_VALUE_QUIC_WINDOWUSTR,
SSL_VALUE_QUIC_ACK_DELAY_EXPONENT, SSL_VALUE_QUIC_ACK_DELAY_MAX,
SSL_VALUE_QUIC_MAX_PENDING_CONNS,
SSL_VALUE_DTLS_LISTENER_MAX_PENDING_CONNS,
SSL_VALUE_DTLS_LISTENER_PENDING_TIMEOUT,
SSL_VALUE_DTLS_LISTENER_MAX_DGRAM_SIZE, SSL_VALUE_EVENT_HANDLING_MODE,
SSL_VALUE_EVENT_HANDLING_MODE_INHERIT,
SSL_VALUE_EVENT_HANDLING_MODE_EXPLICIT,
SSL_VALUE_EVENT_HANDLING_MODE_IMPLICIT, SSL_get_event_handling_mode,
SSL_set_event_handling_mode, SSL_VALUE_STREAM_WRITE_BUF_SIZE,
SSL_get_stream_write_buf_size, SSL_VALUE_STREAM_WRITE_BUF_USED,
SSL_get_stream_write_buf_used, SSL_VALUE_STREAM_WRITE_BUF_AVAIL,
SSL_get_stream_write_buf_avail
and the whole vibe is: manage negotiable features and configuration values for an SSL object. periodt. π
π¦ SYNOPSIS π¦
#include <openssl/ssl.h>
int SSL_get_value_uint(SSL *ssl, uint32_t class_, uint32_t id,
uint64_t *value);
int SSL_set_value_uint(SSL *ssl, uint32_t class_, uint32_t id,
uint64_t value);
#define SSL_VALUE_CLASS_GENERIC
#define SSL_VALUE_CLASS_FEATURE_REQUEST
#define SSL_VALUE_CLASS_FEATURE_PEER_REQUEST
#define SSL_VALUE_CLASS_FEATURE_NEGOTIATED
#define SSL_VALUE_QUIC_STREAM_BIDI_LOCAL_AVAIL
#define SSL_VALUE_QUIC_STREAM_BIDI_REMOTE_AVAIL
#define SSL_VALUE_QUIC_STREAM_UNI_LOCAL_AVAIL
#define SSL_VALUE_QUIC_STREAM_UNI_REMOTE_AVAIL
#define SSL_VALUE_QUIC_IDLE_TIMEOUT
#define SSL_VALUE_QUIC_UDP_PAYLOAD_SIZE_MAX
#define SSL_VALUE_QUIC_WINDOWCON
#define SSL_VALUE_QUIC_WINDOWBSTR
#define SSL_VALUE_QUIC_WINDOWUSTR
#define SSL_VALUE_QUIC_ACK_DELAY_EXPONENT
#define SSL_VALUE_QUIC_ACK_DELAY_MAX
#define SSL_VALUE_QUIC_MAX_PENDING_CONNS
#define SSL_VALUE_DTLS_LISTENER_MAX_PENDING_CONNS
#define SSL_VALUE_DTLS_LISTENER_PENDING_TIMEOUT
#define SSL_VALUE_DTLS_LISTENER_MAX_DGRAM_SIZE
#define SSL_VALUE_EVENT_HANDLING_MODE
#define SSL_VALUE_EVENT_HANDLING_MODE_INHERIT
#define SSL_VALUE_EVENT_HANDLING_MODE_EXPLICIT
#define SSL_VALUE_EVENT_HANDLING_MODE_IMPLICIT
#define SSL_VALUE_STREAM_WRITE_BUF_SIZE
#define SSL_VALUE_STREAM_WRITE_BUF_USED
#define SSL_VALUE_STREAM_WRITE_BUF_AVAIL
The following convenience macros can also be used:
int SSL_get_generic_value_uint(SSL *ssl, uint32_t id, uint64_t *value);
int SSL_set_generic_value_uint(SSL *ssl, uint32_t id, uint64_t value);
int SSL_get_feature_request_uint(SSL *ssl, uint32_t id, uint64_t *value);
int SSL_set_feature_request_uint(SSL *ssl, uint32_t id, uint64_t value);
int SSL_get_feature_peer_request_uint(SSL *ssl, uint32_t id, uint64_t *value);
int SSL_get_feature_negotiated_uint(SSL *ssl, uint32_t id, uint64_t *value);
int SSL_get_quic_stream_bidi_local_avail(SSL *ssl, uint64_t *value);
int SSL_get_quic_stream_bidi_remote_avail(SSL *ssl, uint64_t *value);
int SSL_get_quic_stream_uni_local_avail(SSL *ssl, uint64_t *value);
int SSL_get_quic_stream_uni_remote_avail(SSL *ssl, uint64_t *value);
int SSL_get_event_handling_mode(SSL *ssl, uint64_t *value);
int SSL_set_event_handling_mode(SSL *ssl, uint64_t value);
int SSL_get_stream_write_buf_size(SSL *ssl, uint64_t *value);
int SSL_get_stream_write_buf_avail(SSL *ssl, uint64_t *value);
int SSL_get_stream_write_buf_used(SSL *ssl, uint64_t *value);
π DESCRIPTION π
okay so SSL_get_value_uint() and SSL_set_value_uint() are your access pass to configurable parameters for a given SSL object. Amongst other things, theyβre used to give you control over the feature negotiation process during establishment of a connection, plus access to statistics about that connection. slay. β¨
SSL_get_value_uint() and SSL_set_value_uint() get and set configurable values within a given value class. The value classes are enumerated by SSL_VALUE_CLASS and they are:
SSL_VALUE_CLASS_GENERICβ values in this class do not participate in the feature negotiation process. They may represent connection parameters which do not participate in explicit negotiation or provide connection statistics. Values in this class might be read-write or read-only. You can access values in this class using the convenience macrosSSL_get_generic_value_uint()andSSL_set_generic_value_uint()for brevity. π«ΆSSL_VALUE_CLASS_FEATURE_REQUESTβ values in this class are read-write, and represent what the local party is requesting during feature negotiation. Such a request will not necessarily be honoured; seeSSL_VALUE_CLASS_FEATURE_NEGOTIATED. A value in this class may become read-only in certain circumstances; for example, after a connection has been established, for a value which cannot be renegotiated after connection establishment. Setting a value in this class after connection establishment represents a request for online renegotiation of the specified feature. You can access values in this class using the convenience macrosSSL_get_feature_request_uint()andSSL_set_feature_request_uint()for brevity. πSSL_VALUE_CLASS_FEATURE_PEER_REQUESTβ values in this value class are read-only, and represent what was requested by a peer during feature negotiation. Such a request has not necessarily been honoured; seeSSL_VALUE_CLASS_FEATURE_NEGOTIATED. You can access values in this class using the convenience macroSSL_get_feature_peer_request_uint()for brevity. πSSL_VALUE_CLASS_FEATURE_NEGOTIATEDβ values in this value class are read-only, and represent the value which was actually negotiated based on both local and peer input during feature negotiation. This is the effective value in actual use. Attempting to read a value in this class will generally fail if the feature negotiation process has not yet completed and the value is therefore currently unknown, unless the nature of the feature in question causes a provisional value to be used prior to completion of feature negotiation, in which case that value may be returned. If an online (post-handshake) renegotiation of a feature is in progress, retrieving the negotiated value will continue to retrieve the previous negotiated value until that process is completed. See the documentation of specific values for full details of its behaviour. You can access values in this class using the convenience macroSSL_get_feature_negotiated_uint()for brevity. π
π§ CONFIGURABLE VALUES FOR QUIC OBJECTS π§
The following configurable values are supported for QUIC SSL objects. Whether a value is supported for a QUIC connection SSL object or a QUIC stream SSL object is indicated in the heading for each value. Values supported for QUIC stream SSL objects are also supported on QUIC connection SSL objects if they have a default stream attached. iykyk. π
SSL_get_value() does not cause internal event processing to occur unless the documentation for a specific value specifies otherwise.
SSL_VALUE_QUIC_IDLE_TIMEOUT(connection/listener object) β Negotiated feature value. This configures the desired QUIC idle timeout in milliseconds, where0represents a lack of an idle timeout. This feature can only be configured prior to connection establishment and cannot be subsequently changed. This release of OpenSSL uses a default value of30 seconds. This default value may change between releases of OpenSSL. βSSL_VALUE_QUIC_UDP_PAYLOAD_SIZE_MAX(connection/listener object) β Feature (peer) request value. This configures the maximum UDP payload size in bytes, corresponding to the QUICmax_udp_payload_sizetransport parameter as defined in RFC 9000, Section 18.2. It limits the size of UDP datagrams the local QUIC stack is willing to receive from the peer. It does not change the maximum datagram payload size used on the transmit path. This feature can only be configured prior to connection establishment and cannot be subsequently changed. This value will be sent to the peer in the transport parameters. This release of OpenSSL uses a default value of1200 bytes. This default value may change between releases of OpenSSL. π₯SSL_VALUE_QUIC_WINDOWCON(connection/listener object) β Feature (peer) request value. This configures the initial QUIC connection-level flow control receive window in bytes. This feature can only be configured prior to connection establishment and cannot be subsequently changed. This value will be sent to the peer in the transport parameters. This release of OpenSSL uses a default value of768 * 1024 bytes. This default value may change between releases of OpenSSL. πΈSSL_VALUE_QUIC_WINDOWBSTR(connection/listener object) β Feature (peer) request value. This sets the initial receive window size, in bytes, for QUIC stream flow control on a bidirectional stream created by the local endpoint. This feature can only be configured prior to connection establishment and cannot be subsequently changed. This value will be sent to the peer in the transport parameters. This release of OpenSSL uses a default value of512 * 1024 bytes. This default value may change between releases of OpenSSL. π¦SSL_VALUE_QUIC_WINDOWUSTR(connection/listener object) β As above, but configures the initial receive window size for QUIC stream flow control on a unidirectional stream created by the remote endpoint. πSSL_VALUE_QUIC_ACK_DELAY_EXPONENT(connection/listener object) β Feature (peer) request value. This configures the ACK delay exponent. This feature can only be configured prior to connection establishment and cannot be subsequently changed. This value will be sent to the peer in the transport parameters. This release of OpenSSL uses a default value of3. This default value may change between releases of OpenSSL. π«
SSL_VALUE_QUIC_ACK_DELAY_MAX (connection/listener object) π
Okay so this one's a feature (peer) request value β it configures the maximum ACK delay in milliseconds. And listen: this can only be configured prior to connection establishment and cannot be subsequently changed. No take-backs, bestie. π This value gets sent to the peer in the transport parameters.
This release of OpenSSL uses a default value of 25 milliseconds. This default value may change between releases of OpenSSL, so don't come for me if it's different in the next one.
SSL_VALUE_QUIC_MAX_PENDING_CONNS (listener object) π¦
Generic value. This sets the limit on channels (connection objects) which a QUIC server can insert into the list of pending connections. And what's a pending connection, you ask? It's a connection which the local application needs to accept (SSL_accept_connection(3)) in order to retrieve an SSL connection object. The connection gets removed from the pending queue by a call to SSL_accept_connection(3).
The default limit for pending connections is 256. An INITIAL QUIC packet which is received by a QUIC server with a full pending connections queue is silently discarded β just gone, no note, no nothing. π Setting the value to zero disables the limit.
SSL_VALUE_QUIC_STREAM_BIDI_LOCAL_AVAIL (connection object) β¨
Generic read-only statistical value. This is the number of bidirectional, locally-initiated streams available to be created (but not yet created). Obsessed with this example: a value of 100 would mean that SSL_new_stream(3) could be called 100 times to create 100 bidirectional streams before SSL_new_stream(3) would block or fail due to backpressure. Iconic.
Can be queried using the convenience macro SSL_get_quic_stream_bidi_local_avail().
SSL_VALUE_QUIC_STREAM_UNI_LOCAL_AVAIL (connection object) πΈ
As above, but provides the number of unidirectional, locally-initiated streams available to be created (but not yet created).
Can be queried using the convenience macro SSL_get_quic_stream_uni_local_avail().
SSL_VALUE_QUIC_STREAM_BIDI_REMOTE_AVAIL (connection object) π«Ά
As above, but provides the number of bidirectional, remotely-initiated streams available to be created (but not yet created) by the peer. This represents the number of streams the local endpoint has authorised the peer to create in terms of QUIC stream creation flow control. It's giving permission slip energy, honestly.
Can be queried using the convenience macro SSL_get_quic_stream_bidi_remote_avail().
SSL_VALUE_QUIC_STREAM_UNI_REMOTE_AVAIL (connection object) π
As above, but provides the number of unidirectional, remotely-initiated streams available to be created (but not yet created).
Can be queried using the convenience macro SSL_get_quic_stream_uni_remote_avail().
SSL_VALUE_EVENT_HANDLING_MODE (connection or stream object) π₯
Generic value. This is an integer value which takes one of the following values, and determines the event handling mode in use β so yeah, it's kind of a big deal:
SSL_VALUE_EVENT_HANDLING_MODE_INHERIT
When set, the event handling mode used is inherited from the value set on the parent connection (for a stream), or, for a connection, defaults to the implicit event handling model.
When a new connection is created, or a new stream is created or accepted, it defaults to this setting.
SSL_VALUE_EVENT_HANDLING_MODE_IMPLICIT (Implicit event handling)
If set to this value, the implicit event handling model is used. Under this model, QUIC objects will automatically perform background event processing (equivalent to a call to SSL_handle_events(3)) when calls to I/O functions such as SSL_read_ex(3) or SSL_write_ex(3) are made on a QUIC SSL object. This helps to maintain the health of the QUIC connection and ensures that incoming datagrams and timeout events are processed. It's the self-care setting π β your connection just keeps itself alive in the background.
SSL_VALUE_EVENT_HANDLING_MODE_EXPLICIT (Explicit event handling)
If set to this value, the explicit event handling model is used. Under this model, nonblocking calls to I/O functions such as SSL_read_ex(3) or SSL_write_ex(3) do not result in the automatic processing of QUIC events. Lowkey important: any new incoming network traffic is not handled; no new outgoing network traffic is generated, and pending timeout events are not processed. This allows an application to obtain greater control over the circumstances in which QUIC event processing occurs. If this event handling model is used, it is the application's responsibility to call SSL_handle_events(3) as and when called for by the QUIC implementation; see the SSL_get_rpoll_descriptor(3) man page for more information.
Selecting this model does not affect the operation of blocking I/O calls, which will continue to use the implicit event handling model. Therefore, applications using this model will generally want to disable blocking operation using SSL_set_blocking_mode(3).
Can be configured using the convenience macros SSL_get_event_handling_mode() and SSL_set_event_handling_mode().
Heads up, bestie: a call toSSL_set_value_uint()which causes this value to switch back to the implicit event handling model does not in itself cause implicit event handling to occur; such handling will occur on the next I/O API call. Equally, a call toSSL_set_value_uint()which causes this value to switch to the explicit event handling model will not cause event handling to occur before making that transition. Timing is everything. β³
This value controls whether implicit event handling occurs when making an I/O API call on the SSL object it is set on. However, event processing is not confined to state which relates to only that object. For example, if you configure explicit event handling on QUIC stream SSL object "A" and configure implicit event handling on QUIC stream SSL object "B", a call to an I/O function on "B" may result in state changes to "A". In other words, if event handling does happen as a result of an API call to an object related to a connection, processing of background events (for example, received QUIC network traffic) may also affect the state of any other object related to a connection. They're all in the group chat together, basically. π
SSL_VALUE_STREAM_WRITE_BUF_SIZE (stream object) π
Generic read-only statistical value. The size of the write buffer allocated to hold data written to a stream with SSL_write_ex(3) until it is transmitted and subsequently acknowledged by the peer. This value may change at any time, as buffer sizes are optimised in response to network conditions to optimise throughput. She's flexible, she adapts. β¨
Can be queried using the convenience macro SSL_get_stream_write_buf_size().
SSL_VALUE_STREAM_WRITE_BUF_USED (stream object) π§
Generic read-only statistical value. The number of bytes currently consumed in the write buffer which have yet to be acknowledged by the peer. Successful calls to SSL_write_ex(3) which accept data cause this number to increase. This number will then decrease as data is acknowledged by the peer.
Can be queried using the convenience macro SSL_get_stream_write_buf_used().
SSL_VALUE_STREAM_WRITE_BUF_AVAIL (stream object) π
Generic read-only statistical value. The number of bytes available in the write buffer which have yet to be consumed by calls to SSL_write_ex(3). Successful calls to SSL_write_ex(3) which accept data cause this number to decrease. This number will increase as data is acknowledged by the peer. It may also change if the buffer is resized automatically to optimise throughput.
Can be queried using the convenience macro SSL_get_stream_write_buf_avail().
π CONFIGURABLE VALUES FOR DTLS SSL LISTENER OBJECTS π
okay so bestie, these are the knobs for the DTLS SSL listener objects made by SSL_new_listener(3). And the vibe here is very different from the QUIC stuff, because these are purely local configuration values β they do not get negotiated with a peer, they don't get chatted about in any handshake, they're just your side of the story. π«Ά
Because of that, you access them with the SSL_VALUE_CLASS_GENERIC value class β like, for example, via the SSL_get_generic_value_uint() and SSL_set_generic_value_uint() convenience macros β¨. And if you try to use any other value class? it fails with an error, no cap. π
πΈ SSL_VALUE_DTLS_LISTENER_MAX_PENDING_CONNS (DTLS listener object)
Generic value β¨. This one bounds the number of connections a DTLS listener created by SSL_new_listener(3) owns at any one time β and that count is both:
- pending (handshake-in-progress) connections, plus
- validated connections waiting in the accept queue for
SSL_accept_connection(3).
When you hit the limit, datagrams from novel peers get silently discarded before any connection state is even allocated π. The peer just retransmits its ClientHello and gets admitted once a slot frees up β king behavior honestly π.
And listen: a connection returned by SSL_accept_connection(3) is no longer counted. It's out of the budget, living its best life.
The default limit is 256. Setting the value to 0 is rejected β because a cap of 0 would reject every incoming connection and leave the listener unable to accept anything, which is giving "built a door with no door" energy π.
Lowering the value does not evict connections the listener already owns; it only affects later admission. Stale pending entries age out via SSL_VALUE_DTLS_LISTENER_PENDING_TIMEOUT β but accept-queue entries do not expire. periodt.
β³ SSL_VALUE_DTLS_LISTENER_PENDING_TIMEOUT (DTLS listener object)
Generic value β¨. This sets the maximum time in milliseconds that a pending (handshake-in-progress) DTLS connection may remain in the listener's pending table before being reaped πΎ.
Expired pending connections are silently discarded, which frees a slot in the SSL_VALUE_DTLS_LISTENER_MAX_PENDING_CONNS budget β recycling, we love to see it π. The timeout applies only to the pending table; accept-queue entries do not expire, iykyk.
The default is 30000 (30 seconds). Setting the value to 0 is rejected β a zero timeout will remove all pending connections on the next tick, before the handshake could complete, and that's just sabotage π.
Setting the value to UINT64_MAX disables the timeout, so pending connections are never expired. Feral. Iconic. Choose wisely. π
π¦ SSL_VALUE_DTLS_LISTENER_MAX_DGRAM_SIZE (DTLS listener object)
Generic value β¨. Sets the maximum size in bytes of a datagram that a DTLS listener created by SSL_new_listener(3) will receive.
Datagrams larger than this get truncated by the operating system on receipt β and for a handshake datagram, like a large ClientHello, that's a whole problem: it prevents the connection from being established. Not the vibe. π
The default is 2000, and it was chosen a little above the 1500-byte Ethernet MTU so that a DTLS 1.3 ClientHello carrying large (for example post-quantum) key shares is received whole rather than truncated. Slay, future-proofing π§.
Deployments over a transport with a larger MTU (for example jumbo frames) may raise it. Values are clamped to 65535 (the maximum UDP payload), and values below the minimum receive size (1200) are rejected. The math is mathing, bestie. π
β¨ RETURN VALUES β¨
Returns 1 on success or 0 on failure. And ngl, this function can fail for a number of reasons:
- An argument is invalid (e.g.
NULLpointer or invalid class). π - The given value is not supported by the
SSLobject on which it was called. - The given operation (get or set) is not supported by the specified configurable value.
- You are trying to modify the given value and the value is not modifiable at this time. (Read the room, bestie.)
π¦ SEE ALSO π¦
SSL_ctrl(3)SSL_get_accept_stream_queue_len(3)SSL_get_stream_read_state(3)SSL_get_stream_write_state(3)SSL_get_stream_read_error_code(3)SSL_get_stream_write_error_code(3)SSL_set_default_stream_mode(3)SSL_set_incoming_stream_policy(3)SSL_accept_connection(3)
π HISTORY π
okay so the lore π: the values SSL_VALUE_QUIC_UDP_PAYLOAD_SIZE_MAX, SSL_VALUE_QUIC_WINDOWCON, SSL_VALUE_QUIC_WINDOWBSTR, SSL_VALUE_QUIC_WINDOWUSTR, SSL_VALUE_QUIC_ACK_DELAY_EXPONENT, and SSL_VALUE_QUIC_ACK_DELAY_MAX were added in OpenSSL 4.1.
The value SSL_VALUE_QUIC_MAX_PENDING_CONNS has been added in OpenSSL 4.1 and ported to older releases 4.0.2, 3.6.4 and 3.5.8. Backport queen behavior, honestly π.
The remaining functions and values described here were all added in OpenSSL 3.3.
π COPYRIGHT π
Copyright 2002-2026 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>.
aaaand that's the whole page bestie!! π this gem is from OpenSSL 4.1.0, dated 2026-10-23, and it's the SSL_GET_VALUE_UINT(3ssl) page β go forth and configure your listeners with confidence, mwah π«Άβ¨π
π¦ where this page comes from
- nixos 26.05: openssl 4.1.0
- nixpkgs unstable: openssl 4.1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms