Greenbone Vulnerability Management Libraries: util/authutils.h Source File

Greenbone Vulnerability Management Libraries 23.1.1

authutils.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009-2023 Greenbone AG
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
10
11#ifndef _GVM_UTIL_AUTHUTILS_H
12#define _GVM_UTIL_AUTHUTILS_H
13
14#include <glib.h>
15
21 enum authentication_method
22{
23 AUTHENTICATION_METHOD_FILE = 0,
24 AUTHENTICATION_METHOD_LDAP_CONNECT,
25 AUTHENTICATION_METHOD_RADIUS_CONNECT,
26 AUTHENTICATION_METHOD_LAST
27};
28
31 typedef enum authentication_method auth_method_t;
32
33const gchar *auth_method_name (auth_method_t);
34
35int
36 auth_method_name_valid (const gchar *);
37
38int
39 gvm_auth_init (void);
40
41int
42 gvm_authenticate_classic (const gchar *, const gchar *, const gchar *);
43
44gchar *
45 get_md5_hash_from_string (const gchar *);
46
47gchar *
48 get_password_hashes (const gchar *);
49
50gchar *
51 digest_hex (int, const guchar *);
52
53int
54 gvm_auth_ldap_enabled (void);
55
56int
57 gvm_auth_radius_enabled (void);
58
59#endif /* not _GVM_UTIL_AUTHUTILS_H */
auth_method_t
enum authentication_method auth_method_t
Type for the numerical representation of the supported authentication methods.
Definition authutils.h:31
gvm_auth_radius_enabled
int gvm_auth_radius_enabled(void)
Return whether libraries has been compiled with RADIUS support.
Definition authutils.c:56
get_password_hashes
gchar * get_password_hashes(const gchar *)
Generate a pair of md5 hashes to be used in the "auth/hash" file for the user.
Definition authutils.c:210
authentication_method
authentication_method
Numerical representation of the supported authentication methods. Beware to have it in sync with auth...
Definition authutils.h:22
AUTHENTICATION_METHOD_FILE
@ AUTHENTICATION_METHOD_FILE
Definition authutils.h:23
AUTHENTICATION_METHOD_LDAP_CONNECT
@ AUTHENTICATION_METHOD_LDAP_CONNECT
Definition authutils.h:24
AUTHENTICATION_METHOD_LAST
@ AUTHENTICATION_METHOD_LAST
Definition authutils.h:26
AUTHENTICATION_METHOD_RADIUS_CONNECT
@ AUTHENTICATION_METHOD_RADIUS_CONNECT
Definition authutils.h:25
gvm_auth_init
int gvm_auth_init(void)
Initializes Gcrypt.
Definition authutils.c:109
auth_method_name
const gchar * auth_method_name(auth_method_t)
Return name of auth_method_t.
Definition authutils.c:76
auth_method_name_valid
int auth_method_name_valid(const gchar *)
Check if name is a valid auth method name.
Definition authutils.c:91
digest_hex
gchar * digest_hex(int, const guchar *)
Generate a hexadecimal representation of a message digest.
Definition authutils.c:175
gvm_authenticate_classic
int gvm_authenticate_classic(const gchar *, const gchar *, const gchar *)
Authenticate a credential pair against user file contents.
Definition authutils.c:274
get_md5_hash_from_string
gchar * get_md5_hash_from_string(const gchar *)
Calculate the MD5 hash value for a given string.
Definition authutils.c:249
gvm_auth_ldap_enabled
int gvm_auth_ldap_enabled(void)
Return whether libraries has been compiled with LDAP support.
Definition authutils.c:41