Function amqp_ssl_socket_set_cert

Synopsis

#include <librabbitmq/amqp_openssl.c>

int amqp_ssl_socket_set_cert(amqp_socket_t *base, const char *cert)

Description

No description yet.

Source

Lines 487-499 in librabbitmq/amqp_openssl.c.

int amqp_ssl_socket_set_cert(amqp_socket_t *base, const char *cert) {
  int status;
  struct amqp_ssl_socket_t *self;
  if (base->klass != &amqp_ssl_socket_class) {
    amqp_abort("<%p> is not of type amqp_ssl_socket_t", base);
  }
  self = (struct amqp_ssl_socket_t *)base;
  status = SSL_CTX_use_certificate_chain_file(self->ctx, cert);
  if (1 != status) {
    return AMQP_STATUS_SSL_ERROR;
  }
  return AMQP_STATUS_OK;
}





Add Discussion as Guest

Log in to DocsForge