HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

src/shared/gnutls-util.h

1,326 bytesGit mode 100644Download original fileLGPL-2.1-or-later

Git blob: a68faec2bb056b2fe57b9a97bf9e5b3660892689

Lines 1–38 of 38

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
 
#include "dlopen-note.h"
#include "forward.h"
 
int dlopen_gnutls(int log_level) _dlopen_loader_;
 
#if HAVE_GNUTLS
#  ifndef SYSTEMD_CFLAGS_MARKER_LIBGNUTLS
#    error "missing libgnutls_cflags in meson dependency."
#  endif
 
#  include <gnutls/gnutls.h>    /* IWYU pragma: export */
#  include <gnutls/x509.h>      /* IWYU pragma: export */
 
/* gnutls.h installs a function-like macro that wraps gnutls_free() and NULLs the passed pointer. We use
 * dlsym to resolve the underlying function pointer variable, so undef the macro here to keep the variable
 * name visible for DLSYM_PROTOTYPE/DLSYM_ARG. */
#  ifdef gnutls_free
#    undef gnutls_free
#  endif
 
#  include "dlfcn-util.h"
 
extern DLSYM_PROTOTYPE(gnutls_certificate_get_peers);
extern DLSYM_PROTOTYPE(gnutls_certificate_type_get);
extern DLSYM_PROTOTYPE(gnutls_certificate_verification_status_print);
extern DLSYM_PROTOTYPE(gnutls_certificate_verify_peers2);
extern DLSYM_PROTOTYPE(gnutls_free);
extern DLSYM_PROTOTYPE(gnutls_global_set_log_function);
extern DLSYM_PROTOTYPE(gnutls_global_set_log_level);
extern DLSYM_PROTOTYPE(gnutls_x509_crt_deinit);
extern DLSYM_PROTOTYPE(gnutls_x509_crt_get_dn);
extern DLSYM_PROTOTYPE(gnutls_x509_crt_import);
extern DLSYM_PROTOTYPE(gnutls_x509_crt_init);
#endif