/home/brq/plautrba/devel/src/openscap.git/openscap-0.8.2/src/CVE/cve_priv.c File Reference

Common Vulnerability and Exposure dictionary. More...

#include <string.h>
#include <libxml/xmlreader.h>
#include <libxml/xmlwriter.h>
#include "public/cve.h"
#include "cve_priv.h"
#include "common/list.h"
#include "common/_error.h"
#include "CPE/cpelang_priv.h"
#include "CVSS/cvss_priv.h"
#include "CVSS/public/cvss.h"

Data Structures

struct  cve_model
 cve_list cve_list is the top level element of the CVE List provided by MITRE. More...
struct  cve_reference
 Structure holding CVE reference data. More...
struct  cve_summary
 Structure holding CVE summary data. More...
struct  cve_product
 Structure holding CVE product data. More...
struct  cwe_entry
 Structure holding CWE data. More...
struct  cve_configuration
 Structure CVE vulnerable configuration data. More...
struct  cve_entry
 Structure holding CVE entry data. More...

Defines

#define TAG_NVD_STR   BAD_CAST "nvd"
#define ATTR_XML_LANG_STR   BAD_CAST "xml:lang"
#define TAG_CVE_STR   BAD_CAST "entry"
#define TAG_PUBLISHED_DATETIME_STR   BAD_CAST "published-datetime"
#define TAG_LAST_MODIFIED_DATETIME_STR   BAD_CAST "last-modified-datetime"
#define TAG_CWE_STR   BAD_CAST "cwe"
#define TAG_SUMMARY_STR   BAD_CAST "summary"
#define TAG_VULNERABLE_CONFIGURATION_STR   BAD_CAST "vulnerable-configuration"
#define TAG_VULNERABLE_SOFTWARE_LIST_STR   BAD_CAST "vulnerable-software-list"
#define TAG_SECURITY_PROTECTION_STR   BAD_CAST "security-protection"
#define TAG_PRODUCT_STR   BAD_CAST "product"
#define ATTR_CVE_ID_STR   BAD_CAST "id"
#define ATTR_VULNERABLE_CONFIGURATION_ID_STR   BAD_CAST "id"
#define TAG_CVE_ID_STR   BAD_CAST "cve-id"
#define TAG_SOURCE_STR   BAD_CAST "source"
#define TAG_CVSS_STR   BAD_CAST "cvss"
#define TAG_CWE_STR   BAD_CAST "cwe"
#define ATTR_CWEID_STR   BAD_CAST "id"
#define TAG_REFERENCES_STR   BAD_CAST "references"
#define TAG_REFERENCE_STR   BAD_CAST "reference"
#define TAG_REFERENCE_SOURCE_STR   BAD_CAST "source"
#define ATTR_REFERENCE_TYPE_STR   BAD_CAST "reference_type"
#define ATTR_REFERENCE_HREF_STR   BAD_CAST "href"
#define NS_VULN_STR   BAD_CAST "vuln"
#define CVE_NS   BAD_CAST "http://scap.nist.gov/schema/vulnerability/0.4"
#define FEED_NS   BAD_CAST "http://scap.nist.gov/schema/feed/vulnerability/2.0"

Functions

struct cvss_impactcve_entry_get_cvss (const struct cve_entry *item)
struct cpe_testexprcve_configuration_get_expr (const struct cve_configuration *item)
struct cve_entrycve_entry_new ()
struct cve_entrycve_entry_clone (struct cve_entry *old_entry)
struct cve_configurationcve_configuration_new ()
struct cve_configurationcve_configuration_clone (struct cve_configuration *old_conf)
struct cwe_entrycwe_entry_new ()
struct cwe_entrycwe_entry_clone (struct cwe_entry *old_entry)
struct cve_productcve_product_new ()
struct cve_productcve_product_clone (struct cve_product *old_product)
struct cve_summarycve_summary_new ()
struct cve_summarycve_summary_clone (struct cve_summary *old_sum)
struct cve_referencecve_reference_new ()
struct cve_referencecve_reference_clone (struct cve_reference *old_ref)
struct cve_modelcve_model_new ()
struct cve_modelcve_model_clone (struct cve_model *old_model)
struct cve_modelcve_model_parse_xml (const char *file)
 Parse CVE model from XML (private function).
struct cve_modelcve_model_parse (xmlTextReaderPtr reader)
 Parse CVE model.
struct cve_entrycve_entry_parse (xmlTextReaderPtr reader)
 Parse CVE entry.
void cve_model_export_xml (struct cve_model *cve, const char *file)
 Export CVE model to XML file.
void cve_export (const struct cve_model *cve, xmlTextWriterPtr writer)
 Export CVE model to XML file.
void cve_reference_export (const struct cve_reference *refer, xmlTextWriterPtr writer)
 Export CVE reference to XML file.
void cve_summary_export (const struct cve_summary *sum, xmlTextWriterPtr writer)
 Export CVE summary to XML file.
void cve_entry_export (const struct cve_entry *entry, xmlTextWriterPtr writer)
 Export CVE entry to XML file.
void cve_summary_free (struct cve_summary *summary)
void cve_model_free (struct cve_model *cve_model)
void cve_configuration_free (struct cve_configuration *conf)
void cve_product_free (struct cve_product *product)
void cve_reference_free (struct cve_reference *ref)
void cwe_entry_free (struct cwe_entry *entry)
void cve_entry_free (struct cve_entry *entry)

Detailed Description

Common Vulnerability and Exposure dictionary.

See details at: http://cve.mitre.org/ http://nvd.nist.gov/download.cfm


Function Documentation

void cve_entry_export ( const struct cve_entry entry,
xmlTextWriterPtr  writer 
)

Export CVE entry to XML file.

Parameters:
entry CVE entry
writer XML Text Writer representing XML model
struct cve_entry* cve_entry_parse ( xmlTextReaderPtr  reader  )  [read]

Parse CVE entry.

Parameters:
reader XML Text Reader representing XML model
Returns:
parsed CVE entry
void cve_export ( const struct cve_model cve,
xmlTextWriterPtr  writer 
)

Export CVE model to XML file.

Parameters:
cve CVE model
writer XML Text Writer representing XML model
void cve_model_export_xml ( struct cve_model cve,
const char *  file 
)

Export CVE model to XML file.

Parameters:
cve CVE model
target OSCAP export target
struct cve_model* cve_model_parse ( xmlTextReaderPtr  reader  )  [read]

Parse CVE model.

Parameters:
reader XML Text Reader representing XML model
Returns:
parsed CVE mdoel
struct cve_model* cve_model_parse_xml ( const char *  file  )  [read]

Parse CVE model from XML (private function).

Parameters:
source OSCAP import source
Returns:
new CVE model
void cve_reference_export ( const struct cve_reference refer,
xmlTextWriterPtr  writer 
)

Export CVE reference to XML file.

Parameters:
refer CVE reference
writer XML Text Writer representing XML model
void cve_summary_export ( const struct cve_summary sum,
xmlTextWriterPtr  writer 
)

Export CVE summary to XML file.

Parameters:
sum CVE summary
writer XML Text Writer representing XML model

Generated on 30 Mar 2012 for Open SCAP Library by  doxygen 1.6.1