26#include <libxml/xmlreader.h>
27#include <libxml/tree.h>
28#include <libxml/xpath.h>
29#include <libxml/parser.h>
30#include <libxml/xpathInternals.h>
32#include "../common/list.h"
33#include "../common/elements.h"
38#define CVRF_NS BAD_CAST "http://www.icasi.org/CVRF/schema/cvrf/1.1"
39#define PROD_NS BAD_CAST "http://www.icasi.org/CVRF/schema/prod/1.1"
40#define VULN_NS BAD_CAST "http://www.icasi.org/CVRF/schema/vuln/1.1"
51 CVRF_DOC_PUBLISHER_UNKNOWN = 0,
52 CVRF_DOC_PUBLISHER_VENDOR,
53 CVRF_DOC_PUBLISHER_DISCOVERER,
54 CVRF_DOC_PUBLISHER_COORDINATOR,
55 CVRF_DOC_PUBLISHER_USER,
56 CVRF_DOC_PUBLISHER_OTHER,
57} cvrf_doc_publisher_type_t;
65cvrf_doc_publisher_type_t cvrf_doc_publisher_get_type(
struct cvrf_doc_publisher *publisher);
73cvrf_doc_publisher_type_t cvrf_involvement_get_party(
struct cvrf_involvement *involve);
80cvrf_doc_publisher_type_t cvrf_doc_publisher_type_parse(xmlTextReaderPtr reader);
88cvrf_doc_publisher_type_t cvrf_involvement_party_parse(xmlTextReaderPtr reader);
95const char *cvrf_doc_publisher_type_get_text(cvrf_doc_publisher_type_t type);
102 CVRF_DOC_STATUS_UNKNOWN = 0,
103 CVRF_DOC_STATUS_DRAFT,
104 CVRF_DOC_STATUS_INTERIM,
105 CVRF_DOC_STATUS_FINAL,
106} cvrf_doc_status_type_t;
114cvrf_doc_status_type_t cvrf_doc_tracking_get_status(
struct cvrf_doc_tracking *tracking);
121cvrf_doc_status_type_t cvrf_doc_status_type_parse(xmlTextReaderPtr reader);
128const char *cvrf_doc_status_type_get_text(cvrf_doc_status_type_t type);
135 CVRF_NOTE_UNKNOWN = 0,
138 CVRF_NOTE_DESCRIPTION,
141 CVRF_NOTE_LEGAL_DISCLAIMER,
151cvrf_note_type_t cvrf_note_get_note_type(
const struct cvrf_note *note);
158cvrf_note_type_t cvrf_note_type_parse(xmlTextReaderPtr reader);
165const char *cvrf_note_type_get_text(cvrf_note_type_t type);
172 CVRF_REFERENCE_UNKNOWN = 0,
173 CVRF_REFERENCE_EXTERNAL,
175} cvrf_reference_type_t;
183cvrf_reference_type_t cvrf_reference_get_reference_type(
struct cvrf_reference *reference);
190cvrf_reference_type_t cvrf_reference_type_parse(xmlTextReaderPtr reader);
197const char *cvrf_reference_type_get_text(cvrf_reference_type_t type);
204 CVRF_BRANCH_UNKNOWN = 0,
206 CVRF_BRANCH_PRODUCT_FAMILY,
207 CVRF_BRANCH_PRODUCT_NAME,
208 CVRF_BRANCH_PRODUCT_VERSION,
209 CVRF_BRANCH_PATCH_LEVEL,
210 CVRF_BRANCH_SERVICE_PACK,
211 CVRF_BRANCH_ARCHITECTURE,
212 CVRF_BRANCH_LANGUAGE,
214 CVRF_BRANCH_SPECIFICATION,
223cvrf_branch_type_t cvrf_branch_get_branch_type(
struct cvrf_branch *branch);
230cvrf_branch_type_t cvrf_branch_type_parse(xmlTextReaderPtr reader);
237const char *cvrf_branch_type_get_text(cvrf_branch_type_t type);
247 CVRF_RELATIONSHIP_UNKNOWN = 0,
248 CVRF_RELATIONSHIP_DEFAULT_COMPONENT,
249 CVRF_RELATIONSHIP_OPTIONAL_COMPONENT,
250 CVRF_RELATIONSHIP_EXTERNAL_COMPONENT,
251 CVRF_RELATIONSHIP_INSTALLED_ON,
252 CVRF_RELATIONSHIP_INSTALLED_WITH,
253} cvrf_relationship_type_t;
261cvrf_relationship_type_t cvrf_relationship_get_relation_type(
struct cvrf_relationship *relation);
268cvrf_relationship_type_t cvrf_relationship_type_parse(xmlTextReaderPtr reader);
275const char *cvrf_relationship_type_get_text(cvrf_relationship_type_t type);
282 CVRF_INVOLVEMENT_UNKNOWN = 0,
283 CVRF_INVOLVEMENT_OPEN,
284 CVRF_INVOLVEMENT_DISPUTED,
285 CVRF_INVOLVEMENT_IN_PROGRESS,
286 CVRF_INVOLVEMENT_COMPLETED,
287 CVRF_INVOLVEMENT_CONTACT_ATTEMPTED,
288 CVRF_INVOLVEMENT_NOT_CONTACTED,
289} cvrf_involvement_status_type_t;
297cvrf_involvement_status_type_t cvrf_involvement_get_status_type(
struct cvrf_involvement *involve);
304cvrf_involvement_status_type_t cvrf_involvement_status_type_parse(xmlTextReaderPtr reader);
311const char *cvrf_involvement_status_type_get_text(cvrf_involvement_status_type_t type);
320 CVRF_PRODUCT_STATUS_UNKNOWN = 0,
321 CVRF_PRODUCT_STATUS_FIRST_AFFECTED,
322 CVRF_PRODUCT_STATUS_KNOWN_AFFECTED,
323 CVRF_PRODUCT_STATUS_KNOWN_NOT_AFFECTED,
324 CVRF_PRODUCT_STATUS_FIRST_FIXED,
325 CVRF_PRODUCT_STATUS_FIXED,
326 CVRF_PRODUCT_STATUS_RECOMMENDED,
327 CVRF_PRODUCT_STATUS_LAST_AFFECTED,
328} cvrf_product_status_type_t;
344cvrf_product_status_type_t cvrf_product_status_type_parse(xmlTextReaderPtr reader);
351const char *cvrf_product_status_type_get_text(cvrf_product_status_type_t product_status_type);
359 CVRF_THREAT_UNKNOWN = 0,
361 CVRF_THREAT_EXPLOIT_STATUS,
362 CVRF_THREAT_TARGET_SET,
371cvrf_threat_type_t cvrf_threat_get_threat_type(
struct cvrf_threat *threat);
378cvrf_threat_type_t cvrf_threat_type_parse(xmlTextReaderPtr reader);
385const char *cvrf_threat_type_get_text(cvrf_threat_type_t threat_type);
392 CVRF_REMEDIATION_UNKNOWN = 0,
393 CVRF_REMEDIATION_WORKAROUND,
394 CVRF_REMEDIATION_MITIGATION,
395 CVRF_REMEDIATION_VENDOR_FIX,
396 CVRF_REMEDIATION_NONE_AVAILABLE,
397 CVRF_REMEDIATION_WILL_NOT_FIX,
398} cvrf_remediation_type_t;
406cvrf_remediation_type_t cvrf_remediation_get_type(
struct cvrf_remediation *remed);
413cvrf_remediation_type_t cvrf_remediation_type_parse(xmlTextReaderPtr reader);
420const char *cvrf_remediation_type_get_text(cvrf_remediation_type_t remediation_type);
431 CVRF_ITEM_UNKNOWN = 0,
432 CVRF_DOCUMENT_PUBLISHER,
433 CVRF_DOCUMENT_TRACKING,
436 CVRF_DOCUMENT_REFERENCE,
444 CVRF_VULNERABILITY_CWE,
459const char *cvrf_item_type_get_text(cvrf_item_type_t type);
466cvrf_item_type_t cvrf_item_type_from_text(
const char *item);
472bool cvrf_is_valid_item_type(
const char *item);
479const char *cvrf_item_type_get_container(cvrf_item_type_t type);
487bool cvrf_item_type_has_container(cvrf_item_type_t type);
506struct cvrf_score_set *cvrf_score_set_parse(xmlTextReaderPtr reader);
513struct cvrf_threat *cvrf_threat_parse(xmlTextReaderPtr reader);
555struct cvrf_group *cvrf_group_parse(xmlTextReaderPtr reader);
569struct cvrf_branch *cvrf_branch_parse(xmlTextReaderPtr reader);
590struct cvrf_reference *cvrf_reference_parse(xmlTextReaderPtr reader);
597struct cvrf_note *cvrf_note_parse(xmlTextReaderPtr reader);
604struct cvrf_revision *cvrf_revision_parse(xmlTextReaderPtr reader);
626struct cvrf_document *cvrf_document_parse(xmlTextReaderPtr reader);
633struct cvrf_model *cvrf_model_parse(xmlTextReaderPtr reader);
650void cvrf_element_add_container(
struct oscap_list *list, cvrf_item_type_t cvrf_type, xmlNode *parent);
659void cvrf_element_add_stringlist(
struct oscap_stringlist *list,
const char *tag_name, xmlNode *parent);
668void cvrf_element_add_attribute(
const char *attr_name,
const char *attr_value, xmlNode *element);
677void cvrf_element_add_child(
const char *elm_name,
const char *elm_value, xmlNode *parent);
685xmlNode *cvrf_element_to_dom(
const char *elm_name,
const char *elm_value);
701xmlNode *cvrf_threat_to_dom(
const struct cvrf_threat *threat);
709xmlNode *cvrf_score_set_to_dom(
const struct cvrf_score_set *score_set);
757xmlNode *cvrf_group_to_dom(
const struct cvrf_group *group);
773xmlNode *cvrf_branch_to_dom(
struct cvrf_branch *branch);
806xmlNode *cvrf_note_to_dom(
struct cvrf_note *note);
814xmlNode *cvrf_revision_to_dom(
struct cvrf_revision *revision);
839xmlNode *cvrf_document_to_dom(
struct cvrf_document *document);
849xmlNode *cvrf_model_to_dom(
struct cvrf_model *model, xmlDocPtr doc, xmlNode *parent,
void *user_args);
858xmlNode *cvrf_index_to_dom(
struct cvrf_index *index, xmlDocPtr doc, xmlNode *parent,
void *user_args);
860bool cvrf_product_vulnerability_fixed(
struct cvrf_vulnerability *vuln,
const char *product);
Interface to Common Vulnerability Reporting Framework.
Definition: cvrf_priv.c:841
Definition: cvrf_priv.c:685
Definition: cvrf_priv.c:1068
Definition: cvrf_priv.c:990
Definition: cvrf_priv.c:1162
Definition: cvrf_priv.c:592
Definition: cvrf_priv.c:1312
Definition: cvrf_priv.c:316
Definition: cvrf_enumeration.c:241
Definition: cvrf_priv.c:1238
Definition: cvrf_priv.c:896
Definition: cvrf_priv.c:556
Definition: cvrf_priv.c:275
Definition: cvrf_priv.c:753
Definition: cvrf_priv.c:1118
Definition: cvrf_priv.c:636
Definition: cvrf_priv.c:949
Definition: cvrf_priv.c:133
Definition: cvrf_priv.c:216
Definition: cvrf_priv.c:362
Definition: cvrf_priv.c:399
Definition: oscap_source.c:66