Fix CVE-2017-6891 in minitasn1 code
[platform/upstream/gnutls.git] / doc / functions / gnutls_dh_get_group
1
2
3
4
5 @deftypefun {int} {gnutls_dh_get_group} (gnutls_session_t @var{session}, gnutls_datum_t * @var{raw_gen}, gnutls_datum_t * @var{raw_prime})
6 @var{session}: is a gnutls session
7
8 @var{raw_gen}: will hold the generator.
9
10 @var{raw_prime}: will hold the prime.
11
12 This function will return the group parameters used in the last
13 Diffie-Hellman key exchange with the peer.  These are the prime and
14 the generator used.  This function should be used for both
15 anonymous and ephemeral Diffie-Hellman.  The output parameters must
16 be freed with @code{gnutls_free()} .
17
18 Note, that the prime and generator are exported as non-negative
19 integers and may include a leading zero byte.
20
21 @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise
22 an error code is returned.
23 @end deftypefun