CVE

Data Structures

struct  cve_model
 cve_list cve_list is the top level element of the CVE List provided by MITRE. More...
struct  cve_entry
 Structure holding CVE entry data. More...
struct  cve_summary
 Structure holding CVE summary data. More...
struct  cve_product
 Structure holding CVE product data. More...
struct  cve_configuration
 Structure CVE vulnerable configuration data. More...
struct  cwe_entry
 Structure holding CWE data. More...
struct  cve_reference
 Structure holding CVE reference data. More...
struct  cve_entry_iterator
 Iterator over CVE entries. More...
struct  cve_summary_iterator
 Iterator over CVE summaries. More...
struct  cve_product_iterator
 Iterator over CVE products. More...
struct  cve_configuration_iterator
 Iterator over CVE vulnerable configurations. More...
struct  cve_reference_iterator
 Iterator over CVE references. More...

Modules

 Private members

Files

file  cve_priv.h
 

Common Vulnerability and Exposure dictionary.


file  cve.h
 

Interface to Common Vulnerability and Exposure dictionary.


Get functions

Functions for getting attributes from CVE model structures.

Return value is pointer to structure's member. Do not free unless you null the pointer in the structure. Use remove function otherwise.



struct xml_metadata_iteratorcve_model::cve_model_get_xmlns (const struct cve_model *cve_model)
 Get en iterator to XML metadatas from CVE model.
struct cve_entry_iteratorcve_entry::cve_model_get_entries (const struct cve_model *cve_model)
 Get en iterator to CVE entries.
const char * cve_entry::cve_entry_get_id (const struct cve_entry *item)
 Get CVE entry ID.
const char * cve_entry::cve_entry_get_cwe (const struct cve_entry *item)
 Get CVE entry CWE.
struct cve_summary_iteratorcve_entry::cve_entry_get_summaries (const struct cve_entry *item)
 Get CVE entry summary.
struct cve_reference_iteratorcve_entry::cve_entry_get_references (const struct cve_entry *item)
 Get an iterator to CVE entry's references.
const char * cve_reference::cve_reference_get_value (const struct cve_reference *ref)
 Get CVE reference values.
const char * cve_reference::cve_reference_get_href (const struct cve_reference *ref)
 Get CVE reference href.
const char * cve_reference::cve_reference_get_type (const struct cve_reference *ref)
 Get CVE reference type.
const char * cve_reference::cve_reference_get_source (const struct cve_reference *ref)
 Get CVE reference source.
const char * cve_summary::cve_summary_get_summary (const struct cve_summary *summary)
 Get value from CVE summary.
const char * cve_entry::cwe_entry_get_value (const struct cwe_entry *entry)
 Get CVE entry value.
const char * cve_configuration::cve_configuration_get_id (const struct cve_configuration *conf)
 Get CVE configuration id.
const char * cve_entry::cve_entry_get_published (const struct cve_entry *entry)
 Get CVE entry published date.
const char * cve_entry::cve_entry_get_modified (const struct cve_entry *entry)
 Get CVE entry modified.
const char * cve_entry::cve_entry_get_sec_protection (const struct cve_entry *entry)
 Get CVE entry protection.
struct cve_product_iteratorcve_entry::cve_entry_get_products (const struct cve_entry *entry)
 Get CVE entry products.
struct cve_configuration_iteratorcve_entry::cve_entry_get_configurations (const struct cve_entry *entry)
 Get CVE .
struct cpe_testexprcve_configuration::cve_configuration_get_expr (const struct cve_configuration *conf)
 Get CVE configuration test expression.
struct cvss_entrycve_entry::cve_entry_get_cvss (const struct cve_entry *item)
 Get CVSS structure from CVE.

Add functions

Functions to add member to list.

Return value is true if added succesfuly or false in case of error.



bool cve_model::cve_model_add_entry (struct cve_model *model, struct cve_entry *new_entry)
 Add entry to CVE model.
