OpenVAS Scanner
6.0.1
|
Go to the source code of this file.
Functions | |
int | nasl_verify_signature (const char *, const char *, size_t) |
int nasl_verify_signature | ( | const char * | filename, |
const char * | fcontent, | ||
size_t | flen | ||
) |
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). |