]> git.ipfire.org Git - thirdparty/openssl.git/commit
doc: clarify SSL_SESSION ownership in PSK use session callback
authorkovan <xaum.io@gmail.com>
Tue, 3 Feb 2026 09:32:56 +0000 (10:32 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 13 Feb 2026 14:36:36 +0000 (15:36 +0100)
commit6d646a94af5d604cabff9005bd6bf8475a635b75
tree6001ad415ee94f36697550de705719888a04e37e
parentb2499af52920502bedfc6fd0fada6a8a3182d0d3
doc: clarify SSL_SESSION ownership in PSK use session callback

Document that when the psk_use_session callback is invoked multiple times
and wishes to return the same SSL_SESSION pointer, it must call
SSL_SESSION_up_ref() first since ownership is transferred on each call.
This prevents use-after-free errors from incorrect callback implementations.

Fixes #28267

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Fri Feb 13 14:36:50 2026
(Merged from https://github.com/openssl/openssl/pull/29771)
doc/man3/SSL_CTX_set_psk_client_callback.pod