bool cve_entry::cve_entry_add_product (struct cve_entry *entry, struct cve_product *new_product)
bool cve_entry::cve_entry_add_reference (struct cve_entry *entry, struct cve_reference *new_reference)
bool cve_entry::cve_entry_add_summary (struct cve_entry *entry, struct cve_summary *new_summary)
bool cve_entry::cve_entry_add_configuration (struct cve_entry *entry, struct cve_configuration *new_configuration)
bool cve_model::cve_model_add_xml (struct cve_model *model, struct xml_metadata *xml)
 Add XML namespace to CVE model.

Remove functions

Set of functions used to remove entries from lists.



void cve_entry_iterator::cve_entry_iterator_remove (struct cve_entry_iterator *it)
void cve_product_iterator::cve_product_iterator_remove (struct cve_product_iterator *it)
void cve_reference_iterator::cve_reference_iterator_remove (struct cve_reference_iterator *it)
void cve_summary_iterator::cve_summary_iterator_remove (struct cve_summary_iterator *it)
void cve_configuration_iterator::cve_configuration_iterator_remove (struct cve_configuration_iterator *it)

Set functions

Set functions assign values to members of structures except lists.

For lists use add functions. Parameters of set functions are duplicated in memory and need to be freed by caller.



bool cve_entry::cve_entry_set_id (struct cve_entry *entry, const char *new_id)
 Set id of CVE entry.
bool cve_entry::cve_entry_set_published (struct cve_entry *entry, const char *new_published)
 Set publish date of CVE entry.
bool cve_entry::cve_entry_set_modified (struct cve_entry *entry, const char *new_modified)
 Set modified date of CVE entry.
bool cve_entry::cve_entry_set_sec_protection (struct cve_entry *entry, const char *new_protection)
 Set protection of CVE entry.
bool cve_entry::cve_entry_set_cwe (struct cve_entry *entry, const char *cwe)
 Set cwe of CVE entry.
bool cve_entry::cwe_entry_set_value (struct cwe_entry *entry, const char *new_value)
 Set value of CVE entry.
bool cve_reference::cve_reference_set_value (struct cve_reference *reference, const char *new_value)
 Set value of CVE reference.
bool cve_reference::cve_reference_set_href (struct cve_reference *reference, const char *new_href)
 Set href of CVE reference.
bool cve_reference::cve_reference_set_type (struct cve_reference *reference, const char *new_type)
 Set type of CVE reference.
bool cve_reference::cve_reference_set_source (struct cve_reference *reference, const char *new_source)
 Set source of CVE reference.
bool cve_configuration::cve_configuration_set_id (struct cve_configuration *conf, const char *new_id)
 Set id of CVE configuration.
bool cve_product::cve_product_set_value (struct cve_product *product, const char *new_value)
 Set value of CVE product.
bool cve_summary::cve_summary_set_summary (struct cve_summary *summary, const char *new_summary)
 Set summary of CVE summary.

New functions

Constructors of CVE model structures.

Free function returns new empty allocated structure. If returns non NULL it need to be freed by the caller.



struct cve_entrycve_entry::cve_entry_new (void)
 New CVE entry.
struct cve_configurationcve_configuration::cve_configuration_new (void)
 New CVE vulnerability configuration.
struct cwe_entrycwe_entry::cwe_entry_new (void)
 New CWE entry.
struct cve_productcve_product::cve_product_new (void)
 New CVE product.
struct cve_summarycve_summary::cve_summary_new (void)
 New CVE summary.
struct cve_referencecve_reference::cve_reference_new (void)
 New CVE reference.
struct cve_modelcve_model::cve_model_new (void)
 New CVE model.

Free functions

Destructors of CVE model structures.

Functions free structures with all members recursively. For simple deletion of entity use remove functions.



void cve_model::cve_model_free (struct cve_model *cve_model)
 Free CVE model.
void cve_entry::cve_entry_free (struct cve_entry *entry)
 Free CVE entry.
void cve_summary::cve_summary_free (struct cve_summary *summary)
 Free CVE summary.
void cve_product::cve_product_free (struct cve_product *product)
 Free CVE product.
