forked from OpenSCAP/openscap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcve_priv.h
144 lines (128 loc) · 3.38 KB
/
cve_priv.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/**
* @file cve_priv.h
* \brief Common Vulnerability and Exposure dictionary
*
* See details at:
* http://cve.mitre.org/
* http://nvd.nist.gov/download.cfm
*
*/
/*
* Copyright 2009 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* Maros Barabas <[email protected]>
*/
#ifndef CVE_PRIV_H_
#define CVE_PRIV_H_
#include <libxml/xmlreader.h>
#include <libxml/xmlwriter.h>
#include "../common/list.h"
#include "../common/elements.h"
/**
* @cond INTERNAL
*/
/* @endcond */
/**
* @struct cve_model
* Structure holding CVE model
*/
struct cve_model;
/**
* @struct cve_entry
* Structure holding CVE entry data
*/
struct cve_entry;
/**
* @struct cve_summary
* Structure holding CVE summary data
*/
struct cve_summary;
/**
* @struct cve_product
* Structure holding CVE product data
*/
struct cve_product;
/**
* @struct cve_configuration
* Structure CVE vulnerable configuration data
*/
struct cve_configuration;
/**
* @struct cwe_entry
* Structure holding CWE data
*/
struct cwe_entry;
/**
* @struct cve_reference
* Structure holding CVE reference data
*/
struct cve_reference;
/**
* Parse CVE model from XML (private function)
* @param file OSCAP import source
* @return new CVE model
*/
struct cve_model *cve_model_parse_xml(const char *file);
/**
* Parse CVE model
* @param reader XML Text Reader representing XML model
* @return parsed CVE mdoel
*/
struct cve_model *cve_model_parse(xmlTextReaderPtr reader);
/**
* Parse CVE entry
* @param reader XML Text Reader representing XML model
* @return parsed CVE entry
*/
struct cve_entry *cve_entry_parse(xmlTextReaderPtr reader);
/**
* Export CVE model to XML file
* @param cve CVE model
* @param writer XML Text Writer representing XML model
*/
void cve_export(const struct cve_model *cve, xmlTextWriterPtr writer);
/**
* Export CVE model to XML file
* @param cve CVE model
* @param file OSCAP export target
*/
void cve_model_export_xml(struct cve_model *cve, const char *file);
/**
* Export CVE reference to XML file
* @param refer CVE reference
* @param writer XML Text Writer representing XML model
*/
void cve_reference_export(const struct cve_reference *refer, xmlTextWriterPtr writer);
/**
* Export CVE summary to XML file
* @param sum CVE summary
* @param writer XML Text Writer representing XML model
*/
void cve_summary_export(const struct cve_summary *sum, xmlTextWriterPtr writer);
/**
* Export CVE entry to XML file
* @param entry CVE entry
* @param writer XML Text Writer representing XML model
*/
void cve_entry_export(const struct cve_entry *entry, xmlTextWriterPtr writer);
/**
* @cond INTERNAL
*/
/* @endcond */
#endif