Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Files | Data Structures | Functions
CVE

Common Vulnerabilities and Exposures. More...

Files

file  cve_nvd.h
 Interface to Common Vulnerability and Exposure dictionary.
 

Data Structures

struct  cve_model
 Structure holding CVE model. 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...
 

Functions

OSCAP_API struct cve_entrycve_entry::cve_entry_new (void)
 New CVE entry. More...
 
OSCAP_API struct
cve_configuration
cve_configuration::cve_configuration_new (void)
 New CVE vulnerability configuration. More...
 
OSCAP_API struct cwe_entrycwe_entry::cwe_entry_new (void)
 New CWE entry. More...
 
OSCAP_API struct cve_productcve_product::cve_product_new (void)
 New CVE product. More...
 
OSCAP_API struct cve_summarycve_summary::cve_summary_new (void)
 New CVE summary. More...
 
OSCAP_API struct cve_referencecve_reference::cve_reference_new (void)
 New CVE reference. More...
 
OSCAP_API struct cve_modelcve_model::cve_model_new (void)
 New CVE model. More...
 
OSCAP_API struct cve_entrycve_entry::cve_entry_clone (struct cve_entry *old_entry)
 Clone CVE entry. More...
 
OSCAP_API struct
cve_configuration
cve_configuration::cve_configuration_clone (struct cve_configuration *old_conf)
 Clone CVE configuration. More...
 
OSCAP_API struct cwe_entrycwe_entry::cwe_entry_clone (struct cwe_entry *old_entry)
 Clone CWE entry. More...
 
OSCAP_API struct cve_productcve_product::cve_product_clone (struct cve_product *old_product)
 Clone CVE product. More...
 
OSCAP_API struct cve_summarycve_summary::cve_summary_clone (struct cve_summary *old_sum)
 Clone CVE summary. More...
 
OSCAP_API struct cve_referencecve_reference::cve_reference_clone (struct cve_reference *old_ref)
 Clone CVE reference. More...
 
OSCAP_API struct cve_modelcve_model::cve_model_clone (struct cve_model *old_model)
 Clone CVE model. More...
 
OSCAP_API void cve_model::cve_model_free (struct cve_model *cve_model)
 Free CVE model. More...
 
OSCAP_API void cve_entry::cve_entry_free (struct cve_entry *entry)
 Free CVE entry. More...
 
OSCAP_API void cve_summary::cve_summary_free (struct cve_summary *summary)
 Free CVE summary. More...
 
OSCAP_API void cve_product::cve_product_free (struct cve_product *product)
 Free CVE product. More...
 
OSCAP_API void cve_reference::cve_reference_free (struct cve_reference *ref)
 Free CVE reference. More...
 
OSCAP_API void cve_entry::cwe_entry_free (struct cwe_entry *entry)
 Free CVE entry. More...
 
OSCAP_API void cve_configuration::cve_configuration_free (struct cve_configuration *conf)
 Free CVE configuration. More...
 

Getters

Return value is pointer to structure's member.

Do not free unless you null the pointer in the structure. Use remove function otherwise.

OSCAP_API struct
cve_entry_iterator
cve_entry::cve_model_get_entries (const struct cve_model *cve_model)
 Get en iterator to CVE entries. More...
 
OSCAP_API const char * cve_entry::cve_entry_get_id (const struct cve_entry *item)
 Get CVE entry ID. More...
 
OSCAP_API const char * cve_entry::cve_entry_get_cwe (const struct cve_entry *item)
 Get CVE entry CWE. More...
 
OSCAP_API struct
cve_summary_iterator
cve_entry::cve_entry_get_summaries (const struct cve_entry *item)
 Get CVE entry summary. More...
 
OSCAP_API struct
cve_reference_iterator
cve_entry::cve_entry_get_references (const struct cve_entry *item)
 Get an iterator to CVE entry's references. More...
 
OSCAP_API const char * cve_reference::cve_reference_get_value (const struct cve_reference *ref)
 Get CVE reference values. More...
 
OSCAP_API const char * cve_reference::cve_reference_get_href (const struct cve_reference *ref)
 Get CVE reference href. More...
 
OSCAP_API const char * cve_reference::cve_reference_get_type (const struct cve_reference *ref)
 Get CVE reference type. More...
 
OSCAP_API const char * cve_reference::cve_reference_get_source (const struct cve_reference *ref)
 Get CVE reference source. More...
 
OSCAP_API const char * cve_reference::cve_reference_get_lang (const struct cve_reference *ref)
 
OSCAP_API const char * cve_summary::cve_summary_get_summary (const struct cve_summary *summary)
 Get value from CVE summary. More...
 
OSCAP_API const char * cve_entry::cwe_entry_get_value (const struct cwe_entry *entry)
 Get CVE entry value. More...
 
