carta
gnutls_dh_get_pubkey(3)

gnutls_dh_get_pubkey3

Api function

Arguments

gnutls_session_t session

is a gnutls session

gnutls_datum_t * raw_key

will hold the public key.

Overview

This function will return the peer's public key used in the last Diffie-Hellman key exchange. This function should be used for both anonymous and ephemeral Diffie-Hellman. The output parameters must be freed with gnutls_free().

Note, that public key is exported as non-negative integer and may include a leading zero byte.

Returns

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise an error code is returned.

History

  • Arch Linux 2026-11-01: the text shown here
  • Debian 13 (Trixie)
  • Debian 12 (Bookworm)
  • Debian 11 (Bullseye)
  • Debian 10 (Buster)
  • Debian 9 (Stretch)
  • Debian 8 (Jessie)
  • Debian 6.0 (Squeeze)
  • Debian 5.0 (Lenny)
  • Debian 4.0 (Etch)

Reporting bugs

Report bugs to <[email protected]>.
Home page: https://www.gnutls.org

From gnutls 3.8.13-3 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.