void cve_reference::cve_reference_free (struct cve_reference *ref)
 Free CVE reference.
void cve_entry::cwe_entry_free (struct cwe_entry *entry)
 Free CVE entry.
void cve_configuration::cve_configuration_free (struct cve_configuration *conf)
 Free CVE configuration.

Iterator functions

Functions to iterate throught lists.



struct cve_entrycve_entry_iterator::cve_entry_iterator_next (struct cve_entry_iterator *it)
bool cve_entry_iterator::cve_entry_iterator_has_more (struct cve_entry_iterator *it)
void cve_entry_iterator::cve_entry_iterator_free (struct cve_entry_iterator *it)
struct cve_summarycve_summary_iterator::cve_summary_iterator_next (struct cve_summary_iterator *it)
bool cve_summary_iterator::cve_summary_iterator_has_more (struct cve_summary_iterator *it)
void cve_summary_iterator::cve_summary_iterator_free (struct cve_summary_iterator *it)
struct cve_productcve_product_iterator::cve_product_iterator_next (struct cve_product_iterator *it)
bool cve_product_iterator::cve_product_iterator_has_more (struct cve_product_iterator *it)
void cve_product_iterator::cve_product_iterator_free (struct cve_product_iterator *it)
struct cve_configurationcve_configuration_iterator::cve_configuration_iterator_next (struct cve_configuration_iterator *it)
bool cve_configuration_iterator::cve_configuration_iterator_has_more (struct cve_configuration_iterator *it)
void cve_configuration_iterator::cve_configuration_iterator_free (struct cve_configuration_iterator *it)
struct cve_referencecve_reference_iterator::cve_reference_iterator_next (struct cve_reference_iterator *it)
bool cve_reference_iterator::cve_reference_iterator_has_more (struct cve_reference_iterator *it)
void cve_reference_iterator::cve_reference_iterator_free (struct cve_reference_iterator *it)

Other functions



void cve_model::cve_model_export (struct cve_model *cve, const struct oscap_export_target *target)
 Export CVE model to XML file.
struct cve_modelcve_model::cve_model_import (const struct oscap_import_source *source)
 Parses the specified XML file and creates a list of CVE data structures.

Function Documentation

void cve_configuration_free ( struct cve_configuration conf  )  [related, inherited]

Free CVE configuration.

Parameters:
conf CVE vulnerability configuration
struct cpe_testexpr * cve_configuration_get_expr ( const struct cve_configuration conf  )  [related, inherited]

Get CVE configuration test expression.

Parameters:
conf CVE configuration
const char * cve_configuration_get_id ( const struct cve_configuration conf  )  [related, inherited]

Get CVE configuration id.

Parameters:
conf CVE vulnerable configuration
void cve_configuration_iterator_remove ( struct cve_configuration_iterator it  )  [related, inherited]
struct cve_configuration * cve_configuration_new ( void   )  [related, inherited]

New CVE vulnerability configuration.

Returns:
New CVE vulnerability configuration
bool cve_configuration_set_id ( struct cve_configuration conf,
const char *  new_id 
) [related, inherited]

Set id of CVE configuration.

Parameters:
conf CVE vulnerability configuration
new_id id of CVE configuration
Returns:
true if set, false otherwise
bool cve_entry_add_configuration ( struct cve_entry entry,
struct cve_configuration new_configuration 
) [related, inherited]
bool cve_entry_add_product ( struct cve_entry entry,
struct cve_product new_product 
) [related, inherited]
bool cve_entry_add_reference ( struct cve_entry entry,
struct cve_reference new_reference 
) [related, inherited]
bool cve_entry_add_summary ( struct cve_entry entry,
struct cve_summary new_summary 
) [related, inherited]
void cve_entry_free ( struct cve_entry entry  )  [related, inherited]

Free CVE entry.

Parameters:
entry CVE entry
struct cve_configuration_iterator * cve_entry_get_configurations ( const struct cve_entry entry  )  [related, inherited]

Get CVE .

Parameters:
entry CVE entry
struct cvss_entry * cve_entry_get_cvss ( const struct cve_entry item  )  [related, inherited]

