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
8 @var{raw_gen}: will hold the generator.
10 @var{raw_prime}: will hold the prime.
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()} .
18 Note, that the prime and generator are exported as non-negative
19 integers and may include a leading zero byte.
21 @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise
22 an error code is returned.