OpenVAS Manager  7.0.3~git
lsc_crypt.h
Go to the documentation of this file.
1 /* OpenVAS Manager
2  * $Id$
3  * Description: LSC credentials encryption support
4  *
5  * Authors:
6  * Werner Koch <wk@gnupg.org>
7  *
8  * Copyright:
9  * Copyright (C) 2013 Greenbone Networks GmbH
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #ifndef _OPENVASMD_LSC_CRYPT_H
27 #define _OPENVASMD_LSC_CRYPT_H
28 
29 #include <glib.h>
30 
31 /* (Defined in openvasmd.c) */
33 
34 
35 struct lsc_crypt_ctx_s;
37 
38 lsc_crypt_ctx_t lsc_crypt_new ();
39 void lsc_crypt_release (lsc_crypt_ctx_t);
40 
42 
43 void lsc_crypt_flush (lsc_crypt_ctx_t);
44 
45 char *lsc_crypt_encrypt (lsc_crypt_ctx_t,
46  const char *, ...) G_GNUC_NULL_TERMINATED;
47 
48 const char *lsc_crypt_decrypt (lsc_crypt_ctx_t, const char *, const char *);
49 const char *lsc_crypt_get_password (lsc_crypt_ctx_t, const char *);
50 const char *lsc_crypt_get_private_key (lsc_crypt_ctx_t, const char *);
51 
52 
53 #endif /* _OPENVASMD_LSC_CRYPT_H */
char * lsc_crypt_encrypt(lsc_crypt_ctx_t, const char *,...) G_GNUC_NULL_TERMINATED
Encrypt a list of name/value pairs.
Definition: lsc_crypt.c:616
const char * lsc_crypt_decrypt(lsc_crypt_ctx_t, const char *, const char *)
Return an encrypted value in the clear.
Definition: lsc_crypt.c:693
void lsc_crypt_flush(lsc_crypt_ctx_t)
Flush an LSC encryption context.
Definition: lsc_crypt.c:586
const char * lsc_crypt_get_password(lsc_crypt_ctx_t, const char *)
Return an encrypted password in the clear.
Definition: lsc_crypt.c:840
int disable_encrypted_credentials
Flag indicating that encrypted credentials are disabled.
Definition: openvasmd.c:275
struct lsc_crypt_ctx_s * lsc_crypt_ctx_t
Definition: lsc_crypt.h:36
The context object for encryption operations.
Definition: lsc_crypt.c:87
void lsc_crypt_release(lsc_crypt_ctx_t)
Release an LSC encryption context.
Definition: lsc_crypt.c:528
const char * lsc_crypt_get_private_key(lsc_crypt_ctx_t, const char *)
Return an encrypted private key in the clear.
Definition: lsc_crypt.c:864
int lsc_crypt_create_key()
Create the standard credential encryption key.
Definition: lsc_crypt.c:549
lsc_crypt_ctx_t lsc_crypt_new()
Return a new context for LSC encryption.
Definition: lsc_crypt.c:507