SSL_GET_VALUE_UINT(3SSL)
π¦ ssl_get_value_uint, bestie edition π¦
okay so this page is SSL_GET_VALUE_UINT(3SSL) from the OpenSSL manual, and it is lowkey a whole friend group of functions π. They all hang out together and they all deal with the same thing: negotiable features and configuration values for an SSL object. That's the vibe. Let's go π«Ά
π NAME π
Say hi to the whole squad π:
SSL_get_value_uint,SSL_set_value_uintSSL_get_generic_value_uint,SSL_set_generic_value_uintSSL_get_feature_request_uint,SSL_set_feature_request_uintSSL_get_feature_peer_request_uintSSL_get_feature_negotiated_uintSSL_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_availSSL_VALUE_CLASS_GENERIC,SSL_VALUE_CLASS_FEATURE_REQUEST,SSL_VALUE_CLASS_FEATURE_PEER_REQUEST,SSL_VALUE_CLASS_FEATURE_NEGOTIATEDSSL_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_MAX_PENDING_CONNSSSL_VALUE_EVENT_HANDLING_MODE,SSL_VALUE_EVENT_HANDLING_MODE_INHERIT,SSL_VALUE_EVENT_HANDLING_MODE_EXPLICIT,SSL_VALUE_EVENT_HANDLING_MODE_IMPLICITSSL_get_event_handling_mode,SSL_set_event_handling_modeSSL_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 together, all of them manage negotiable features and configuration values for an SSL object β¨
πΈ 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_MAX_PENDING_CONNS
#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 π
so SSL_get_value_uint() and SSL_set_value_uint() are literally your little doorway into the configurable parameters of a given SSL object π. Amongst other things, they give you control over the feature negotiation process while a connection is being established, and they also hand you statistics about that connection. two jobs, one legend.
SSL_get_value_uint() and SSL_set_value_uint() get and set configurable values inside a given value class. The value classes are enumerated by SSL_VALUE_CLASS and they are, in order:
π SSL_VALUE_CLASS_GENERIC π
Values in this class do not participate in the feature negotiation process, bestie. They might be connection parameters that don't do explicit negotiation, or they might just be connection statistics. Values in this class can be read-write or read-only, it depends.
For the short version, you can reach values in this class with the convenience macros SSL_get_generic_value_uint() and SSL_set_generic_value_uint(). brevity slay β¨
π¦ SSL_VALUE_CLASS_FEATURE_REQUEST π¦
These ones are read-write, and they represent what your local party is requesting during feature negotiation. And likeβ¦ a request is not a promise ngl β it won't necessarily be honoured. Go look at SSL_VALUE_CLASS_FEATURE_NEGOTIATED for the actual outcome.
Heads up thooo: a value in this class may become read-only in certain circumstances π β for example after a connection has been established, for a value that cannot be renegotiated after connection establishment. And setting a value in this class after connection establishment? That's you asking for online renegotiation of the specified feature.
Convenience macros for this class: SSL_get_feature_request_uint() and SSL_set_feature_request_uint(). obsessed π
π SSL_VALUE_CLASS_FEATURE_PEER_REQUEST π
This value class is read-only, and it represents what was requested by a peer during feature negotiation. And again β a request has not necessarily been honoured, so check SSL_VALUE_CLASS_FEATURE_NEGOTIATED.
Convenience macro for this one: SSL_get_feature_peer_request_uint() π«Ά
π SSL_VALUE_CLASS_FEATURE_NEGOTIATED π
Read-only, and this is the one that ate: it holds the value that was actually negotiated, based on both local and peer input during feature negotiation. This is the effective value in actual use. periodt π
Now the fine print, because it matters:
- Trying to read a value in this class will generally fail if the feature negotiation process hasn't finished yet and the value is therefore currently unknownβ¦
- β¦unless the nature of the feature in question means a provisional value gets used before feature negotiation completes, 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 keep giving you the previous negotiated value until that process is completed.
See the documentation of specific values for the full details of how it behaves, iykyk π₯
Convenience macro: SSL_get_feature_negotiated_uint(). use it, it's iconic β
to be continuedβ¦ more of this page is coming, don't go anywhere π
β¨ CONFIGURABLE VALUES FOR QUIC OBJECTS β¨
ok bestie, here's the whole menu of tunable values you can poke at on QUIC SSL objects π«Ά
Whether a value works on a QUIC connection SSL object or a QUIC stream SSL object is spelled out right there in the heading of each one, okay? And heads up: values that are supported for QUIC stream SSL objects are also supported on QUIC connection SSL objects if they have a default stream attached. cute, right?
Important lil note: SSL_get_value() does not cause internal event processing to happen unless the docs for that specific value say otherwise. no sneaky background work, periodt.
π SSL_VALUE_QUIC_IDLE_TIMEOUT (connection object)
Negotiated feature value. This configures the desired QUIC idle timeout in milliseconds, where 0 means "no idle timeout at all, we're immortal π". This feature can only be configured prior to connection establishment and cannot be changed afterwards β so set it early or cry about it later.
This release of OpenSSL uses a default value of 30 seconds. That default may change between releases of OpenSSL, so don't you dare hardcode a vibe check on it.
π¦ SSL_VALUE_QUIC_MAX_PENDING_CONNS (listener object)
Generic value, and it sets the limit on channels (connection objects) which a QUIC server can insert into the list of pending connections. A pending connection is a connection which the local application needs to accept via 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 a QUIC server receives while the pending connections queue is full is silently discarded π β bye, never knew you. Setting the value to 0 disables the limit entirely (chaos mode, but make it your chaos).
π¦ SSL_VALUE_QUIC_STREAM_BIDI_LOCAL_AVAIL (connection object)
Generic read-only statistical value. It's the number of bidirectional, locally-initiated streams available to be created (but not yet created). For 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. icymi that's your flow-control headroom right there.
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. yes bestie, you're the one handing out the permission slips π
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. It's an integer that takes one of the following values, and it decides which event handling mode is in use:
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, it 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. it's giving "i get it from my parent" β¨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 toSSL_handle_events(3)) when calls to I/O functions such asSSL_read_ex(3)orSSL_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. lowkey the chill autopilot mode π«Ά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 asSSL_read_ex(3)orSSL_write_ex(3)do not result in the automatic processing of QUIC events. 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 callSSL_handle_events(3)as and when called for by the QUIC implementation; see theSSL_get_rpoll_descriptor(3)man page for more information. you are the main character now and the event loop is your job, no cap π€- 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). don't mix and match and then act surprised π
- 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
Can be configured using the convenience macros SSL_get_event_handling_mode() and SSL_set_event_handling_mode().
A call to SSL_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 to SSL_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. so like, the switch is not the spark, mkay?
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 share a connection bestie, they're basically siblings, what happens to one affects the other π
π SSL_VALUE_STREAM_WRITE_BUF_SIZE (stream object)
Generic read-only statistical value. It's 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. it literally reinvents itself, we love a glow-up π¦
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().
π§ and alsoβ¦
No configurable values are currently defined for non-QUIC SSL objects. nothing here for you, classic TLS, sorry bestie π€·
π RETURN VALUES π
Returns 1 on success or 0 on failure. This function can fail for a number of reasons:
- An argument is invalid (e.g. NULL pointer or invalid class).
- The given value is not supported by the SSL object 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.
fr fr: check the return value, bestie. 0 means something went sideways and it's not telling you which thing, so read the list above and vibe-check your arguments π
π 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 π
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.
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>.
and that's the whole page, bestie π
β¨ this came from the OpenSSL docs, version 4.0.3, dated 2026-09-29, and you were reading SSL_GET_VALUE_UINT(3SSL) β go forth and configure your QUIC values responsibly, mwah ππ«Ά
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms