Greenbone Vulnerability Manager  8.0.0~git
lsc_crypt.h
1 /* Copyright (C) 2013-2018 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 
20 /*
21  * @file lsc_crypt.h
22  * @brief LSC credentials encryption support
23  */
24 
25 #ifndef _GVMD_LSC_CRYPT_H
26 #define _GVMD_LSC_CRYPT_H
27 
28 #include <glib.h>
29 
30 /* (Defined in gvmd.c) */
32 
33 struct lsc_crypt_ctx_s;
34 typedef struct lsc_crypt_ctx_s *lsc_crypt_ctx_t;
35 
37 lsc_crypt_new ();
39 
40 int
41 lsc_crypt_create_key ();
42 
44 
45 char *
46 lsc_crypt_encrypt (lsc_crypt_ctx_t, const char *, ...) G_GNUC_NULL_TERMINATED;
47 
48 const char *
49 lsc_crypt_decrypt (lsc_crypt_ctx_t, const char *, const char *);
50 const char *
52 const char *
54 
55 #endif /* not _GVMD_LSC_CRYPT_H */
lsc_crypt_ctx_t lsc_crypt_new()
Return a new context for LSC encryption.
Definition: lsc_crypt.c:485
const char * lsc_crypt_get_private_key(lsc_crypt_ctx_t ctx, const char *ciphertext)
Return an encrypted private key in the clear.
Definition: lsc_crypt.c:816
void lsc_crypt_flush(lsc_crypt_ctx_t ctx)
Flush an LSC encryption context.
Definition: lsc_crypt.c:529
const char * lsc_crypt_get_password(lsc_crypt_ctx_t ctx, const char *ciphertext)
Return an encrypted password in the clear.
Definition: lsc_crypt.c:792
The context object for encryption operations.
Definition: lsc_crypt.c:88
const char * lsc_crypt_decrypt(lsc_crypt_ctx_t ctx, const char *ciphertext, const char *name)
Return an encrypted value in the clear.
Definition: lsc_crypt.c:635
char * lsc_crypt_encrypt(lsc_crypt_ctx_t ctx, const char *first_name,...)
Encrypt a list of name/value pairs.
Definition: lsc_crypt.c:558
gboolean disable_encrypted_credentials
Flag indicating that encrypted credentials are disabled.
Definition: gvmd.c:262
void lsc_crypt_release(lsc_crypt_ctx_t ctx)
Release an LSC encryption context.
Definition: lsc_crypt.c:508