[Openvas-commits] r2442 - in trunk/openvas-libnasl: . nasl
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Feb 10 12:59:27 CET 2009
Author: felix
Date: 2009-02-10 12:59:26 +0100 (Tue, 10 Feb 2009)
New Revision: 2442
Modified:
trunk/openvas-libnasl/ChangeLog
trunk/openvas-libnasl/nasl/capture_packet.c
trunk/openvas-libnasl/nasl/exec.c
trunk/openvas-libnasl/nasl/nasl.c
trunk/openvas-libnasl/nasl/nasl_crypto.c
trunk/openvas-libnasl/nasl/nasl_crypto2.c
trunk/openvas-libnasl/nasl/nasl_init.c
trunk/openvas-libnasl/nasl/nasl_nessusd_glue.c
trunk/openvas-libnasl/nasl/nasl_signature.c
trunk/openvas-libnasl/nasl/nasl_text_utils.c
Log:
Documentation and formatting.
* nasl/nasl_nessusd_glue.c: Documentation transformed and added,
whitespaces removed.
* nasl/nasl_signature.c: Donated new lines to doc comments to improve
readability, minor documentation improvements, own lines for function
return types, minor formatting changes.
* nasl/nasl_crypto2.c: Transformed doc blocks to be doxygen-
interpretable, added file documentation block.
* nasl/nasl.c: Added file doc.
* nasl/nasl_crypto.c: Added file doc.
* nasl/nasl_init.c: Added/ transformed documentation.
* nasl/nasl_text_utils.c: Transformed documentation blocks.
* nasl/exec.c: Tiny documentation improvement.
* nasl/capture_packet.c: Tiny documentation improvement, white space
removal.
Modified: trunk/openvas-libnasl/ChangeLog
===================================================================
--- trunk/openvas-libnasl/ChangeLog 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/ChangeLog 2009-02-10 11:59:26 UTC (rev 2442)
@@ -1,3 +1,30 @@
+2009-02-10 Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+ Documentation and formatting.
+
+ * nasl/nasl_nessusd_glue.c: Documentation transformed and added,
+ whitespaces removed.
+
+ * nasl/nasl_signature.c: Donated new lines to doc comments to improve
+ readability, minor documentation improvements, own lines for function
+ return types, minor formatting changes.
+
+ * nasl/nasl_crypto2.c: Transformed doc blocks to be doxygen-
+ interpretable, added file documentation block.
+
+ * nasl/nasl.c: Added file doc.
+
+ * nasl/nasl_crypto.c: Added file doc.
+
+ * nasl/nasl_init.c: Added/ transformed documentation.
+
+ * nasl/nasl_text_utils.c: Transformed documentation blocks.
+
+ * nasl/exec.c: Tiny documentation improvement.
+
+ * nasl/capture_packet.c: Tiny documentation improvement, white space
+ removal.
+
2009-02-10 Michael Wiegand <michael.wiegand at intevation.de>
* nasl/nasl_grammar.y (add_nasl_inc_dir): Do not add entries to the
Modified: trunk/openvas-libnasl/nasl/capture_packet.c
===================================================================
--- trunk/openvas-libnasl/nasl/capture_packet.c 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/nasl/capture_packet.c 2009-02-10 11:59:26 UTC (rev 2442)
@@ -29,15 +29,13 @@
-/*
- * Set up the pcap filter, and select the correct interface.
+/**
+ * @brief Set up the pcap filter, and select the correct interface.
*
* The filter will be changed only if this is necessary
*
*/
-
int init_capture_device(struct in_addr src, struct in_addr dst, char * filter)
-
{
int ret = -1;
char * interface = NULL;
Modified: trunk/openvas-libnasl/nasl/exec.c
===================================================================
--- trunk/openvas-libnasl/nasl/exec.c 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/nasl/exec.c 2009-02-10 11:59:26 UTC (rev 2442)
@@ -264,7 +264,9 @@
}
#endif
-/* cell2atom returns a 'referenced' cell */
+/**
+ * @return A 'referenced' cell.
+ */
tree_cell*
cell2atom(lex_ctxt* lexic, tree_cell* c1)
{
@@ -1711,9 +1713,8 @@
* This function can be removed with the next major
* release after 2.0.
*
- * @param script_infos The lpugin as arglist. Has to be allocated, and at least
+ * @param script_infos The plugin as arglist. Has to be allocated, and at least
* "preferences" sould be set.
- * @param
* @return Values < 0
*/
int
@@ -1875,5 +1876,3 @@
return err;
}
-
-
Modified: trunk/openvas-libnasl/nasl/nasl.c
===================================================================
--- trunk/openvas-libnasl/nasl/nasl.c 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/nasl/nasl.c 2009-02-10 11:59:26 UTC (rev 2442)
@@ -17,6 +17,12 @@
*
*
*/
+
+ /**
+ * @file
+ * Source of the standalone NASL interpreter of OpenVAS.
+ */
+
#include <includes.h>
#include <hosts_gatherer.h>
Modified: trunk/openvas-libnasl/nasl/nasl_crypto.c
===================================================================
--- trunk/openvas-libnasl/nasl/nasl_crypto.c 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/nasl/nasl_crypto.c 2009-02-10 11:59:26 UTC (rev 2442)
@@ -16,7 +16,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
- /*
+
+ /** @file
* This file contains all the cryptographic functions NASL
* has
*/
Modified: trunk/openvas-libnasl/nasl/nasl_crypto2.c
===================================================================
--- trunk/openvas-libnasl/nasl/nasl_crypto2.c 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/nasl/nasl_crypto2.c 2009-02-10 11:59:26 UTC (rev 2442)
@@ -18,9 +18,11 @@
*
*/
- /*
+/**
+ * @file
* This file contains all the crypto functionality needed by the SSH protocol
*/
+
#include <includes.h>
#include <gcrypt.h>
#include <gnutls/gnutls.h>
@@ -47,16 +49,22 @@
#define INTBLOB_LEN 20
#define SIGBLOB_LEN (2*INTBLOB_LEN)
-/* prints a GnuTLS error. The parameter err should be the GnuTLS error
- * code */
+/**
+ * @brief Prints a GnuTLS error.
+ *
+ * The parameter err should be the GnuTLS error code
+ */
void
print_tls_error(lex_ctxt * lexic, char *txt, int err)
{
nasl_perror(lexic, "%s: %s (%d)\n", txt, gnutls_strerror(err), err);
}
-/* prints a libgcrypt error. The parameter err should be the libgcrypt
- * error code */
+/**
+ * @brief Prints a libgcrypt error.
+ *
+ * The parameter err should be the libgcrypt error code
+ */
void
print_gcrypt_error(lex_ctxt * lexic, char *function, int err)
{
@@ -65,7 +73,10 @@
function, gcry_strsource(err), gcry_strerror(err));
}
-/* Converts a string to a gcry_mpi_t. The string of len bytes at data
+/**
+ * @brief Converts a string to a gcry_mpi_t.
+ *
+ * The string of len bytes at data
* should contain the MPI as an unsigned int in bigendian form
* (libgcrypt's GCRYMPI_FMT_USG). The new MPI object is stored in dest.
* The parameters function and parameter are used in error messages to
@@ -97,12 +108,15 @@
return 0;
}
-/* Converts a named nasl parameter to a gcry_mpi_t. The new MPI object
+/**
+ * @brief Converts a named nasl parameter to a gcry_mpi_t.
+ *
+ * The new MPI object
* is stored in dest. The parameter parameter is the name of the
* parameter to be taken from lexic. The parameter function is used in
* error messages to indicate the name of the nasl function.
*
- * The function return 0 on success and -1 on failure.
+ * @return 0 on success and -1 on failure.
*/
static int
mpi_from_named_parameter(lex_ctxt* lexic, gcry_mpi_t *dest,
@@ -120,14 +134,17 @@
return mpi_from_string(lexic, dest, s, size, parameter, function);
}
-/* Sets the return value in retc from the MPI mpi. The MPI is converted
+/**
+ * @brief Sets the return value in retc from the MPI mpi.
+ *
+ * The MPI is converted
* to a byte string as an unsigned int in bigendian form (libgcrypts
* GCRYMPI_FMT_USG format). If first byte in the string has it's most
* significant bit set, i.e. if it would be considered negative when
* interpreted as two's-complement representation, a null-byte is
* prepended to make sure the number is always considered positive.
*
- * The function return 0 on success and -1 on failure.
+ * @return 0 on success and -1 on failure.
*/
static int
set_mpi_retc(tree_cell *retc, gcry_mpi_t mpi)
@@ -155,7 +172,8 @@
return 0;
}
-/* nasl function
+/**
+ * nasl function
*
* bn_cmp(key1:MPI1, key2:MPI2)
*
@@ -192,11 +210,12 @@
return retc;
}
-/* nasl function
+/**
+ * nasl function
*
* bn_random(need:numBits)
*
- * Returns an MPI as a string with need bits of random data.
+ * @return An MPI as a string with need bits of random data.
*/
tree_cell *
nasl_bn_random(lex_ctxt* lexic)
@@ -228,13 +247,15 @@
return retc;
}
-/* Loads a private key from a string. The string is taken from the nasl
+/**
+ * @brief Loads a private key from a string.
+ *
+ * The string is taken from the nasl
* parameter whose name is given by priv_name. The passphrase_name is
* the name of the parameter holding the passphrase if any. The string
* with the key must be in PEM format.
*
- * The function returns the GnuTLS private key object on success, NULL
- * on failure.
+ * @return The GnuTLS private key object on success, NULL on failure.
*/
static gnutls_x509_privkey_t
nasl_load_privkey_param(lex_ctxt* lexic, const char * priv_name,
@@ -292,7 +313,9 @@
return NULL;
}
-/* Implements the nasl functions pem_to_rsa and pem_to_dsa. */
+/**
+ * @brief Implements the nasl functions pem_to_rsa and pem_to_dsa.
+ */
tree_cell *
nasl_pem_to(lex_ctxt* lexic, int type)
{
@@ -369,7 +392,8 @@
}
-/* nasl function
+/**
+ * nasl function
*
* pem_to_rsa(priv:PEM, passphrase:PASSPHRASE)
*
@@ -385,7 +409,8 @@
}
-/* nasl function
+/**
+ * nasl function
*
* pem_to_dsa(priv:PEM, passphrase:PASSPHRASE)
*
@@ -401,13 +426,16 @@
}
-/* compute the diffie hellman public key. Neither GnuTLS nor Libgcrypt
+/**
+ * @brief compute the diffie hellman public key.
+ *
+ * Neither GnuTLS nor Libgcrypt
* contain a direct counterpart to OpenSSL's DH_generate_key, so we
* implement it ourselves. This function was copied from from gnutls
* and adapted to use gcrypt directly and to use a private key given as
* parameter to the function.
*
- * The function returns the key on success and NULL on failure.
+ * @return The key on success and NULL on failure.
*/
static gcry_mpi_t
calc_dh_public(gcry_mpi_t g, gcry_mpi_t prime, gcry_mpi_t priv)
@@ -425,13 +453,16 @@
return e;
}
-/* compute the diffie hellman shared secret key. Neither GnuTLS nor
+/**
+ * @brief Compute the diffie hellman shared secret key.
+ *
+ * Neither GnuTLS nor
* libgcrypt contain a direct counterpart to OpenSSL's DH_compute_key,
* so we implement it ourselves. This function was copied from from
* gnutls and adapted to use gcrypt directly and to use a private key
* given as parameter to the function.
*
- * The function returns the key on success and NULL on failure.
+ * @return The key on success and NULL on failure.
*/
static gcry_mpi_t
calc_dh_key(gcry_mpi_t pub, gcry_mpi_t prime, gcry_mpi_t priv)
@@ -449,7 +480,8 @@
return e;
}
-/* nasl function
+/**
+ * nasl function
*
* dh_generate_key(p:mpi_p, g:mpi_g, priv:mpi_priv)
*
@@ -491,7 +523,8 @@
return retc;
}
-/* nasl function
+/**
+ * nasl function
*
* DH_compute_key(p:mpi_p, g:mpi_g, dh_server_pub:mpi_server_pub,
* pub_key:mpi_client_pub, priv_key:mpi_client_priv)
@@ -544,8 +577,10 @@
return retc;
}
-/*
- * Extracts an MPI value from a libgcryt s-expression. The return value
+/**
+ * @brief Extracts an MPI value from a libgcryt s-expression.
+ *
+ * The return value
* is the cadr of the subexpression whose car is given by token. The
* function returns NULL if the token doesn't occur in the expression or
* on other errors.
@@ -572,8 +607,10 @@
return mpi;
}
-/*
- * Sets the return value in retc from an sexpression. The function uses
+/**
+ * @brief Sets the return value in retc from an sexpression.
+ *
+ * The function uses
* extract_mpi_from_sexp to extract an MPI from the sexpression sexp and
* the subexpression given by token.
* The function return 1 on success
@@ -594,8 +631,8 @@
return ret;
}
-/*
- * Strips PKCS#1 padding from the string in retc.
+/**
+ * @brief Strips PKCS#1 padding from the string in retc.
*/
static int
strip_pkcs1_padding(tree_cell *retc)
@@ -639,7 +676,8 @@
return 0;
}
-/* nasl function
+/**
+ * nasl function
*
* rsa_public_decrypt(sig:signature, e:mpi_e, n:mpi_n)
*
@@ -704,7 +742,8 @@
return retc;
}
-/* Creates a libgcryt s-expression from a GnuTLS private RSA key.
+/**
+ * @brief Creates a libgcryt s-expression from a GnuTLS private RSA key.
*/
#define NUM_RSA_PARAMS 6
static gcry_sexp_t
@@ -770,7 +809,8 @@
}
-/* nasl function
+/**
+ * nasl function
*
* rsa_sign(data:hash, priv:pem, passphrase:passphrase)
*
@@ -845,7 +885,8 @@
}
-/* nasl function
+/**
+ * nasl function
*
* dsa_do_verify(p:mpi_p, g:mpi_g, q:mpi_q, pub:mpi_pub,
* r:mpi_r, s:mpi_s, data:hash)
@@ -932,7 +973,8 @@
return retc;
}
-/* nasl function
+/**
+ * nasl function
*
* dsa_do_sign(p:mpi_p, g:mpi_g, q:mpi_q, pub:mpi_pub, priv:mpi_priv,
* data:hash)
@@ -1052,7 +1094,9 @@
return retc;
}
-/* Implements the nasl functions bf_cbc_encrypt and bf_cbc_decrypt. */
+/**
+ * @brief Implements the nasl functions bf_cbc_encrypt and bf_cbc_decrypt.
+ */
tree_cell *
nasl_bf_cbc(lex_ctxt* lexic, int enc)
{
@@ -1190,7 +1234,8 @@
}
-/* nasl function
+/**
+ * nasl function
*
* bf_cbc_encrypt(key:key, iv:iv, data:data)
*
@@ -1210,7 +1255,8 @@
}
-/* nasl function
+/**
+ * nasl function
*
* bf_cbc_decrypt(key:key, iv:iv, data:data)
*
@@ -1232,7 +1278,8 @@
/*--------------------------------------------------------------*/
-/* Reads the contents of the file given by filename into memory and
+/**
+ * Reads the contents of the file given by filename into memory and
* returns it as a gnutls_datum_t. If an error occurs the
* gnutls_datum_t's data field is NULL.
*/
Modified: trunk/openvas-libnasl/nasl/nasl_init.c
===================================================================
--- trunk/openvas-libnasl/nasl/nasl_init.c 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/nasl/nasl_init.c 2009-02-10 11:59:26 UTC (rev 2442)
@@ -49,11 +49,15 @@
typedef struct {
const char *name;
tree_cell* (*c_code)(lex_ctxt*);
- int unnamed; /* Nb of unnamed args */
- const char *args[16]; /* Must be sorted! Finish list with NULL */
+ int unnamed; /**< Number of unnamed arguments. */
+ const char *args[16]; /**< Must be sorted and terminated with NULL. */
} init_func;
-
+/**
+ * Mapping of function names in NASL (eg. script_name("english")) to the
+ * C function pointers (e.g. script_name (lex_ctx**) ), argument count and
+ * argument Meta-information (names).
+ */
static init_func libfuncs[] = {
{ "script_name", script_name, 1,
{ "deutsch", "english", "francais", "portugues", NULL } },
Modified: trunk/openvas-libnasl/nasl/nasl_nessusd_glue.c
===================================================================
--- trunk/openvas-libnasl/nasl/nasl_nessusd_glue.c 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/nasl/nasl_nessusd_glue.c 2009-02-10 11:59:26 UTC (rev 2442)
@@ -16,11 +16,14 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
- /*
- * This file contains all the function that make the "glue" between
- * as NASL script and nessusd.
- * (script_*(), *kb*(), scanner_*())
- */
+
+/**
+ * @file
+ * This file contains all the functions that make the "glue" between
+ * as NASL script and openvasd.
+ * (script_*(), *kb*(), scanner_*())
+ */
+
#include <includes.h>
#include <glib.h>
@@ -706,7 +709,7 @@
return retc;
}
-/*
+/**
* Instead of reading the local copy of the KB, we ask the upstream
* father the "newest" value of a given KB item. This is especially useful
* when dealing with shared sockets and SSH
@@ -848,11 +851,13 @@
/*------------------------[ Reporting a problem ]---------------------------*/
-/*
- * These functions are used when the script wants to report a problem
- * back to nessusd
+/**
+ * Function is used when the script wants to report a problem back to openvasd.
*/
typedef void(*proto_post_something_t)(struct arglist*, int, const char*, const char *);
+/**
+ * Function is used when the script wants to report a problem back to openvasd.
+ */
typedef void(*post_something_t)(struct arglist*, int, const char*);
@@ -967,13 +972,11 @@
/*-------------------------[ Reporting an open port ]---------------------*/
-/*
+/**
* If the plugin is a port scanner, it needs to report the list of open
* ports back to nessusd, and it also needs to know which ports are
* to scan
*/
-
-
tree_cell * nasl_scanner_get_port(lex_ctxt * lexic)
{
tree_cell * retc;
@@ -1060,7 +1063,7 @@
struct arglist * script_infos = lexic->script_infos;
if ( name == NULL || soc < 0 )
- {
+ {
fprintf(stderr, "Usage: shared_socket_register(name:<name>, socket:<soc>)\n");
return NULL;
}
Modified: trunk/openvas-libnasl/nasl/nasl_signature.c
===================================================================
--- trunk/openvas-libnasl/nasl/nasl_signature.c 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/nasl/nasl_signature.c 2009-02-10 11:59:26 UTC (rev 2442)
@@ -36,14 +36,17 @@
/**
* Returns pointer to freshly allocated and initialized openvas_certificate.
+ *
* @param fingerpr ingerprint of certificate.
* @param owner Certificate owners name.
* @param istrusted Whether this certificate is trustworthy or not.
* @param pubkey Full public key.
+ *
* @return Pointer to fresh openvas_certificate.
*/
-openvas_certificate* openvas_certificate_new(char* fingerpr, char* owner,
- gboolean istrusted, char* pubkey)
+openvas_certificate*
+openvas_certificate_new (char* fingerpr, char* owner, gboolean istrusted,
+ char* pubkey)
{
openvas_certificate* cert = emalloc(sizeof(openvas_certificate));
cert->fpr = fingerpr;
@@ -55,9 +58,11 @@
/**
* Frees the openvas_certificate and all associated data.
+ *
* @param cert Certificate which holds pointers to the data.
*/
-void openvas_certificate_free(openvas_certificate* cert)
+void
+openvas_certificate_free (openvas_certificate* cert)
{
if(cert == NULL)
return;
@@ -70,20 +75,24 @@
efree(&cert);
}
-/*
+/**
* Prints an error message for errors returned by gpgme.
+ *
+ * @param function Calling function name (debug info).
+ * @param err The gpgme error that caused the problem.
*/
static void
-print_gpgme_error(char *function, gpgme_error_t err)
+print_gpgme_error (char *function, gpgme_error_t err)
{
nasl_perror(NULL, "%s failed: %s/%s\n",
function, gpgme_strsource(err), gpgme_strerror(err));
}
-/*
+/**
* Checks whether the signature verification result has at least one
* signature and whether all signatures are fully valid. The function
* returns 1 if all signatures are fully valid and 0 otherwise.
+ * @param result The verificateion result to examine.
*/
static int
examine_signatures(gpgme_verify_result_t result)
@@ -130,16 +139,18 @@
return num_sigs > 0 && num_sigs == num_valid;
}
-/*
+/**
* Returns the name of the GnuPG home directory to use when checking
* GnuPG signatures. The return value is the value of the environment
* variable OPENVAS_GPGHOME if it is set. Otherwise it is the directory
* openvas/gnupg under the sysconfdir that was set by configure (usually
* $prefix/etc). The return value has been created by estrdup and must
* be deallocated by efree.
+ *
+ * @return Custom path of the GnuPG home directory.
*/
static char *
-determine_gpghome()
+determine_gpghome ()
{
char * default_dir = OPENVAS_SYSCONFDIR "/openvas/gnupg";
char * envdir = getenv("OPENVAS_GPGHOME");
@@ -150,10 +161,11 @@
/**
* Inits a gpgme context with the custom gpghome directory, protocol version
* etc. Returns the context or NULL if an error occurred.
+ *
* @return The gpgme_ctx_t to the context or NULL if an error occurred.
*/
gpgme_ctx_t
-init_openvas_gpgme_ctx()
+init_openvas_gpgme_ctx ()
{
gpgme_error_t err;
gpgme_ctx_t ctx = NULL;
@@ -204,14 +216,16 @@
* valid or was 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.
+ *
* @param filename Filename (e.g. 1.txt ) for which to check signature (e.g.
1.txt.asc).
+ *
* @return Zero, if files exists and all signatures are fully trusted. 1 if at
* least one signature from invalid or untrusted key. -1 on missing file
* or error.
*/
int
-nasl_verify_signature(const char* filename)
+nasl_verify_signature (const char* filename)
{
int retcode = -1;
char * sigfilename = NULL;
@@ -283,12 +297,15 @@
* Extracts fingerprints of signing public keys in a given signature file.
* Works like nasl_verify_signature, but always returns a string with the
* fingerprints in it (NULL if error), even if the keys is not trusted.
+ *
* @param filename Path to the signed file (e.g. /../check_killerapp.nasl).
+ *
* @return A string with comma- separated fingerprints or NULL if error.
+ *
* @see nasl_verify_signature( const char* filename )
*/
char*
-nasl_extract_signature_fprs(const char* filename){
+nasl_extract_signature_fprs (const char* filename){
char * sigfilename = NULL;
gpgme_error_t err;
gpgme_ctx_t ctx = init_openvas_gpgme_ctx();
@@ -405,15 +422,17 @@
/**
- * Reads in a full public key.
+ * @brief Reads in a full public key.
* The returned string will be ascii- armored.
+ *
* @param ctx The gpgme context to work in.
* @param fingerprint Fingerprint of the key to return.
+ *
* @return The public key belonging to fingerprint in an emalloc'ed string
* or NULL if an error occurred.
*/
char*
-nasl_get_pubkey(gpgme_ctx_t ctx, char* fingerprint)
+nasl_get_pubkey (gpgme_ctx_t ctx, char* fingerprint)
{
gpgme_set_armor(ctx,1);
@@ -488,10 +507,11 @@
* Creation has to be done in two steps: First retrieve info like ownername and
* trust level and then read in the full public key. The two steps have to
* be done seperately because the two gpgme listing operations are exclusive.
+ *
* @return Pointer to a GSList containing pointers to openvas_certificate structs.
*/
GSList*
-nasl_get_all_certificates()
+nasl_get_all_certificates ()
{
GSList* certificates = NULL;
// Certificate retrieval
Modified: trunk/openvas-libnasl/nasl/nasl_text_utils.c
===================================================================
--- trunk/openvas-libnasl/nasl/nasl_text_utils.c 2009-02-10 11:57:29 UTC (rev 2441)
+++ trunk/openvas-libnasl/nasl/nasl_text_utils.c 2009-02-10 11:59:26 UTC (rev 2442)
@@ -18,7 +18,9 @@
*
*/
- /* This file implements all the functions that are related to
+ /**
+ * @file
+ * This file implements all the functions that are related to
* text-related utilities in the NASL functions.
*/
@@ -811,7 +813,7 @@
return retc;
}
-/*
+/**
* Syntax: substr(s, i1) or substr(s, i1, i2)
* Returns character from string s starting for position i1 till the end or
* position i2 (start of string is 0)
@@ -853,7 +855,7 @@
return retc;
}
/*---------------------------------------------------------------------*/
-/*
+/**
* Syntax: insstr(s1, s2, i1, i2) or insstr(s1, s2, i1)
* Insert string s2 into slice [i1:i2] of string s1 and returns the result
* Warning: returns a CONST_DATA!
@@ -1174,13 +1176,12 @@
}
-/*
+/**
* stridx does the same job as strstr but returns the index of the substring
* Returning NULL for "not found" is dangerous as automatic conversion to
* to integer would change it into 0.
* So we return (-1)
*/
-
tree_cell*
nasl_stridx(lex_ctxt * lexic)
{
@@ -1215,10 +1216,9 @@
return retc;
}
-/*
+/**
* str_replace(string: s, find: f, replace: r [,count: n])
*/
-
tree_cell*
nasl_str_replace(lex_ctxt * lexic)
{
More information about the Openvas-commits
mailing list