gnutls_auth_get_type - Linux


Overview

gnutls_auth_get_type retrieves the type of a specified authentication certificate.

Syntax

int gnutls_auth_get_type(gnutls_auth_cert_t cert);

Options/Flags

None

Examples

Getting the type of the authentication certificate

gnutls_certificate_type_t type;

gnutls_auth_cert_t cert;

gnutls_auth_get_type(cert, &type);

printf("Certificate type: %d\n", type);

Common Issues

  • The return value is -1: The certificate is invalid or has an unsupported type.

Integration

gnutls_auth_get_type can be used in conjunction with other GnuTLS functions to manage authentication certificates, such as:

* gnutls_auth_set_cert(): Set the authentication certificate.
* gnutls_auth_get_DN(): Get the distinguished name of the certificate.
* gnutls_auth_get_expiration_time(): Get the expiration time of the certificate.

Related Commands

  • [gnutls_auth_set_cert]
  • [gnutls_auth_get_DN]
  • [gnutls_auth_get_expiration_time]