gnutls_srtp_get_keys(3)
β¨ gnutls_srtp_get_keys(3) β¨
okay so bestie, welcome to the gnutls manual π this one's all about gnutls_srtp_get_keys, and yes it's the SRTP key-material helper you've been looking for, no cap.
πΈ NAME πΈ
gnutls_srtp_get_keys β it's an API function, periodt π
π¦ SYNOPSIS π¦
#include <gnutls/gnutls.h>
int gnutls_srtp_get_keys(gnutls_session_t session, void * key_material,
unsigned int key_material_size, gnutls_datum_t * client_key,
gnutls_datum_t * client_salt, gnutls_datum_t * server_key,
gnutls_datum_t * server_salt);
π ARGUMENTS π
gnutls_session_t sessionβ bestie this is agnutls_session_ttype, that's the whole vibe πvoid * key_materialβ the space where the generated key material goes π«Άunsigned int key_material_sizeβ the maximum size of the key material, like the ceiling, the limit, the moment πgnutls_datum_t * client_keyβ the master client write key, and it points inside the key material πgnutls_datum_t * client_saltβ the master client write salt, also pointing inside the key material β¨gnutls_datum_t * server_keyβ the master server write key, pointing inside the key material too πgnutls_datum_t * server_saltβ the master server write salt, yep, pointing inside the key material π
π DESCRIPTION π
so this is a lil helper function that generates the keying material for SRTP πΈ it's giving "let me handle the keys for you" energy.
the way that it works: you gotta pre-allocate the space for the key material yourself. and it should be at least 2x the maximum key size and salt size β do not skimp on the buffer, bestie, that's the vibe check right there.
then client_key, client_salt, server_key and server_salt are convenience datums that point inside the key material. lowkey iconic. and plot twist: they may be NULL π
β RETURNS β
on success, the size of the key material is returned π slay.
otherwise you get GNUTLS_E_SHORT_MEMORY_BUFFER if the buffer you gave is not sufficient (oof, not enough room π), or a negative error code.
since 3.1.4 β an OG, fr fr.
π REPORTING BUGS π
found a bug? don't be shy, report it to <bugs@gnutls.org> π«Ά
home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. (basically: be nice, keep the receipts π)
π SEE ALSO π
the full documentation for gnutls is maintained as a Texinfo manual π if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:
https://www.gnutls.org/manual/
and that's the whole page, bestie β¨ that was gnutls manual, version 3.8.13, for gnutls_srtp_get_keys(3) β go forth and generate that key material, you absolute main character π
ππ¦
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms