|
Greenbone Vulnerability Management Libraries 22.25.0
|
Authentication mechanism(s). More...
#include <glib.h>Go to the source code of this file.
Typedefs | |
| typedef enum authentication_method | auth_method_t |
| Type for the numerical representation of the supported authentication methods. | |
Enumerations | |
| enum | authentication_method { AUTHENTICATION_METHOD_FILE = 0 , AUTHENTICATION_METHOD_LDAP_CONNECT , AUTHENTICATION_METHOD_RADIUS_CONNECT , AUTHENTICATION_METHOD_LAST } |
Numerical representation of the supported authentication methods. Beware to have it in sync with authentication_methods in authutils.c. More... | |
Functions | |
| const gchar * | auth_method_name (auth_method_t) |
| Return name of auth_method_t. | |
| int | auth_method_name_valid (const gchar *) |
| Check if name is a valid auth method name. | |
| int | gvm_auth_init (void) |
| Initializes Gcrypt. | |
| int | gvm_authenticate_classic (const gchar *, const gchar *, const gchar *) |
| Authenticate a credential pair against user file contents. | |
| gchar * | get_md5_hash_from_string (const gchar *) |
| Calculate the MD5 hash value for a given string. | |
| gchar * | get_password_hashes (const gchar *) |
| Generate a pair of md5 hashes to be used in the "auth/hash" file for the user. | |
| gchar * | digest_hex (int, const guchar *) |
| Generate a hexadecimal representation of a message digest. | |
| int | gvm_auth_ldap_enabled (void) |
| Return whether libraries has been compiled with LDAP support. | |
| int | gvm_auth_radius_enabled (void) |
| Return whether libraries has been compiled with RADIUS support. | |
Authentication mechanism(s).
| typedef enum authentication_method auth_method_t |
Type for the numerical representation of the supported authentication methods.
Numerical representation of the supported authentication methods. Beware to have it in sync with authentication_methods in authutils.c.
| Enumerator | |
|---|---|
| AUTHENTICATION_METHOD_FILE | |
| AUTHENTICATION_METHOD_LDAP_CONNECT | |
| AUTHENTICATION_METHOD_RADIUS_CONNECT | |
| AUTHENTICATION_METHOD_LAST | |
| const gchar * auth_method_name | ( | auth_method_t | method | ) |
Return name of auth_method_t.
Keep in sync with authentication_methods and authentication_method .
| method | Auth method. |
| int auth_method_name_valid | ( | const gchar * | name | ) |
Check if name is a valid auth method name.
| name | Name of auth method. |
| gchar * digest_hex | ( | int | gcrypt_algorithm, |
| const guchar * | digest ) |
Generate a hexadecimal representation of a message digest.
| gcrypt_algorithm | The libgcrypt message digest algorithm used to create the digest (e.g. GCRY_MD_MD5; see the enum gcry_md_algos in gcrypt.h). |
| digest | The binary representation of the digest. |
| gchar * get_md5_hash_from_string | ( | const gchar * | string | ) |
Calculate the MD5 hash value for a given string.
| string | The String to be hashed |
| gchar * get_password_hashes | ( | const gchar * | password | ) |
Generate a pair of md5 hashes to be used in the "auth/hash" file for the user.
The "auth/hash" file consist of two hashes, h_1 and h_2. h_2 (the "seed") is the message digest of (currently) 256 bytes of random data. h_1 is the message digest of h_2 concatenated with the password in plaintext.
| password | The password in plaintext. |
| int gvm_auth_init | ( | void | ) |
Initializes Gcrypt.
| int gvm_auth_ldap_enabled | ( | void | ) |
Return whether libraries has been compiled with LDAP support.
| int gvm_auth_radius_enabled | ( | void | ) |
Return whether libraries has been compiled with RADIUS support.
| int gvm_authenticate_classic | ( | const gchar * | username, |
| const gchar * | password, | ||
| const gchar * | hash_arg ) |
Authenticate a credential pair against user file contents.
| username | Username. |
| password | Password. |
| hash_arg | Hash. |