File: gnutls_psk_format_imported_identity

package info (click to toggle)
gnutls28 3.8.9-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 83,872 kB
  • sloc: ansic: 388,071; asm: 117,804; sh: 18,477; makefile: 6,732; yacc: 1,858; python: 1,399; cpp: 1,243; perl: 995; sed: 16
file content (26 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (3)
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




@deftypefun {int} {gnutls_psk_format_imported_identity} (const gnutls_datum_t * @var{identity}, const gnutls_datum_t * @var{context}, gnutls_protocol_t @var{version}, gnutls_digest_algorithm_t @var{hash}, gnutls_datum_t * @var{imported_identity})
@var{identity}: external identity

@var{context}: optional contextual information

@var{version}: protocol version to which the PSK is imported

@var{hash}: hash algorithm used for KDF

@var{imported_identity}: where the imported identity is stored

This formats an external PSK identity  @code{identity} into an imported
form, described in RFC 9258 as ImportedIdentity.

Upon success, the data field of  @code{imported_identity} is allocated
using @code{gnutls_malloc()}  and the caller must free the memory after
use.

@strong{Returns:} @code{GNUTLS_E_SUCCESS}  (0) on success, otherwise a negative error code.

@strong{Since:} 3.8.1
@end deftypefun