Get CVSS structure from CVE.

Parameters:
item CVE entry
const char * cve_entry_get_cwe ( const struct cve_entry item  )  [related, inherited]

Get CVE entry CWE.

Parameters:
item CVE entry
const char * cve_entry_get_id ( const struct cve_entry item  )  [related, inherited]

Get CVE entry ID.

Parameters:
item CVE entry
const char * cve_entry_get_modified ( const struct cve_entry entry  )  [related, inherited]

Get CVE entry modified.

Parameters:
entry CVE entry
struct cve_product_iterator * cve_entry_get_products ( const struct cve_entry entry  )  [related, inherited]

Get CVE entry products.

Parameters:
entry CVE entry
const char * cve_entry_get_published ( const struct cve_entry entry  )  [related, inherited]

Get CVE entry published date.

Parameters:
entry CVE entry
struct cve_reference_iterator * cve_entry_get_references ( const struct cve_entry item  )  [related, inherited]

Get an iterator to CVE entry's references.

Parameters:
item CVE entry
const char * cve_entry_get_sec_protection ( const struct cve_entry entry  )  [related, inherited]

Get CVE entry protection.

Parameters:
entry CVE entry
struct cve_summary_iterator * cve_entry_get_summaries ( const struct cve_entry item  )  [related, inherited]

Get CVE entry summary.

Parameters:
item CVE entry
void cve_entry_iterator_remove ( struct cve_entry_iterator it  )  [related, inherited]
struct cve_entry * cve_entry_new ( void   )  [related, inherited]

New CVE entry.

Returns:
New CVE entry
bool cve_entry_set_cwe ( struct cve_entry entry,
const char *  cwe 
) [related, inherited]

Set cwe of CVE entry.

Parameters:
entry CVE entry
cwe CWE of CVE

return true if set, false otherwise

bool cve_entry_set_id ( struct cve_entry entry,
const char *  new_id 
) [related, inherited]

Set id of CVE entry.

Parameters:
entry CVE entry
new_id id of CVE entry

return true if set, false otherwise

bool cve_entry_set_modified ( struct cve_entry entry,
const char *  new_modified 
) [related, inherited]

Set modified date of CVE entry.

Parameters:
entry CVE entry
new_modified CVE modified date

return true if set, false otherwise

bool cve_entry_set_published ( struct cve_entry entry,
const char *  new_published 
) [related, inherited]

Set publish date of CVE entry.

Parameters:
entry CVE entry
new_published date of CVE attribute

return true if set, false otherwise

bool cve_entry_set_sec_protection ( struct cve_entry entry,
const char *  new_protection 
) [related, inherited]

Set protection of CVE entry.

Parameters:
entry CVE entry
new_protection CVE protection

return true if set, false otherwise

bool cve_model_add_entry ( struct cve_model model,
struct cve_entry new_entry 
) [related, inherited]

Add entry to CVE model.

Parameters:
model CVE model
new_entry New CVE entry
Returns:
true if added, false otherwise
void cve_model_export ( struct cve_model cve,
const struct oscap_export_target *  target 
) [related, inherited]

Export CVE model to XML file.

Parameters:
cve CVE model
target OSCAP export target
void cve_model_free ( struct cve_model cve_model  )  [related, inherited]

Free CVE model.

Parameters:
cve_model CVE model
struct cve_entry_iterator * cve_model_get_entries ( const struct cve_model cve_model  )  [related, inherited]

Get en iterator to CVE entries.

Parameters:
cve_model CVE model
struct xml_metadata_iterator * cve_model_get_xmlns ( const struct cve_model cve_model  )  [related, inherited]

Get en iterator to XML metadatas from CVE model.

Parameters:
cve_model CVE model
struct cve_model * cve_model_import ( const struct oscap_import_source source  )  [related, inherited]

Parses the specified XML file and creates a list of CVE data structures.

The returned list can be freed with cveDelAll().

