Greenbone Vulnerability Manager  22.4.0~dev1
Macros | Functions
manage_tls_certificates.c File Reference

GVM management layer: TLS Certificates. More...

#include "manage_tls_certificates.h"
#include <string.h>

Macros

#define _XOPEN_SOURCE
 Enable extra functions. More...
 

Functions

void parse_ssldetails (const char *ssldetails, time_t *activation_time, time_t *expiration_time, gchar **issuer, gchar **serial)
 Extract data from a SSLDetails:[...] host detail value. More...
 
const char * tls_certificate_format_str (gnutls_x509_crt_fmt_t certificate_format)
 Get a string representation of a certificate format. More...
 

Detailed Description

GVM management layer: TLS Certificates.

The TLS Certificates helper functions for the GVM management layer.

Macro Definition Documentation

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE

Enable extra functions.

time.h in glibc2 needs this for strptime.

Function Documentation

◆ parse_ssldetails()

void parse_ssldetails ( const char *  ssldetails,
time_t *  activation_time,
time_t *  expiration_time,
gchar **  issuer,
gchar **  serial 
)

Extract data from a SSLDetails:[...] host detail value.

This will try to free existing strings at the output pointers with g_free, so the caller must ensure it is safe to do so.

Parameters
[in]ssldetailsThe host detail value.
[out]activation_timePointer to return the activation time.
[out]expiration_timePointer to return the expiration time.
[out]issuerPointer to return the issuer.
[out]serialPointer to return the serial.

◆ tls_certificate_format_str()

const char* tls_certificate_format_str ( gnutls_x509_crt_fmt_t  certificate_format)

Get a string representation of a certificate format.

Parameters
[in]certificate_formatThe format as gnutls_x509_crt_fmt_t.
Returns
A string representation of the format (e.g. "PEM" or "DER").