Greenbone Vulnerability Manager 22.5.2
lsc_crypt.h
1/* Copyright (C) 2013-2022 Greenbone AG
2 *
3 * SPDX-License-Identifier: AGPL-3.0-or-later
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as
7 * published by the Free Software Foundation, either version 3 of the
8 * 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 Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/*
20 * @file lsc_crypt.h
21 * @brief LSC credentials encryption support
22 */
23
24#ifndef _GVMD_LSC_CRYPT_H
25#define _GVMD_LSC_CRYPT_H
26
27#include <glib.h>
28
29/* (Defined in gvmd.c) */
31
32
33struct lsc_crypt_ctx_s;
34typedef struct lsc_crypt_ctx_s *lsc_crypt_ctx_t;
35
38
39int lsc_crypt_create_key ();
40
42
44 const char *, ...) G_GNUC_NULL_TERMINATED;
45
46const char *lsc_crypt_decrypt (lsc_crypt_ctx_t, const char *, const char *);
47const char *lsc_crypt_get_password (lsc_crypt_ctx_t, const char *);
48const char *lsc_crypt_get_private_key (lsc_crypt_ctx_t, const char *);
49
50
51#endif /* not _GVMD_LSC_CRYPT_H */
gboolean disable_encrypted_credentials
Flag indicating that encrypted credentials are disabled.
Definition: gvmd.c:264
lsc_crypt_ctx_t lsc_crypt_new()
Return a new context for LSC encryption.
Definition: lsc_crypt.c:485
void lsc_crypt_flush(lsc_crypt_ctx_t ctx)
Flush an LSC encryption context.
Definition: lsc_crypt.c:531
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:809
char * lsc_crypt_encrypt(lsc_crypt_ctx_t ctx, const char *first_name,...)
Encrypt a list of name/value pairs.
Definition: lsc_crypt.c:561
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:638
void lsc_crypt_release(lsc_crypt_ctx_t ctx)
Release an LSC encryption context.
Definition: lsc_crypt.c:509
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:785
The context object for encryption operations.
Definition: lsc_crypt.c:91