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

GVM management layer: License information. More...

#include "manage_acl.h"
#include "manage_license.h"
#include "utils.h"

Macros

#define G_LOG_DOMAIN   "md manage"
 GLib log domain.
 

Functions

int manage_update_license_file (const char *new_license, char **error_msg)
 Update the license file by replacing it with the given one. More...
 
int manage_get_license (gchar **status, theia_license_t **license_data)
 Get the current license information. More...
 

Detailed Description

GVM management layer: License information.

GVM management layer: License information headers.

Non-SQL license information code for the GVM management layer.

Headers for non-SQL license information code for the GVM management layer.

Function Documentation

◆ manage_get_license()

int manage_get_license ( gchar **  status,
theia_license_t **  license_data 
)

Get the current license information.

Parameters
[out]statusThe validation status (e.g. "valid", "expired").
[out]license_dataThe content of the license organized in a struct.
Returns
0 success, 1 service unavailable, 2 error sending command, 3 error receiving response, 99 permission denied, -1 internal error.

◆ manage_update_license_file()

int manage_update_license_file ( const char *  new_license,
char **  error_msg 
)

Update the license file by replacing it with the given one.

Parameters
[in]new_licenseThe content of the new license.
[out]error_msgThe error message of the license update if any
Returns
0 success, 1 service unavailable, 2 error sending command, 3 error receiving response, 4 no new_license data, 5 error updating license, 99 permission denied, -1 internal error.