OpenVAS Libraries
9.0.3
|
Go to the source code of this file.
Macros | |
#define | NASL_EXEC_DESCR (1 << 0) |
#define | NASL_EXEC_PARSE_ONLY (1 << 1) |
#define | NASL_ALWAYS_SIGNED (1 << 2) |
#define | NASL_COMMAND_LINE (1 << 3) |
#define | NASL_LINT (1 << 4) |
#define | NASL_ERR_NOERR 0 |
#define | NASL_ERR_ETIMEDOUT 1 |
#define | NASL_ERR_ECONNRESET 2 |
#define | NASL_ERR_EUNREACH 3 |
#define | NASL_ERR_EUNKNOWN 99 |
Functions | |
int | nasl_verify_signature (const char *filename) |
char * | nasl_extract_signature_fprs (const char *filename) |
GSList * | nasl_get_all_certificates (void) |
int | add_nasl_inc_dir (const char *) |
Adds the given string as directory for searching for includes. More... | |
void | nasl_clean_inc (void) |
int | exec_nasl_script (struct arglist *, const char *, const char *, int) |
Execute a NASL script. More... | |
int | execute_preparsed_nasl_script (struct arglist *, char *, char *, int, int) |
char * | nasl_version (void) |
pid_t | nasl_server_start (char *, char *) |
void | nasl_server_recompile (char *, char *) |
#define NASL_ALWAYS_SIGNED (1 << 2) |
Definition at line 62 of file nasl.h.
Referenced by exec_nasl_script(), and main().
#define NASL_COMMAND_LINE (1 << 3) |
Definition at line 63 of file nasl.h.
Referenced by exec_nasl_script(), and main().
#define NASL_ERR_ECONNRESET 2 |
Definition at line 69 of file nasl.h.
Referenced by nasl_socket_get_error().
#define NASL_ERR_ETIMEDOUT 1 |
Definition at line 68 of file nasl.h.
Referenced by nasl_socket_get_error().
#define NASL_ERR_EUNREACH 3 |
Definition at line 70 of file nasl.h.
Referenced by nasl_socket_get_error().
#define NASL_ERR_NOERR 0 |
Definition at line 67 of file nasl.h.
Referenced by nasl_socket_get_error().
#define NASL_EXEC_DESCR (1 << 0) |
Definition at line 60 of file nasl.h.
Referenced by exec_nasl_script(), and main().
#define NASL_EXEC_PARSE_ONLY (1 << 1) |
Definition at line 61 of file nasl.h.
Referenced by exec_nasl_script(), and main().
#define NASL_LINT (1 << 4) |
Definition at line 64 of file nasl.h.
Referenced by exec_nasl_script(), and main().
int add_nasl_inc_dir | ( | const char * | dir | ) |
Adds the given string as directory for searching for includes.
dir | A directory path. This function will add a copy of this parameter to the list of include folders. This means the parameter can be freed elsewhere without affecting the list. |
Definition at line 2609 of file nasl_grammar.tab.c.
Referenced by main().
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"
script_infos | The plugin as arglist. Has to be allocated. |
name | Filename. |
mode | Bit field describing launch mode (description, parse always signed). |
Definition at line 1711 of file exec.c.
References add_named_var_to_ctxt(), naslctxt::always_authenticated, arg_add_value(), arg_get_value(), arg_set_value(), ARG_STRING, CONST_DATA, CONST_INT, deref_cell(), err, free_lex_ctxt(), get_func_ref_by_name(), TC::i_val, init_empty_lex_ctxt(), init_nasl_ctx(), init_nasl_library(), naslctxt::kb, naslctxt::line_nb, log_legacy_write(), name, NASL_ALWAYS_SIGNED, nasl_clean_ctx(), NASL_COMMAND_LINE, nasl_dump_tree(), nasl_exec(), NASL_EXEC_DESCR, NASL_EXEC_PARSE_ONLY, nasl_func_call(), NASL_LINT, nasl_lint(), nasl_perror(), nasl_set_filename(), nasl_trace_fp, naslparse(), nvticache_get_kb(), nvticache_initialized(), struct_lex_ctxt::oid, oid, plug_get_kb(), prefs_get(), struct_lex_ctxt::recv_timeout, struct_lex_ctxt::script_infos, TC::size, TC::str_val, naslctxt::tree, truc, TC::type, and TC::x.
int execute_preparsed_nasl_script | ( | struct arglist * | , |
char * | , | ||
char * | , | ||
int | , | ||
int | |||
) |
void nasl_clean_inc | ( | void | ) |
char* nasl_extract_signature_fprs | ( | const char * | filename | ) |
GSList* nasl_get_all_certificates | ( | void | ) |
void nasl_server_recompile | ( | char * | , |
char * | |||
) |
pid_t nasl_server_start | ( | char * | , |
char * | |||
) |
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.
filename | Filename (e.g. 1.txt) for which to check signature (e.g. 1.txt.asc). |
Definition at line 118 of file nasl_signature.c.
char* nasl_version | ( | void | ) |
Definition at line 724 of file nasl_init.c.