OSCAP_API const char * cve_configuration::cve_configuration_get_id (const struct cve_configuration *conf)
 Get CVE configuration id. More...
 
OSCAP_API const char * cve_entry::cve_entry_get_published (const struct cve_entry *entry)
 Get CVE entry published date. More...
 
OSCAP_API const char * cve_entry::cve_entry_get_modified (const struct cve_entry *entry)
 Get CVE entry modified. More...
 
OSCAP_API const char * cve_entry::cve_entry_get_sec_protection (const struct cve_entry *entry)
 Get CVE entry protection. More...
 
OSCAP_API struct
cve_product_iterator
cve_entry::cve_entry_get_products (const struct cve_entry *entry)
 Get CVE entry products. More...
 
OSCAP_API struct
cve_configuration_iterator
cve_entry::cve_entry_get_configurations (const struct cve_entry *entry)
 Get CVE . More...
 
OSCAP_API struct cpe_testexprcve_configuration::cve_configuration_get_expr (const struct cve_configuration *conf)
 Get CVE configuration test expression. More...
 
OSCAP_API struct cvss_impactcve_entry::cve_entry_get_cvss (const struct cve_entry *item)
 Get CVSS structure from CVE. More...
 

Setters

For lists use add functions.

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

OSCAP_API bool cve_model::cve_model_add_entry (struct cve_model *model, struct cve_entry *new_entry)
 Add entry to CVE model. More...
 
OSCAP_API bool cve_entry::cve_entry_add_product (struct cve_entry *entry, struct cve_product *new_product)
 
OSCAP_API bool cve_entry::cve_entry_add_reference (struct cve_entry *entry, struct cve_reference *new_reference)
 
OSCAP_API bool cve_entry::cve_entry_add_summary (struct cve_entry *entry, struct cve_summary *new_summary)
 
OSCAP_API bool cve_entry::cve_entry_add_configuration (struct cve_entry *entry, struct cve_configuration *new_configuration)
 
OSCAP_API bool cve_entry::cve_entry_set_id (struct cve_entry *entry, const char *new_id)
 Set id of CVE entry. More...
 
OSCAP_API bool cve_entry::cve_entry_set_published (struct cve_entry *entry, const char *new_published)
 Set publish date of CVE entry. More...
 
OSCAP_API bool cve_entry::cve_entry_set_modified (struct cve_entry *entry, const char *new_modified)
 Set modified date of CVE entry. More...
 
OSCAP_API bool cve_entry::cve_entry_set_sec_protection (struct cve_entry *entry, const char *new_protection)
 Set protection of CVE entry. More...
 
OSCAP_API bool cve_entry::cve_entry_set_cwe (struct cve_entry *entry, const char *cwe)
 Set cwe of CVE entry. More...
 
OSCAP_API bool cve_entry::cwe_entry_set_value (struct cwe_entry *entry, const char *new_value)
 Set value of CVE entry. More...
 
OSCAP_API bool cve_reference::cve_reference_set_value (struct cve_reference *reference, const char *new_value)
 Set value of CVE reference. More...
 
OSCAP_API bool cve_reference::cve_reference_set_href (struct cve_reference *reference, const char *new_href)
 Set href of CVE reference. More...
 
OSCAP_API bool cve_reference::cve_reference_set_type (struct cve_reference *reference, const char *new_type)
 Set type of CVE reference. More...
 
OSCAP_API bool cve_reference::cve_reference_set_source (struct cve_reference *reference, const char *new_source)
 Set source of CVE reference. More...
 
OSCAP_API bool cve_reference::cve_reference_set_lang (struct cve_reference *reference, const char *new_lang)
 
OSCAP_API bool cve_configuration::cve_configuration_set_id (struct cve_configuration *conf, const char *new_id)
 Set id of CVE configuration. More...
 
OSCAP_API bool cve_product::cve_product_set_value (struct cve_product *product, const char *new_value)
 Set value of CVE product. More...
 
OSCAP_API bool cve_summary::cve_summary_set_summary (struct cve_summary *summary, const char *new_summary)
 Set summary of CVE summary. More...
 

Iterators

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

Evaluators

OSCAP_API const char * cve_model::cve_model_supported (void)
 Get supported version of CVE XML. More...
 

Detailed Description

Common Vulnerabilities and Exposures.

cve.png
Class diagram

Function Documentation

OSCAP_API struct cve_configuration * cve_configuration_clone ( struct cve_configuration old_conf)

Clone CVE configuration.

Parameters
old_confCVE configuration
OSCAP_API void cve_configuration_free ( struct cve_configuration conf)

Free CVE configuration.

