|
Greenbone Vulnerability Management Libraries 22.32.0
|
Authentication mechanism(s). More...


Go to the source code of this file.
Macros | |
| #define | G_LOG_DOMAIN "libgvm util" |
| GLib logging domain. | |
Functions | |
| 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. | |
| const gchar * | auth_method_name (auth_method_t method) |
| Return name of auth_method_t. | |
| int | auth_method_name_valid (const gchar *name) |
| Check if name is a valid auth method name. | |
| int | gvm_auth_init (void) |
| Initializes Gcrypt. | |
| gchar * | digest_hex (int gcrypt_algorithm, const guchar *digest) |
| Generate a hexadecimal representation of a message digest. | |
| gchar * | get_password_hashes (const gchar *password) |
| Generate a pair of md5 hashes to be used in the "auth/hash" file for the user. | |
| gchar * | get_md5_hash_from_string (const gchar *string) |
| Calculate the MD5 hash value for a given string. | |
| int | gvm_authenticate_classic (const gchar *username, const gchar *password, const gchar *hash_arg) |
| Authenticate a credential pair against user file contents. | |
Variables | |
| static const gchar * | authentication_methods [] |
| Array of string representations of the supported authentication methods. | |
| static gboolean | initialized = FALSE |
| Flag whether the config file was read. | |
Authentication mechanism(s).
Definition in file authutils.c.
| #define G_LOG_DOMAIN "libgvm util" |
GLib logging domain.
Definition at line 20 of file authutils.c.
| 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. |
Definition at line 76 of file authutils.c.
References AUTHENTICATION_METHOD_LAST, and authentication_methods.
Referenced by Ensure().

| int auth_method_name_valid | ( | const gchar * | name | ) |
Check if name is a valid auth method name.
| name | Name of auth method. |
Definition at line 91 of file authutils.c.
References authentication_methods.
Referenced by Ensure(), and Ensure().

| 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. Must be big enough for the gcrypt_algorithm. |
Definition at line 175 of file authutils.c.
Referenced by Ensure(), Ensure(), get_md5_hash_from_string(), get_password_hashes(), gvm_authenticate_classic(), and gvm_stream_validator_end().

| gchar * get_md5_hash_from_string | ( | const gchar * | string | ) |
Calculate the MD5 hash value for a given string.
| string | The String to be hashed |
Definition at line 249 of file authutils.c.
References digest_hex().
Referenced by Ensure(), and Ensure().


| 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. |
Definition at line 210 of file authutils.c.
References digest_hex().
Referenced by Ensure(), Ensure(), Ensure(), and Ensure().


| int gvm_auth_init | ( | void | ) |
Initializes Gcrypt.
Definition at line 109 of file authutils.c.
References initialized.
Referenced by BeforeEach(), Ensure(), Ensure(), Ensure(), and pba_verify_hash().

| int gvm_auth_ldap_enabled | ( | void | ) |
Return whether libraries has been compiled with LDAP support.
Definition at line 41 of file authutils.c.
Referenced by Ensure().

| int gvm_auth_radius_enabled | ( | void | ) |
Return whether libraries has been compiled with RADIUS support.
Definition at line 56 of file authutils.c.
Referenced by Ensure().

| 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. |
Definition at line 274 of file authutils.c.
References digest_hex().
Referenced by Ensure(), Ensure(), Ensure(), Ensure(), and pba_verify_hash().


|
static |
Array of string representations of the supported authentication methods.
Definition at line 27 of file authutils.c.
Referenced by auth_method_name(), and auth_method_name_valid().
|
static |
Flag whether the config file was read.
Definition at line 33 of file authutils.c.
Referenced by Ensure(), Ensure(), gvm_auth_init(), gvm_init_gpgme_ctx_from_dir(), and pba_verify_hash().