Parameters:
source oscap_import_source defining importing file
Returns:
non-negative value indicates the number of CVEs in the list, negative value indicates an error
struct cve_model * cve_model_new ( void   )  [related, inherited]

New CVE model.

Returns:
New CVE model
void cve_product_free ( struct cve_product product  )  [related, inherited]

Free CVE product.

Parameters:
product CVE product
void cve_product_iterator_remove ( struct cve_product_iterator it  )  [related, inherited]
struct cve_product * cve_product_new ( void   )  [related, inherited]

New CVE product.

Returns:
New CVE product
bool cve_product_set_value ( struct cve_product product,
const char *  new_value 
) [related, inherited]

Set value of CVE product.

Parameters:
product CVE product
new_value value of CVE product
Returns:
true if set, false otherwise
void cve_reference_free ( struct cve_reference ref  )  [related, inherited]

Free CVE reference.

Parameters:
ref CVE reference
const char * cve_reference_get_href ( const struct cve_reference ref  )  [related, inherited]

Get CVE reference href.

Parameters:
ref CVE reference
const char * cve_reference_get_source ( const struct cve_reference ref  )  [related, inherited]

Get CVE reference source.

Parameters:
ref CVE reference
const char * cve_reference_get_type ( const struct cve_reference ref  )  [related, inherited]

Get CVE reference type.

Parameters:
ref CVE reference
const char * cve_reference_get_value ( const struct cve_reference ref  )  [related, inherited]

Get CVE reference values.

Parameters:
ref CVE reference
void cve_reference_iterator_remove ( struct cve_reference_iterator it  )  [related, inherited]
struct cve_reference * cve_reference_new ( void   )  [related, inherited]

New CVE reference.

Returns:
New CVE reference
bool cve_reference_set_href ( struct cve_reference reference,
const char *  new_href 
) [related, inherited]

Set href of CVE reference.

Parameters:
reference CVE reference
new_href CVE reference href href return true if set, false otherwise
bool cve_reference_set_source ( struct cve_reference reference,
const char *  new_source 
) [related, inherited]

Set source of CVE reference.

Parameters:
reference CVE reference
new_source CVE reference source

return true if set, false otherwise

bool cve_reference_set_type ( struct cve_reference reference,
const char *  new_type 
) [related, inherited]

Set type of CVE reference.

Parameters:
reference CVE reference
new_type CVE reference type type return true if set, false otherwise
bool cve_reference_set_value ( struct cve_reference reference,
const char *  new_value 
) [related, inherited]

Set value of CVE reference.

Parameters:
reference CVE reference
new_value CVE reference value

return true if set, false otherwise

void cve_summary_free ( struct cve_summary summary  )  [related, inherited]

Free CVE summary.

Parameters:
summary CVE summary
const char * cve_summary_get_summary ( const struct cve_summary summary  )  [related, inherited]

Get value from CVE summary.

Parameters:
summary CVE summary
void cve_summary_iterator_remove ( struct cve_summary_iterator it  )  [related, inherited]
struct cve_summary * cve_summary_new ( void   )  [related, inherited]

New CVE summary.

Returns:
New CVE summary
bool cve_summary_set_summary ( struct cve_summary summary,
const char *  new_summary 
) [related, inherited]

Set summary of CVE summary.

Parameters:
summary CVE summary
new_summary summary of CVE summary
Returns:
true if set, false otherwise
void cwe_entry_free ( struct cwe_entry entry  )  [related, inherited]

Free CVE entry.

Parameters:
entry CVE entry
const char * cwe_entry_get_value ( const struct cwe_entry entry  )  [related, inherited]

Get CVE entry value.

Parameters:
entry CVE entry
struct cwe_entry * cwe_entry_new ( void   )  [related, inherited]

New CWE entry.

Returns:
New CWE entry
bool cwe_entry_set_value ( struct cwe_entry entry,
const char *  new_value 
) [related, inherited]

Set value of CVE entry.

Parameters:
entry CVE entry
new_value CVE value

return true if set, false otherwise


Generated on 4 Jan 2010 for Open SCAP Library by  doxygen 1.6.1