Parameters
confCVE vulnerability configuration
OSCAP_API struct cpe_testexpr * cve_configuration_get_expr ( const struct cve_configuration conf)

Get CVE configuration test expression.

Parameters
confCVE configuration
OSCAP_API const char * cve_configuration_get_id ( const struct cve_configuration conf)

Get CVE configuration id.

Parameters
confCVE vulnerable configuration
OSCAP_API struct cve_configuration * cve_configuration_new ( void  )

New CVE vulnerability configuration.

Returns
New CVE vulnerability configuration
OSCAP_API bool cve_configuration_set_id ( struct cve_configuration conf,
const char *  new_id 
)

Set id of CVE configuration.

Parameters
confCVE vulnerability configuration
new_idid of CVE configuration
Returns
true if set, false otherwise
OSCAP_API bool cve_entry_add_configuration ( struct cve_entry entry,
struct cve_configuration new_configuration 
)
OSCAP_API bool cve_entry_add_product ( struct cve_entry entry,
struct cve_product new_product 
)
OSCAP_API bool cve_entry_add_reference ( struct cve_entry entry,
struct cve_reference new_reference 
)
OSCAP_API bool cve_entry_add_summary ( struct cve_entry entry,
struct cve_summary new_summary 
)
OSCAP_API struct cve_entry * cve_entry_clone ( struct cve_entry old_entry)

Clone CVE entry.

Parameters
old_entryCVE entry
OSCAP_API void cve_entry_free ( struct cve_entry entry)

Free CVE entry.

Parameters
entryCVE entry
OSCAP_API struct cve_configuration_iterator * cve_entry_get_configurations ( const struct cve_entry entry)

Get CVE .

Parameters
entryCVE entry
OSCAP_API struct cvss_impact * cve_entry_get_cvss ( const struct cve_entry item)

Get CVSS structure from CVE.

Parameters
itemCVE entry
OSCAP_API const char * cve_entry_get_cwe ( const struct cve_entry item)

Get CVE entry CWE.

Parameters
itemCVE entry
OSCAP_API const char * cve_entry_get_id ( const struct cve_entry item)

Get CVE entry ID.

Parameters
itemCVE entry
OSCAP_API const char * cve_entry_get_modified ( const struct cve_entry entry)

Get CVE entry modified.

Parameters
entryCVE entry
OSCAP_API struct cve_product_iterator * cve_entry_get_products ( const struct cve_entry entry)

Get CVE entry products.

Parameters
entryCVE entry
OSCAP_API const char * cve_entry_get_published ( const struct cve_entry entry)

Get CVE entry published date.

Parameters
entryCVE entry
OSCAP_API struct cve_reference_iterator * cve_entry_get_references ( const struct cve_entry item)

Get an iterator to CVE entry's references.

Parameters
itemCVE entry
OSCAP_API const char * cve_entry_get_sec_protection ( const struct cve_entry entry)

Get CVE entry protection.

Parameters
entryCVE entry
OSCAP_API struct cve_summary_iterator * cve_entry_get_summaries ( const struct cve_entry item)

Get CVE entry summary.

Parameters
itemCVE entry
OSCAP_API struct cve_entry * cve_entry_new ( void  )

New CVE entry.

Returns
New CVE entry
OSCAP_API bool cve_entry_set_cwe ( struct cve_entry entry,
const char *  cwe 
)

Set cwe of CVE entry.

Parameters
entryCVE entry
cweCWE of CVE

return true if set, false otherwise

OSCAP_API bool cve_entry_set_id ( struct cve_entry entry,
const char *  new_id 
)

Set id of CVE entry.

Parameters
entryCVE entry
new_idid of CVE entry

return true if set, false otherwise

OSCAP_API bool cve_entry_set_modified ( struct cve_entry entry,
const char *  new_modified 
)

Set modified date of CVE entry.

Parameters
entryCVE entry
new_modifiedCVE modified date

return true if set, false otherwise

OSCAP_API bool cve_entry_set_published ( struct cve_entry entry,
const char *  new_published 
)

Set publish date of CVE entry.

Parameters
entryCVE entry
new_publisheddate of CVE attribute

return true if set, false otherwise

OSCAP_API bool cve_entry_set_sec_protection ( struct cve_entry entry,
const char *  new_protection 
)

Set protection of CVE entry.

Parameters
entryCVE entry
new_protectionCVE protection

return true if set, false otherwise

OSCAP_API bool cve_model_add_entry ( struct cve_model model,
struct cve_entry new_entry 
)

Add entry to CVE model.

Parameters
modelCVE model
new_entryNew CVE entry
Returns
true if added, false otherwise
OSCAP_API struct cve_model * cve_model_clone ( struct cve_model old_model)

Clone CVE model.

Parameters
old_modelCVE model
OSCAP_API void cve_model_free ( struct cve_model cve_model)

