OpenVAS Libraries  8.0.3
openvas_auth.h
Go to the documentation of this file.
1 /* OpenVAS Libraries
2  * $Id$
3  * Description: Header for authentication mechanism(s).
4  *
5  * Authors:
6  * Matthew Mundell <matt@mundell.ukfsn.org>
7  * Michael Wiegand <michael.wiegand@greenbone.net>
8  * Felix Wolfsteller <felix.wolfsteller@intevation.de>
9  *
10  * Copyright:
11  * Copyright (C) 2009,2010 Greenbone Networks GmbH
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
26  * USA.
27  */
28 
29 #ifndef _OPENVAS_AUTH_H
30 #define _OPENVAS_AUTH_H
31 
32 #include <glib.h>
33 
34 #include "../base/array.h"
35 
41 {
45 };
46 
50 
51 const gchar *auth_method_name (auth_method_t);
52 
53 int openvas_auth_init_funcs (gchar * (*) (const gchar *),
54  int (*) (const gchar *, const gchar *,
55  const gchar *),
56  int (*) (const gchar *, auth_method_t),
57  gchar * (*) (const gchar *, auth_method_t));
58 
59 void openvas_auth_tear_down (void);
60 
61 int openvas_auth_write_config (GKeyFile * keyfile);
62 
63 gchar *get_password_hashes (int, const gchar *);
64 
65 gchar *digest_hex (int, const guchar *);
66 
67 int openvas_authenticate_method (const gchar *, const gchar *, auth_method_t *);
68 
69 int openvas_authenticate_uuid (const gchar *, const gchar *, gchar ** uuid);
70 
71 int openvas_user_exists (const char *);
72 
73 gchar *openvas_user_uuid (const char *name);
74 
75 #endif /* not _OPENVAS_AUTH_H */
Definition: openvas_auth.h:43
int openvas_auth_init_funcs(gchar *(*)(const gchar *), int(*)(const gchar *, const gchar *, const gchar *), int(*)(const gchar *, auth_method_t), gchar *(*)(const gchar *, auth_method_t))
Definition: openvas_auth.h:44
int openvas_user_exists(const char *)
Check whether a user exists.
Definition: openvas_auth.c:894
void openvas_auth_tear_down(void)
Free memory associated to authentication configuration.
Definition: openvas_auth.c:461
int openvas_authenticate_method(const gchar *, const gchar *, auth_method_t *)
Authenticate a credential pair and expose the method used.
Definition: openvas_auth.c:777
Definition: openvas_auth.h:42
int openvas_auth_write_config(GKeyFile *keyfile)
Writes the authentication mechanism configuration, merging with.
Definition: openvas_auth.c:480
authentication_method
Numerical representation of the supported authentication methods.
Definition: openvas_auth.h:40
enum authentication_method auth_method_t
Type for the numerical representation of the supported.
Definition: openvas_auth.h:49
const char * name
Definition: nasl_init.c:511
gchar * get_password_hashes(int, const gchar *)
Generate a pair of hashes to be used in the OpenVAS "auth/hash" file for the user.
Definition: openvas_auth.c:646
int openvas_authenticate_uuid(const gchar *, const gchar *, gchar **uuid)
const gchar * auth_method_name(auth_method_t)
Return name of auth_method_t.
Definition: openvas_auth.c:199
gchar * openvas_user_uuid(const char *name)
Return the UUID of a user from the OpenVAS user UUID file.
Definition: openvas_auth.c:931
gchar * digest_hex(int, const guchar *)
Generate a hexadecimal representation of a message digest.
Definition: openvas_auth.c:606