#include "config.h"
#include <libxml/xmlreader.h>
#include <libxml/xmlstring.h>
#include "cve.h"
Classes | |
struct | tagStack_t |
Defines | |
#define | TAG_ENTRY_STR BAD_CAST "entry" |
#define | TAG_PUBLISHED_STR BAD_CAST "published-datetime" |
#define | TAG_MODIFIED_STR BAD_CAST "last-modified-datetime" |
#define | TAG_CWE_STR BAD_CAST "cwe" |
#define | TAG_SUMMARY_STR BAD_CAST "summary" |
#define | ATTR_CWEID_STR BAD_CAST "id" |
#define | ATTR_ID_STR BAD_CAST "id" |
#define | TAG_SCORE_STR BAD_CAST "score" |
#define | TAG_VECTOR_STR BAD_CAST "access-vector" |
#define | TAG_COMPLEXITY_STR BAD_CAST "access-complexity" |
#define | TAG_AUTHENTICATION_STR BAD_CAST "authentication" |
#define | TAG_CONFIDENTIALITY_STR BAD_CAST "confidentiality-impact" |
#define | TAG_INTEGRITY_STR BAD_CAST "integrity-impact" |
#define | TAG_AVAILABILITY_STR BAD_CAST "availability-impact" |
#define | TAG_CVSSSOURCE_STR BAD_CAST "source" |
#define | TAG_GENERATED_STR BAD_CAST "generated-on-datetime" |
#define | TAG_REFS_STR BAD_CAST "references" |
#define | ATTR_REFTYPE_STR BAD_CAST "reference_type" |
#define | ATTR_HREF_STR BAD_CAST "href" |
#define | TAG_SOURCE_STR BAD_CAST "source" |
#define | TAG_REF_STR BAD_CAST "reference" |
#define | URI_VULN_STR BAD_CAST "http://scap.nist.gov/schema/vulnerability/0.4" |
#define | URI_CVSS_STR BAD_CAST "http://scap.nist.gov/schema/cvss-v2/0.2" |
Enumerations | |
enum | { TAG_UNKNOWN = 0, TAG_ENTRY, TAG_CVEID, TAG_PUBLISHED, TAG_MODIFIED, TAG_CWE, TAG_REFS, TAG_SOURCE, TAG_REF, TAG_SUMMARY, TAG_SCORE, TAG_VECTOR, TAG_COMPLEXITY, TAG_AUTHENTICATION, TAG_CONFIDENTIALITY, TAG_INTEGRITY, TAG_AVAILABILITY, TAG_CVSSSOURCE, TAG_GENERATED } |
Functions | |
cve_reference_t * | cveReferenceNew () |
void | cveReferenceDel (cve_reference_t *reference) |
void | cveReferenceDelAll (cve_reference_t *ref) |
cve_info_t * | cveNew () |
void | cveDel (cve_info_t *cve) |
void | cveDelAll (cve_info_t *cve) |
int | cveParse (char *xmlfile, cve_info_t **outCveList) |
See details at: http://cve.mitre.org/ http://nvd.nist.gov/download.cfm
void cveDel | ( | cve_info_t * | cve | ) |
Free the CVE structure and its data.
cve | CVE to be freed |
void cveDelAll | ( | cve_info_t * | cve | ) |
Free the whole CVE list.
cve | root of the CVE list to be freed |
cve_info_t* cveNew | ( | ) |
Create new CVE structure.
NULL | on failure |
int cveParse | ( | char * | xmlfile, | |
cve_info_t ** | outCveList | |||
) |
Parses the specified XML file and creates a list of CVE data structures. The returned list can be freed with cveDelAll().
xmlfile | path to the file to be parsed | |
outCveList | address of the pointer to which the root element of the list is to be stored |
void cveReferenceDel | ( | cve_reference_t * | reference | ) |
Free the CVE Reference structure and its data.
reference | CVE Reference to be freed |
void cveReferenceDelAll | ( | cve_reference_t * | ref | ) |
Free the whole CVE Reference list.
ref | root of the CVE Reference list to be freed |
cve_reference_t* cveReferenceNew | ( | ) |
Create new CVE Reference structure.
NULL | on failure |