Free CVE model.

Parameters
cve_modelCVE model
OSCAP_API struct cve_entry_iterator * cve_model_get_entries ( const struct cve_model cve_model)

Get en iterator to CVE entries.

Parameters
cve_modelCVE model
OSCAP_API struct cve_model * cve_model_new ( void  )

New CVE model.

Returns
New CVE model
OSCAP_API const char * cve_model_supported ( void  )

Get supported version of CVE XML.

Returns
version of XML file format
OSCAP_API struct cve_product * cve_product_clone ( struct cve_product old_product)

Clone CVE product.

Parameters
old_productCVE product
OSCAP_API void cve_product_free ( struct cve_product product)

Free CVE product.

Parameters
productCVE product
OSCAP_API struct cve_product * cve_product_new ( void  )

New CVE product.

Returns
New CVE product
OSCAP_API bool cve_product_set_value ( struct cve_product product,
const char *  new_value 
)

Set value of CVE product.

Parameters
productCVE product
new_valuevalue of CVE product
Returns
true if set, false otherwise
OSCAP_API struct cve_reference * cve_reference_clone ( struct cve_reference old_ref)

Clone CVE reference.

Parameters
old_refCVE reference
OSCAP_API void cve_reference_free ( struct cve_reference ref)

Free CVE reference.

Parameters
refCVE reference
OSCAP_API const char * cve_reference_get_href ( const struct cve_reference ref)

Get CVE reference href.

Parameters
refCVE reference
OSCAP_API const char * cve_reference_get_lang ( const struct cve_reference ref)
OSCAP_API const char * cve_reference_get_source ( const struct cve_reference ref)

Get CVE reference source.

Parameters
refCVE reference
OSCAP_API const char * cve_reference_get_type ( const struct cve_reference ref)

Get CVE reference type.

Parameters
refCVE reference
OSCAP_API const char * cve_reference_get_value ( const struct cve_reference ref)

Get CVE reference values.

Parameters
refCVE reference
OSCAP_API struct cve_reference * cve_reference_new ( void  )

New CVE reference.

Returns
New CVE reference
OSCAP_API bool cve_reference_set_href ( struct cve_reference reference,
const char *  new_href 
)

Set href of CVE reference.

Parameters
referenceCVE reference
new_hrefCVE reference href href return true if set, false otherwise
OSCAP_API bool cve_reference_set_lang ( struct cve_reference reference,
const char *  new_lang 
)
OSCAP_API bool cve_reference_set_source ( struct cve_reference reference,
const char *  new_source 
)

Set source of CVE reference.

Parameters
referenceCVE reference
new_sourceCVE reference source

return true if set, false otherwise

OSCAP_API bool cve_reference_set_type ( struct cve_reference reference,
const char *  new_type 
)

Set type of CVE reference.

Parameters
referenceCVE reference
new_typeCVE reference type type return true if set, false otherwise
OSCAP_API bool cve_reference_set_value ( struct cve_reference reference,
const char *  new_value 
)

Set value of CVE reference.

Parameters
referenceCVE reference
new_valueCVE reference value

return true if set, false otherwise

OSCAP_API struct cve_summary * cve_summary_clone ( struct cve_summary old_sum)

Clone CVE summary.

Parameters
old_sumCVE summary
OSCAP_API void cve_summary_free ( struct cve_summary summary)

Free CVE summary.

Parameters
summaryCVE summary
OSCAP_API const char * cve_summary_get_summary ( const struct cve_summary summary)

Get value from CVE summary.

Parameters
summaryCVE summary
OSCAP_API struct cve_summary * cve_summary_new ( void  )

New CVE summary.

Returns
New CVE summary
OSCAP_API bool cve_summary_set_summary ( struct cve_summary summary,
const char *  new_summary 
)

Set summary of CVE summary.

Parameters
summaryCVE summary
new_summarysummary of CVE summary
Returns
true if set, false otherwise
OSCAP_API struct cwe_entry * cwe_entry_clone ( struct cwe_entry old_entry)

Clone CWE entry.

Parameters
old_entryCWE entry
OSCAP_API void cwe_entry_free ( struct cwe_entry entry)

Free CVE entry.

Parameters
entryCVE entry
OSCAP_API const char * cwe_entry_get_value ( const struct cwe_entry entry)

Get CVE entry value.

Parameters
entryCVE entry
OSCAP_API struct cwe_entry * cwe_entry_new ( void  )

New CWE entry.

Returns
New CWE entry
OSCAP_API bool cwe_entry_set_value ( struct cwe_entry entry,
const char *  new_value 
)

Set value of CVE entry.

Parameters
entryCVE entry
new_valueCVE value

return true if set, false otherwise