File: gnutls_srtp_get_keys

package info (click to toggle)
gnutls28 3.3.8-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 51,388 kB
  • sloc: ansic: 191,357; asm: 60,370; sh: 21,457; makefile: 5,257; lisp: 1,531; yacc: 1,254; cpp: 1,155; perl: 199; sed: 16
file content (30 lines) | stat: -rw-r--r-- 1,375 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30




@deftypefun {int} {gnutls_srtp_get_keys} (gnutls_session_t @var{session}, void * @var{key_material}, unsigned int @var{key_material_size}, gnutls_datum_t * @var{client_key}, gnutls_datum_t * @var{client_salt}, gnutls_datum_t * @var{server_key}, gnutls_datum_t * @var{server_salt})
@var{session}: is a @code{gnutls_session_t}  structure.

@var{key_material}: Space to hold the generated key material

@var{key_material_size}: The maximum size of the key material

@var{client_key}: The master client write key, pointing inside the key material

@var{client_salt}: The master client write salt, pointing inside the key material

@var{server_key}: The master server write key, pointing inside the key material

@var{server_salt}: The master server write salt, pointing inside the key material

This is a helper function to generate the keying material for SRTP.
It requires the space of the key material to be pre-allocated (should be at least
2x the maximum key size and salt size). The  @code{client_key} ,  @code{client_salt} ,  @code{server_key} and  @code{server_salt} are convenience datums that point inside the key material. They may
be @code{NULL} .

@strong{Returns:} On success the size of the key material is returned,
otherwise, @code{GNUTLS_E_SHORT_MEMORY_BUFFER}  if the buffer given is not 
sufficient, or a negative error code.

Since 3.1.4
@end deftypefun