SSL_SET1_INITIAL_PEER_ADDR(3ossl)
π SSL_SET1_INITIAL_PEER_ADDR π
okay bestie, welcome to the OpenSSL manual, page SSL_set1_initial_peer_addr from the 3ossl section. yes we are reading manpages for fun now, this is the vibe, iykyk π¦
β¨ NAME β¨
SSL_set1_initial_peer_addr β set the initial peer address for a QUIC connection π
πΈ SYNOPSIS πΈ
#include <openssl/ssl.h>
int SSL_set1_initial_peer_addr(SSL *s, const BIO_ADDR *addr);
π DESCRIPTION π
so like, SSL_set1_initial_peer_addr() sets the initial destination peer address that's gonna be used for the purposes of establishing a QUIC connection in client mode. that's it, that's the whole job, she's an icon with one task π
now, the rules (there are always rules):
- this function can be used only on a QUIC connection
SSLobject π«Ά - and it can be used only before a connection attempt is first made. like, once you've already slid into the DMs, you can't change your opening line, okay?
addr must point to a BIO_ADDR representing a UDP destination address of the server to connect to. literally that's the address, of the server, that you connect to. no cap β
okay now the fun part, the automatic detection situation. where a QUIC connection object is provided with a write BIO which supports the BIO_CTRL_DGRAM_GET_PEER control (for example, BIO_s_dgram), the initial destination peer address can be detected automatically. if BIO_CTRL_DGRAM_GET_PEER returns a valid (non-AF_UNSPEC) peer address and no valid peer address has yet been set, this will be set automatically as the initial peer address. the universe just... handles it for you. iconic β¨
and if you want to override that auto-magic? you can! this behaviour can be overridden by calling SSL_set1_initial_peer_addr() with a valid peer address explicitly. main character energy, you decide the address π
β οΈ heads up bestie: the destination address used by QUIC may change over time in response to connection events, such as connection migration (where supported). SSL_set1_initial_peer_addr() configures the destination address used for initial connection establishment, and does not confer any guarantee about the destination address being used for communication at any later time in the connection lifecycle. so she sets the vibe for the first hello, not forever. periodt π
also, and this part is so nice of her: this function makes a copy of the address passed by the caller. so the BIO_ADDR structure pointed to by addr may be freed by the caller after this function returns. go ahead and free it, she's got her own copy now, she's not clingy π§
π RETURN VALUES π
- returns
1on success π - returns
0on failure π
π SEE ALSO π
π HISTORY π
the SSL_set1_initial_peer_addr() function was added in OpenSSL 3.2. babygirl is relatively new to the group chat but she's already thriving πΈ
π 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 bestie, you ate that reading experience, so proud of you π«Άπ
and for the cute sign-off: this was OpenSSL 3.5.9, dated 2026-09-29, and the page title is SSL_SET1_INITIAL_PEER_ADDR(3ossl). mwah, go set some initial peer addresses responsibly, love you, bye π
β¨π¦
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms