| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {int} {gnutls_dh_get_pubkey} (gnutls_session_t @var{session}, gnutls_datum_t * @var{raw_key}) |
| 6 |
@var{session}: is a gnutls session |
| 7 |
|
| 8 |
@var{raw_key}: will hold the public key. |
| 9 |
|
| 10 |
This function will return the peer's public key used in the last |
| 11 |
Diffie-Hellman key exchange. This function should be used for both |
| 12 |
anonymous and ephemeral Diffie-Hellman. The output parameters must |
| 13 |
be freed with @code{gnutls_free()} . |
| 14 |
|
| 15 |
Note, that public key is exported as non-negative |
| 16 |
integer and may include a leading zero byte. |
| 17 |
|
| 18 |
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise |
| 19 |
an error code is returned. |
| 20 |
@end deftypefun |