Greenbone Vulnerability Manager  9.0.1
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 
34 struct lsc_crypt_ctx_s;
35 typedef struct lsc_crypt_ctx_s *lsc_crypt_ctx_t;
36 
39 
40 int lsc_crypt_create_key ();
41 
43 
45  const char *, ...) G_GNUC_NULL_TERMINATED;
46 
47 const char *lsc_crypt_decrypt (lsc_crypt_ctx_t, const char *, const char *);
48 const char *lsc_crypt_get_password (lsc_crypt_ctx_t, const char *);
49 const char *lsc_crypt_get_private_key (lsc_crypt_ctx_t, const char *);
50 
51 
52 #endif /* not _GVMD_LSC_CRYPT_H */
lsc_crypt_release
void lsc_crypt_release(lsc_crypt_ctx_t ctx)
Release an LSC encryption context.
Definition: lsc_crypt.c:505
lsc_crypt_new
lsc_crypt_ctx_t lsc_crypt_new()
Return a new context for LSC encryption.
Definition: lsc_crypt.c:482
lsc_crypt_encrypt
char * lsc_crypt_encrypt(lsc_crypt_ctx_t ctx, const char *first_name,...)
Encrypt a list of name/value pairs.
Definition: lsc_crypt.c:557
lsc_crypt_flush
void lsc_crypt_flush(lsc_crypt_ctx_t ctx)
Flush an LSC encryption context.
Definition: lsc_crypt.c:527
lsc_crypt_get_private_key
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:805
lsc_crypt_ctx_s
The context object for encryption operations.
Definition: lsc_crypt.c:91
lsc_crypt_decrypt
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:634
disable_encrypted_credentials
gboolean disable_encrypted_credentials
Flag indicating that encrypted credentials are disabled.
Definition: gvmd.c:247
lsc_crypt_get_password
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:781