SSL_GET_PSK_IDENTITY(3ossl)
π NAME π
okay so bestie, gather round β SSL_get_psk_identity, SSL_get_psk_identity_hint β these two are literally your go-to for getting the PSK client identity and the hint. that's the whole vibe. (and yes, we're in the 3ossl manual, welcome, make yourself comfy π«Ά)
β¨ SYNOPSIS β¨
#include <openssl/ssl.h>
const char *SSL_get_psk_identity_hint(const SSL *ssl);
const char *SSL_get_psk_identity(const SSL *ssl);
like, that's it. two functions. no cap. π
πΈ DESCRIPTION πΈ
so SSL_get_psk_identity_hint() is the one you call to retrieve the PSK identity hint that got used during connection setup for the SSL object ssl. think of it as the little "hey, who are you?" nudge the server sends. π
and SSL_get_psk_identity(), its sister function, is what you use to retrieve the PSK identity used during the connection setup. the actual name tag. the main character. π
same energy, different facts. iykyk. π¦
β RETURN VALUES β
if it's non-NULL, SSL_get_psk_identity_hint() returns the PSK identity hint, and SSL_get_psk_identity() returns the PSK identity. both of them are NULL-terminated, so you can just vibe with them as C strings. β¨
fun little detail: SSL_get_psk_identity_hint() may return NULL if no PSK identity hint was used during the connection setup. so like, don't panic if you get NULL, it's not always a you problem. π
β οΈ okay important one, bestie: the return value is valid only during the lifetime of theSSLobjectssl. the way that means you gotta keepsslalive while you're using these strings. don't go holding onto them aftersslis gone, that's giving undefined chaos π
π₯ SEE ALSO π₯
ssl(7)β go read it, it's the whole lore π
π 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>.
and that's the page!! π shipped as 3.5.6, dated 2026-04-07, from the SSL_GET_PSK_IDENTITY(3ossl) household β go forth and slay those PSK identities, bestie π§ππ
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms