SSL_GET_PSK_IDENTITY(3ossl)
π SSL_GET_PSK_IDENTITY π
okay bestie, welcome to SSL_GET_PSK_IDENTITY(3ossl) β yes that's the whole manual name, it's giving long but we move. this is an OpenSSL page and it's actually so chill, we're just grabbing the PSK identity stuff off an SSL object. no cap. π
β¨ NAME β¨
SSL_get_psk_identity, SSL_get_psk_identity_hint β get the PSK client identity and the hint, periodt.
πΈ SYNOPSIS πΈ
#include <openssl/ssl.h>
const char *SSL_get_psk_identity_hint(const SSL *ssl);
const char *SSL_get_psk_identity(const SSL *ssl);
look at those little signatures, they're so cute, both returning const char * like the icons they are π
π¦ DESCRIPTION π¦
so here's the tea π
SSL_get_psk_identity_hint()is the one you call when you wanna retrieve the PSK identity hint that got used during the connection setup, specifically for theSSLobjectssl. she's the hint-giver.SSL_get_psk_identity()is her sister β you use her to retrieve the PSK identity that was used during the connection setup. same deal, same connection setup energy.
that's literally it, they're both just lil getters pulling info out of the connection setup that already happened. π₯
π RETURN VALUES π
if it's non-NULL:
SSL_get_psk_identity_hint()hands you back the PSK identity hintSSL_get_psk_identity()hands you back the PSK identity
both of them are NULL-terminated, so you can just vibe with them as C strings. π
β οΈ heads up bestie:SSL_get_psk_identity_hint()may returnNULLif no PSK identity hint was used during the connection setup. so like, don't be out here dereferencing it without a check, i'm begging π
π¨ and this one matters SO much: the return value is valid only during the lifetime of theSSLobjectssl. once that object is gone, the pointer is giving expired-milk energy. do not keep it around. not me warning you twice π
π SEE ALSO π
go read her too, she's iconic β¨
π COPYRIGHT π
Copyright 2006-2016 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, you ate that π«Ά this was OpenSSL 3.5.9, dated 2026-09-29, and yes the manpage title is SSL_GET_PSK_IDENTITY(3ossl) β say it with your chest. bye bestie, go check your NULLs ππ§
π¦ 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