gnutls_cipher_add_auth - Linux


gnutls_cipher_add_auth configures a cipher for TLS-SRP authentication. It adds a certificate authority (CA) and a certificate trust object to the cipher structure.


gnutls_cipher_add_auth(cipher, cacert, trust)


  • cacert: Contains the trusted CA certificate.
  • trust: Contains the trusted certificate.


To add a CA and trust to a cipher, use:

gnutls_cipher_add_auth(cipher, cacert, trust);

Common Issues

  • If the CA or trust certificates are not present, the cipher will fail to be configured.
  • Ensure that the cipher is properly initialized before adding the CA and trust certificates.


gnutls_cipher_add_auth is used in conjunction with other GNUTLS functions to establish secure TLS connections.

Related Commands

  • gnutls_cipher_init initializes a cipher structure.
  • gnutls_session_set_cipher sets the cipher for a TLS session.