Greenbone Vulnerability Manager  22.4.0~dev1
Data Structures | Macros | Functions | Variables
gmp_tls_certificates.c File Reference

GVM GMP layer: TLS certificates. More...

#include "gmp_tls_certificates.h"
#include "gmp_base.h"
#include "gmp_get.h"
#include "manage_tls_certificates.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gvm/util/xmlutils.h>

Data Structures

struct  get_tls_certificates_t
 The get_tls_certificates command. More...
 
struct  create_tls_certificate_t
 The create_tls_certificate command. More...
 
struct  modify_tls_certificate_t
 The modify_tls_certificate command. More...
 

Macros

#define G_LOG_DOMAIN   "md gmp"
 GLib log domain.
 

Functions

static void get_tls_certificates_reset ()
 Reset command data.
 
void get_tls_certificates_start (const gchar **attribute_names, const gchar **attribute_values)
 Handle command start element. More...
 
void get_tls_certificates_run (gmp_parser_t *gmp_parser, GError **error)
 Handle end element. More...
 
static void create_tls_certificate_reset ()
 Reset command data.
 
void create_tls_certificate_start (gmp_parser_t *gmp_parser, const gchar **attribute_names, const gchar **attribute_values)
 Start a command. More...
 
void create_tls_certificate_element_start (gmp_parser_t *gmp_parser, const gchar *name, const gchar **attribute_names, const gchar **attribute_values)
 Start element. More...
 
void create_tls_certificate_run (gmp_parser_t *gmp_parser, GError **error)
 Execute command. More...
 
int create_tls_certificate_element_end (gmp_parser_t *gmp_parser, GError **error, const gchar *name)
 End element. More...
 
void create_tls_certificate_element_text (const gchar *text, gsize text_len)
 Add text to element. More...
 
static void modify_tls_certificate_reset ()
 Reset command data.
 
void modify_tls_certificate_start (gmp_parser_t *gmp_parser, const gchar **attribute_names, const gchar **attribute_values)
 Start a command. More...
 
void modify_tls_certificate_element_start (gmp_parser_t *gmp_parser, const gchar *name, const gchar **attribute_names, const gchar **attribute_values)
 Start element. More...
 
void modify_tls_certificate_run (gmp_parser_t *gmp_parser, GError **error)
 Execute command. More...
 
int modify_tls_certificate_element_end (gmp_parser_t *gmp_parser, GError **error, const gchar *name)
 End element. More...
 
void modify_tls_certificate_element_text (const gchar *text, gsize text_len)
 Add text to element. More...
 
gchar * tls_certificate_origin_extra_xml (const char *origin_type, const char *origin_id, const char *origin_data)
 Generate extra XML for special TLS certificate origins like reports. More...
 

Variables

static get_tls_certificates_t get_tls_certificates_data
 Parser callback data. More...
 
static create_tls_certificate_t create_tls_certificate_data
 Parser callback data. More...
 
static modify_tls_certificate_t modify_tls_certificate_data
 Parser callback data. More...
 

Detailed Description

GVM GMP layer: TLS certificates.

This includes function and variable definitions for GMP handling of TLS certificates.

Function Documentation

◆ create_tls_certificate_element_end()

int create_tls_certificate_element_end ( gmp_parser_t gmp_parser,
GError **  error,
const gchar *  name 
)

End element.

Parameters
[in]gmp_parserGMP parser.
[in]errorError parameter.
[in]nameElement name.
Returns
0 success, 1 command finished.

◆ create_tls_certificate_element_start()

void create_tls_certificate_element_start ( gmp_parser_t gmp_parser,
const gchar *  name,
const gchar **  attribute_names,
const gchar **  attribute_values 
)

Start element.

Parameters
[in]gmp_parserGMP parser.
[in]nameElement name.
[in]attribute_namesAll attribute names.
[in]attribute_valuesAll attribute values.

◆ create_tls_certificate_element_text()

void create_tls_certificate_element_text ( const gchar *  text,
gsize  text_len 
)

Add text to element.

Parameters
[in]textText.
[in]text_lenText length.

◆ create_tls_certificate_run()

void create_tls_certificate_run ( gmp_parser_t gmp_parser,
GError **  error 
)

Execute command.

Parameters
[in]gmp_parserGMP parser.
[in]errorError parameter.

◆ create_tls_certificate_start()

void create_tls_certificate_start ( gmp_parser_t gmp_parser,
const gchar **  attribute_names,
const gchar **  attribute_values 
)

Start a command.

Parameters
[in]gmp_parserGMP parser.
[in]attribute_namesAll attribute names.
[in]attribute_valuesAll attribute values.

◆ get_tls_certificates_run()

void get_tls_certificates_run ( gmp_parser_t gmp_parser,
GError **  error 
)

Handle end element.

Parameters
[in]gmp_parserGMP parser.
[in]errorError parameter.

◆ get_tls_certificates_start()

void get_tls_certificates_start ( const gchar **  attribute_names,
const gchar **  attribute_values 
)

Handle command start element.

Parameters
[in]attribute_namesAll attribute names.
[in]attribute_valuesAll attribute values.

◆ modify_tls_certificate_element_end()

int modify_tls_certificate_element_end ( gmp_parser_t gmp_parser,
GError **  error,
const gchar *  name 
)

End element.

Parameters
[in]gmp_parserGMP parser.
[in]errorError parameter.
[in]nameElement name.
Returns
0 success, 1 command finished.

◆ modify_tls_certificate_element_start()

void modify_tls_certificate_element_start ( gmp_parser_t gmp_parser,
const gchar *  name,
const gchar **  attribute_names,
const gchar **  attribute_values 
)

Start element.

Parameters
[in]gmp_parserGMP parser.
[in]nameElement name.
[in]attribute_namesAll attribute names.
[in]attribute_valuesAll attribute values.

◆ modify_tls_certificate_element_text()

void modify_tls_certificate_element_text ( const gchar *  text,
gsize  text_len 
)

Add text to element.

Parameters
[in]textText.
[in]text_lenText length.

◆ modify_tls_certificate_run()

void modify_tls_certificate_run ( gmp_parser_t gmp_parser,
GError **  error 
)

Execute command.

Parameters
[in]gmp_parserGMP parser.
[in]errorError parameter.

◆ modify_tls_certificate_start()

void modify_tls_certificate_start ( gmp_parser_t gmp_parser,
const gchar **  attribute_names,
const gchar **  attribute_values 
)

Start a command.

Parameters
[in]gmp_parserGMP parser.
[in]attribute_namesAll attribute names.
[in]attribute_valuesAll attribute values.

◆ tls_certificate_origin_extra_xml()

gchar* tls_certificate_origin_extra_xml ( const char *  origin_type,
const char *  origin_id,
const char *  origin_data 
)

Generate extra XML for special TLS certificate origins like reports.

Parameters
[in]origin_typeThe origin type (e.g. "Report")
[in]origin_idThe id of the origin resource (e.g. report id)
[in]origin_dataThe extra origin data
Returns
Newly allocated XML string or NULL.

Variable Documentation

◆ create_tls_certificate_data

create_tls_certificate_t create_tls_certificate_data
static

Parser callback data.

This is initially 0 because it's a global variable.

◆ get_tls_certificates_data

get_tls_certificates_t get_tls_certificates_data
static

Parser callback data.

This is initially 0 because it's a global variable.

◆ modify_tls_certificate_data

modify_tls_certificate_t modify_tls_certificate_data
static

Parser callback data.

This is initially 0 because it's a global variable.