gnutls_ciphersuite_get - Linux


The gnutls_ciphersuite_get command retrieves the cipher suite being used in a GNU TLS connection. It provides detailed information about the cipher suite, including its name, encryption and integrity algorithms, and other relevant parameters.


gnutls_ciphersuite_get [OPTIONS] SESSION


  • -h, --help: Display help information and exit.
  • --version: Print version information and exit.
  • -v, --verbose: Enable verbose output, providing more detailed information about the cipher suite.
  • -n, --no-names: Do not display cipher suite names in the output.
  • -a, --all: List all available cipher suites, regardless of whether they are supported by the connection.


Simple usage:

gnutls_ciphersuite_get session-id

Verbose output:

gnutls_ciphersuite_get -v session-id

Listing all available cipher suites:

gnutls_ciphersuite_get --all

Common Issues

  • Incorrect session ID: Ensure that the provided session ID is valid and corresponds to an active GNU TLS connection.
  • Permission denied: Verify that the user has sufficient permissions to access the session information.


gnutls_ciphersuite_get can be integrated into scripts or command chains to retrieve and analyze cipher suite information in automated tasks. For example:

cipher_suite=$(gnutls_ciphersuite_get -n $session_id)
echo "The cipher suite in use is: $cipher_suite"

Related Commands

  • gnutls_session_get_id: Retrieves the session ID of a GNU TLS connection.
  • gnutls_certificate_get: Retrieves certificate information from a GNU TLS connection.
  • gnutls_transport_get_peer: Retrieves peer information from a GNU TLS connection.