1gnutls_srtp_get_keys(3) gnutls gnutls_srtp_get_keys(3)
2
3
4
6 gnutls_srtp_get_keys - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_srtp_get_keys(gnutls_session_t session, void * key_material,
12 unsigned int key_material_size, gnutls_datum_t * client_key, gnutls_da‐
13 tum_t * client_salt, gnutls_datum_t * server_key, gnutls_datum_t *
14 server_salt);
15
17 gnutls_session_t session
18 is a gnutls_session_t type.
19
20 void * key_material
21 Space to hold the generated key material
22
23 unsigned int key_material_size
24 The maximum size of the key material
25
26 gnutls_datum_t * client_key
27 The master client write key, pointing inside the key mate‐
28 rial
29
30 gnutls_datum_t * client_salt
31 The master client write salt, pointing inside the key mate‐
32 rial
33
34 gnutls_datum_t * server_key
35 The master server write key, pointing inside the key mate‐
36 rial
37
38 gnutls_datum_t * server_salt
39 The master server write salt, pointing inside the key mate‐
40 rial
41
43 This is a helper function to generate the keying material for SRTP. It
44 requires the space of the key material to be pre-allocated (should be
45 at least 2x the maximum key size and salt size). The client_key ,
46 client_salt , server_key and server_salt are convenience datums that
47 point inside the key material. They may be NULL.
48
50 On success the size of the key material is returned, otherwise,
51 GNUTLS_E_SHORT_MEMORY_BUFFER if the buffer given is not sufficient, or
52 a negative error code.
53
54 Since 3.1.4
55
57 Report bugs to <bugs@gnutls.org>.
58 Home page: https://www.gnutls.org
59
60
62 Copyright © 2001- Free Software Foundation, Inc., and others.
63 Copying and distribution of this file, with or without modification,
64 are permitted in any medium without royalty provided the copyright no‐
65 tice and this notice are preserved.
66
68 The full documentation for gnutls is maintained as a Texinfo manual.
69 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
70 visit
71
72 https://www.gnutls.org/manual/
73
74gnutls 3.7.6 gnutls_srtp_get_keys(3)