1gnutls_dh_get_group(3) gnutls gnutls_dh_get_group(3)
2
3
4
6 gnutls_dh_get_group - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_dh_get_group(gnutls_session_t session, gnutls_datum_t *
12 raw_gen, gnutls_datum_t * raw_prime);
13
15 gnutls_session_t session
16 is a gnutls session
17
18 gnutls_datum_t * raw_gen
19 will hold the generator.
20
21 gnutls_datum_t * raw_prime
22 will hold the prime.
23
25 This function will return the group parameters used in the last
26 Diffie-Hellman key exchange with the peer. These are the prime and the
27 generator used. This function should be used for both anonymous and
28 ephemeral Diffie-Hellman. The output parameters must be freed with
29 gnutls_free().
30
31 Note, that the prime and generator are exported as non-negative inte‐
32 gers and may include a leading zero byte.
33
35 On success, GNUTLS_E_SUCCESS (0) is returned, otherwise an error code
36 is returned.
37
39 Report bugs to <bugs@gnutls.org>.
40 Home page: http://www.gnutls.org
41
42
44 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
45 Copying and distribution of this file, with or without modification,
46 are permitted in any medium without royalty provided the copyright
47 notice and this notice are preserved.
48
50 The full documentation for gnutls is maintained as a Texinfo manual.
51 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
52 visit
53
54 http://www.gnutls.org/manual/
55
56gnutls 3.6.5 gnutls_dh_get_group(3)