#include <glib.h>
#include "../misc/arglists.h"
Go to the source code of this file.
◆ NASL_ALWAYS_SIGNED
#define NASL_ALWAYS_SIGNED (1 << 2) |
◆ NASL_COMMAND_LINE
#define NASL_COMMAND_LINE (1 << 3) |
◆ NASL_ERR_ECONNRESET
#define NASL_ERR_ECONNRESET 2 |
◆ NASL_ERR_ETIMEDOUT
#define NASL_ERR_ETIMEDOUT 1 |
◆ NASL_ERR_EUNKNOWN
#define NASL_ERR_EUNKNOWN 99 |
◆ NASL_ERR_EUNREACH
#define NASL_ERR_EUNREACH 3 |
◆ NASL_ERR_NOERR
◆ NASL_EXEC_DESCR
#define NASL_EXEC_DESCR (1 << 0) |
◆ NASL_EXEC_PARSE_ONLY
#define NASL_EXEC_PARSE_ONLY (1 << 1) |
◆ NASL_LINT
#define NASL_LINT (1 << 4) |
◆ add_nasl_inc_dir()
int add_nasl_inc_dir |
( |
const char * |
| ) |
|
◆ exec_nasl_script()
int exec_nasl_script |
( |
struct arglist * |
script_infos, |
|
|
const char * |
name, |
|
|
const char * |
oid, |
|
|
int |
mode |
|
) |
| |
Execute a NASL script.
"mode" is a bit field: bit #0 (1) is "description" Bit #1 (2) is "parse only"
- Parameters
-
script_infos | The plugin as arglist. Has to be allocated. |
name | Filename. |
mode | Bit field describing launch mode (description, parse always signed). |
- Returns
- 0 if the script was executed successfully, negative values if an error occurred.
- Todo:
- Initialization of the library seems intuitively be necessary only once (involves "linking" the nasl functions to c code). Consider a "prototype" context that has to be created only once and of which copies are made when needed.
◆ execute_preparsed_nasl_script()
int execute_preparsed_nasl_script |
( |
struct arglist * |
, |
|
|
char * |
, |
|
|
char * |
, |
|
|
int |
, |
|
|
int |
|
|
) |
| |
◆ nasl_clean_inc()
void nasl_clean_inc |
( |
void |
| ) |
|
◆ nasl_extract_signature_fprs()
char* nasl_extract_signature_fprs |
( |
const char * |
filename | ) |
|
◆ nasl_get_all_certificates()
GSList* nasl_get_all_certificates |
( |
void |
| ) |
|
◆ nasl_server_recompile()
void nasl_server_recompile |
( |
char * |
, |
|
|
char * |
|
|
) |
| |
◆ nasl_server_start()
pid_t nasl_server_start |
( |
char * |
, |
|
|
char * |
|
|
) |
| |
◆ nasl_verify_signature()
int nasl_verify_signature |
( |
const char * |
filename | ) |
|
Checks the detached OpenPGP signature of the file given by FILENAME. The name of the signature file is derived from FILENAME by appending ".asc".
If a signature file exists and it contains at least one fully valid signature, the function returns 0. If all of the signatures are not valid or were made by an unknown or untrusted key, the function returns 1. If an error occurs or the file does not have a corresponding detached signature the function returns -1.
- Parameters
-
filename | Filename (e.g. 1.txt) for which to check signature (e.g. 1.txt.asc). |
- Returns
- Zero, if files exists and at least one signature is fully trusted. 1 if all signatures are invalid or untrusted key. -1 on missing file or error.
◆ nasl_version()
char* nasl_version |
( |
void |
| ) |
|