OpenVAS Libraries
4.0+rc3.SVN
Main Page
Related Pages
Data Structures
Files
File List
Globals
base
certificate.h
Go to the documentation of this file.
1
/* openvas-libraries/base
2
* $Id$
3
* Description: Certificate header file.
4
*
5
* Authors:
6
* Matthew Mundell <matt@mundell.ukfsn.org>
7
*
8
* Copyright:
9
* Copyright (C) 2009 Greenbone Networks GmbH
10
*
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License version 2,
13
* or, at your option, any later version as published by the Free
14
* Software Foundation
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
31
#ifndef _CERTIFICATE_H
32
#define _CERTIFICATE_H
33
34
#include <glib.h>
35
42
typedef
struct
43
{
44
gchar *
fingerprint
;
45
gchar *
owner
;
46
gchar *
public_key
;
47
gboolean
trusted
;
48
}
certificate_t
;
49
50
certificate_t
*
certificate_create
(
void
);
51
certificate_t
*
certificate_create_full
(
const
char
*fingerprint,
52
const
char
*owner,
53
const
char
*public_key,
54
gboolean trusted);
55
void
certificate_free
(
certificate_t
*);
56
57
const
gchar *
certificate_fingerprint
(
const
certificate_t
*);
58
const
gchar *
certificate_owner
(
const
certificate_t
*);
59
const
gchar *
certificate_public_key
(
const
certificate_t
*);
60
gboolean
certificate_trusted
(
const
certificate_t
*);
61
62
const
gchar *certificate_trust_level (
const
certificate_t
*);
63
64
int
certificate_set_fingerprint
(
certificate_t
*,
const
gchar *);
65
int
certificate_set_owner
(
certificate_t
*,
const
gchar *);
66
int
certificate_set_public_key
(
certificate_t
*,
const
gchar *);
67
void
certificate_set_trusted
(
certificate_t
*, gboolean);
68
69
70
/* Collections of certificates. */
71
78
typedef
struct
79
{
80
GSList *
list
;
81
}
certificates_t
;
82
83
certificates_t
*
certificates_create
();
84
void
certificates_free
(
certificates_t
*);
85
86
guint
certificates_size
(
certificates_t
*);
87
88
void
certificates_add
(
certificates_t
*,
certificate_t
*);
89
90
certificate_t
*
certificates_find
(
certificates_t
* certificates,
91
gconstpointer data, GCompareFunc
function
);
92
93
#endif
/* not _CERTIFICATE_H */
Generated by
1.8.1.1