gnutls_cipher_add_auth - Linux
Overview
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.
Syntax
gnutls_cipher_add_auth(cipher, cacert, trust)
Options/Flags
- cacert: Contains the trusted CA certificate.
- trust: Contains the trusted certificate.
Examples
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.
Integration
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.