11#ifndef _GVM_TLSUTILS_H
12#define _GVM_TLSUTILS_H
15#include <gnutls/gnutls.h>
16#include <gnutls/pkcs12.h>
38 gchar **privkey_out, gchar **cert_chain_out,
39 gchar **extra_certs_out, gchar **crl_out);
gchar * gvm_x509_cert_list_to_pem(gnutls_x509_crt_t *certs, unsigned int certs_count)
Export a GnuTLS x509 cerificate list as a PEM formatted string.
Definition tlsutils.c:111
int gvm_base64_to_gnutls_datum(const char *, gnutls_datum_t *)
Decode a Base64 string to the contents of a gnutls_datum_t.
Definition tlsutils.c:48
gnutls_x509_crt_fmt_t gvm_x509_format_from_data(const char *, size_t)
Try to determine the format (DER or PEM) of a x509 certificate.
Definition tlsutils.c:30
gchar * gvm_x509_crl_to_pem(gnutls_x509_crl_t crl)
Export a GnuTLS x509 CRL as a PEM formatted string.
Definition tlsutils.c:143
void gvm_x509_cert_list_free(gnutls_x509_crt_t *certs, unsigned int certs_count)
Frees a list of X509 certificates.
Definition tlsutils.c:66
int gvm_pkcs12_to_pem(gnutls_pkcs12_t pkcs12, const char *passphrase, gchar **privkey_out, gchar **cert_chain_out, gchar **extra_certs_out, gchar **crl_out)
Convert GnuTLS PKCS12 data to a PEM formatted string.
Definition tlsutils.c:175
gchar * gvm_x509_privkey_to_pem(gnutls_x509_privkey_t privkey)
Export a GnuTLS x509 private key as a PEM formatted string.
Definition tlsutils.c:83