openssl/ssl/quic
Gustaf Neumann beec4e146a Add SSL_get_peer_addr() function to query peer address for QUIC
This change introduces a new public API symbol: SSL_get_peer_addr().
The change is QUIC-only, there are no changes for TLS connections

- API: add peer address query for QUIC connections
  * Internal: declare/implement ossl_quic_get_peer_addr(SSL*, BIO_ADDR*)
  * Public: declare/implement SSL_get_peer_addr(SSL*, BIO_ADDR*)

Rationale:
- Allow applications to retrieve the remote UDP tuple for QUIC sessions
  (e.g., logging, access control, diagnostics)

Provided documentation and test cases for SSL_get_peer_addr().

Set peer via channel API on new-conn.

- In ch_on_new_conn_common(), BIO_ADDR_copy(&ch->cur_peer_addr, peer)
  was replaced with ossl_quic_channel_set_peer_addr(ch, peer) so
  addressed_mode is enabled at connection bring-up.

Dropped redundant peer detection in create_qc_from_incoming_conn()

The peer address is now propagated in ch_on_new_conn_common() via
ossl_quic_channel_set_peer_addr(), so the channel is already in
"addressed" mode. This also avoids querying the (unconnected) server
UDP BIO, reduces duplication, and simplifies the accept path. All
regression tests pass.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28690)
2025-10-04 10:21:38 +02:00
..
build.info Fixup conflict between 3rd party quic-tls api and quic-server 2025-02-17 11:27:34 -05:00
cc_newreno.c Resolve some of the TODO(QUIC) items 2023-08-08 15:58:59 +02:00
json_enc.c Begin incorporating stdbool usage when json encoding 2025-06-13 11:26:46 -04:00
qlog.c Begin incorporating stdbool usage when json encoding 2025-06-13 11:26:46 -04:00
qlog_event_helpers.c Copyright year updates 2025-09-02 13:05:45 +00:00
quic_ackm.c Copyright year updates 2025-09-02 13:05:45 +00:00
quic_cfq.c Copyright year updates 2024-09-05 09:35:49 +02:00
quic_channel.c Add SSL_get_peer_addr() function to query peer address for QUIC 2025-10-04 10:21:38 +02:00
quic_channel_local.h Fix memory management in port_make_channel 2025-05-07 15:08:21 +02:00
quic_demux.c Copyright year updates 2025-03-12 13:35:59 +00:00
quic_engine.c Copyright year updates 2025-03-12 13:35:59 +00:00
quic_engine_local.h Minor updates 2023-12-21 08:12:06 +00:00
quic_fc.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_fifd.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_impl.c Add SSL_get_peer_addr() function to query peer address for QUIC 2025-10-04 10:21:38 +02:00
quic_lcidm.c Copyright year updates 2025-03-12 13:35:59 +00:00
quic_local.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_method.c Fix SSL_accept() 2025-04-14 08:52:18 +01:00
quic_obj.c Copyright year updates 2025-03-12 13:35:59 +00:00
quic_obj_local.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_port.c Add SSL_get_peer_addr() function to query peer address for QUIC 2025-10-04 10:21:38 +02:00
quic_port_local.h Copyright year updates 2025-03-12 13:35:59 +00:00
quic_rcidm.c Rename list macros 2024-09-26 10:02:30 +02:00
quic_reactor.c Copyright year updates 2025-03-12 13:35:59 +00:00
quic_reactor_wait_ctx.c Copyright year updates 2025-03-12 13:35:59 +00:00
quic_record_rx.c Ensure that the largest_pn values are migrated to our channel qrx 2025-08-07 13:16:25 -04:00
quic_record_shared.c ossl_qrl_enc_level_set_provide_secret(): Avoid leaking keyslot in error condition 2023-11-06 07:47:17 +00:00
quic_record_shared.h TX key update support, RX time and PN reporting, general refactoring 2022-09-02 10:03:55 +02:00
quic_record_tx.c Fix reallocation failure condition in qtx_resize_txe() 2025-08-22 09:11:15 -04:00
quic_record_util.c Add util/codespell-check.sh and run it 2025-09-26 07:58:44 -04:00
quic_rstream.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_rx_depack.c QUIC receiver may accidentally ACK packet it fails to process 2025-07-10 12:05:44 +02:00
quic_sf_list.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_srt_gen.c QUIC SRT GEN: Minor updates 2023-11-25 09:14:05 +00:00
quic_srtm.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_sstream.c QUIC SSTREAM: Fix bug in ossl_quic_sstream_is_totally_acked 2023-11-02 08:49:01 +00:00
quic_statm.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_stream_map.c Copyright year updates 2025-09-02 13:05:45 +00:00
quic_thread_assist.c Copyright year updates 2025-03-12 13:35:59 +00:00
quic_tls.c Reset qtls->local_transport_params_consumed to 0 on SSL_clear() 2025-06-03 18:29:21 +02:00
quic_tls_api.c Copyright year updates 2025-03-12 13:35:59 +00:00
quic_trace.c Copyright year updates 2025-03-12 13:35:59 +00:00
quic_tserver.c libssl: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
quic_txp.c crypto/params_dup.c: add overflow check to ossl_param_buf_alloc 2025-08-08 12:22:10 -04:00
quic_txpim.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_types.c Copyright year updates 2025-09-02 13:05:45 +00:00
quic_wire.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_wire_pkt.c libssl: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
uint_set.c Copyright year updates 2023-09-07 09:59:15 +01:00