gnutls_certificate_client_get_request_status - Linux


Overview

gnutls_certificate_client_get_request_status is used by TLS/SSL clients to determine whether Certificate Request message was sent to the server.

Syntax

int gnutls_certificate_client_get_request_status(gnutls_certificate_credentials_t cred)

Options/Flags

  • N/A

Examples

The following example demonstrates how to use gnutls_certificate_client_get_request_status:

gnutls_certificate_credentials_t xcred = NULL;
if (gnutls_certificate_allocate_credentials(&xcred) < 0)
    return GNUTLS_E_MALLOC;
if (gnutls_certificate_set_x509_simple_keyfile(xcred, "crt.pem",
    "key.pem", GNUTLS_X509_FMT_PEM) < 0)
    return GNUTLS_E_MALLOC;

gnutls_certificate_client_get_request_status(xcred);

Common Issues

  • If the server does not request a certificate, the return value will be GNUTLS_E_NO_CERTIFICATE_REQUEST.
  • If the credentials have not been initialized, the return value will be GNUTLS_E_INVALID_REQUEST.

Integration

  • gnutls_certificate_client_get_request_status can be used with other commands to manage TLS/SSL connections in clients. For example, it can be used with gnutls_certificate_credentials_set to specify the credentials to use for a connection.
  • It can be used in conjunction with gnutls_certificate_client_set_x509_trust to set the trust store for the client.

Related Commands

  • gnutls_certificate_client_set_request
  • gnutls_certificate_client_set_x509_trust
  • gnutls_certificate_allocate_credentials