Greenbone Vulnerability Management Libraries  21.4.2
authutils.h
Go to the documentation of this file.
1 /* Copyright (C) 2009-2021 Greenbone Networks GmbH
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
25 #ifndef _GVM_AUTHUTILS_H
26 #define _GVM_AUTHUTILS_H
27 
28 #include <glib.h>
29 
36 {
41 };
42 
46 
47 const gchar *auth_method_name (auth_method_t);
48 
49 int
50 gvm_auth_init ();
51 
52 int
53 gvm_authenticate_classic (const gchar *, const gchar *, const gchar *);
54 
55 gchar *
56 get_password_hashes (const gchar *);
57 
58 gchar *
59 digest_hex (int, const guchar *);
60 
61 int
63 
64 int
66 
67 #endif /* not _GVM_AUTHUTILS_H */
enum authentication_method auth_method_t
Type for the numerical representation of the supported authentication methods.
Definition: authutils.h:45
const gchar * auth_method_name(auth_method_t)
Return name of auth_method_t.
Definition: authutils.c:90
gchar * digest_hex(int, const guchar *)
Generate a hexadecimal representation of a message digest.
Definition: authutils.c:168
int gvm_auth_ldap_enabled()
Return whether libraries has been compiled with LDAP support.
Definition: authutils.c:55
authentication_method
Numerical representation of the supported authentication methods. Beware to have it in sync with auth...
Definition: authutils.h:36
@ AUTHENTICATION_METHOD_FILE
Definition: authutils.h:37
@ AUTHENTICATION_METHOD_LDAP_CONNECT
Definition: authutils.h:38
@ AUTHENTICATION_METHOD_LAST
Definition: authutils.h:40
@ AUTHENTICATION_METHOD_RADIUS_CONNECT
Definition: authutils.h:39
int gvm_auth_init()
Initializes Gcrypt.
Definition: authutils.c:103
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:203
int gvm_authenticate_classic(const gchar *, const gchar *, const gchar *)
Authenticate a credential pair against user file contents.
Definition: authutils.c:243
int gvm_auth_radius_enabled()
Return whether libraries has been compiled with RADIUS support.
Definition: authutils.c:70