1gnutls_ext_register(3)              gnutls              gnutls_ext_register(3)
2
3
4

NAME

6       gnutls_ext_register - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int     gnutls_ext_register(const     char     *    name,    int    id,
12       gnutls_ext_parse_type_t  parse_point,  gnutls_ext_recv_func  recv_func,
13       gnutls_ext_send_func       send_func,       gnutls_ext_deinit_data_func
14       deinit_func,  gnutls_ext_pack_func  pack_func,   gnutls_ext_unpack_func
15       unpack_func);
16

ARGUMENTS

18       const char * name
19                   the name of the extension to register
20
21       int id      the numeric TLS id of the extension
22
23       gnutls_ext_parse_type_t parse_point
24                   the     parse     type     of     the     extension    (see
25                   gnutls_ext_parse_type_t)
26
27       gnutls_ext_recv_func recv_func
28                   a function to receive the data
29
30       gnutls_ext_send_func send_func
31                   a function to send the data
32
33       gnutls_ext_deinit_data_func deinit_func
34                   a function deinitialize any private data
35
36       gnutls_ext_pack_func pack_func
37                   a function which serializes the  extension's  private  data
38                   (used on session packing for resumption)
39
40       gnutls_ext_unpack_func unpack_func
41                   a  function  which will deserialize the extension's private
42                   data
43

DESCRIPTION

45       This function will register a new extension type.  The  extension  will
46       remain registered until gnutls_global_deinit() is called. If the exten‐
47       sion type is already registered then  GNUTLS_E_ALREADY_REGISTERED  will
48       be returned.
49
50       Each registered extension can store temporary data into the gnutls_ses‐
51       sion_t structure using gnutls_ext_set_data(), and they can be retrieved
52       using gnutls_ext_get_data().
53
54       Any  extensions  registered with this function are valid for the client
55       and TLS1.2 server hello (or encrypted extensions for TLS1.3).
56
57       This function is not thread safe.
58

RETURNS

60       GNUTLS_E_SUCCESS on success, otherwise a negative error code.
61

SINCE

63       3.4.0
64

REPORTING BUGS

66       Report bugs to <bugs@gnutls.org>.
67       Home page: https://www.gnutls.org
68
69
71       Copyright © 2001-2019 Free Software Foundation, Inc., and others.
72       Copying and distribution of this file, with  or  without  modification,
73       are  permitted  in  any  medium  without royalty provided the copyright
74       notice and this notice are preserved.
75

SEE ALSO

77       The full documentation for gnutls is maintained as  a  Texinfo  manual.
78       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
79       visit
80
81       https://www.gnutls.org/manual/
82
83gnutls                              3.6.11              gnutls_ext_register(3)
Impressum