|
Open SCAP Library
|
Files | |
| file | cpe_dict.h |
| Interface to Common Platform Enumeration (CPE) Dictionary. | |
Data Structures | |
| struct | cpe_dict_model |
| Structure representing a CPE dictionary. More... | |
| struct | cpe_item |
| Structure representing single CPE dictionary item. More... | |
| struct | cpe_vendor |
| Structure with information about vendor. More... | |
| struct | cpe_generator |
| Structure with information about document. More... | |
| struct | cpe_check |
| Structure representing single CPE check. More... | |
| struct | cpe_reference |
| CPE dictionary item reference. More... | |
| struct | cpe_item_metadata |
| Structure representing metadata of CPE item. More... | |
| struct | cpe_product |
| Product of some vendor. More... | |
| struct | cpe_version |
| Version of product. More... | |
| struct | cpe_update |
| Update of product version. More... | |
| struct | cpe_edition |
| Edition of product update. More... | |
| struct | cpe_language |
| Language of product edition. More... | |
| struct | cpe_item_iterator |
| Iterator over CPE dictionary items. More... | |
| struct | cpe_reference_iterator |
| Iterator over CPE dictionary references. More... | |
| struct | cpe_check_iterator |
| Iterator over CPE dictionary checks. More... | |
| struct | cpe_vendor_iterator |
| Iterator over CPE dictionary item vendors. More... | |
| struct | cpe_product_iterator |
| Iterator over CPE dictionary item products. More... | |
| struct | cpe_version_iterator |
| Iterator over CPE dictionary item versions. More... | |
| struct | cpe_update_iterator |
| Iterator over CPE dictionary item updates. More... | |
| struct | cpe_edition_iterator |
| Iterator over CPE dictionary item editions. More... | |
| struct | cpe_language_iterator |
| Iterator over CPE dictionary item languages. More... | |
Evaluators | |
| char * | cpe_dict_detect_version (const char *file) |
| Detects which version the given CPE file is. More... | |
| const char * | cpe_dict_model::cpe_dict_model_supported (void) |
| Get the newest supported version of CPE dictionary XML. More... | |
| bool | cpe_dict_model::cpe_name_match_dict (struct cpe_name *cpe, struct cpe_dict_model *dict) |
| Verify wether given CPE is known according to specified dictionary. More... | |
| bool | cpe_dict_model::cpe_name_match_dict_str (const char *cpe, struct cpe_dict_model *dict) |
| Verify if CPE given by string is known according to specified dictionary. More... | |
| bool | cpe_dict_model::cpe_name_applicable_dict (struct cpe_name *cpe, struct cpe_dict_model *dict, cpe_check_fn cb, void *usr) |
| Verify whether given CPE is applicable to current platform by evaluating checks associated with it. More... | |
| bool | cpe_item::cpe_item_is_applicable (struct cpe_item *item, cpe_check_fn cb, void *usr) |
| void cpe_check_free | ( | struct cpe_check * | check | ) |
| const char * cpe_check_get_href | ( | const struct cpe_check * | item | ) |
cpe_check functions to get href
| item | CPE check item |
| const char * cpe_check_get_identifier | ( | const struct cpe_check * | item | ) |
cpe_check functions to get identifier
| item | CPE check item |
| const char * cpe_check_get_system | ( | const struct cpe_check * | item | ) |
cpe_check functions to get system
| item | CPE check item |
| void cpe_check_iterator_free | ( | struct cpe_check_iterator * | it | ) |
Iterator over CPE item check items.
| bool cpe_check_iterator_has_more | ( | struct cpe_check_iterator * | it | ) |
Iterator over CPE item check items.
|
read |
Iterator over CPE item check items.
| void cpe_check_iterator_remove | ( | struct cpe_check_iterator * | it | ) |
| void cpe_check_iterator_reset | ( | struct cpe_check_iterator * | it | ) |
|
read |
| bool cpe_check_set_href | ( | struct cpe_check * | check, |
| const char * | new_href | ||
| ) |
| bool cpe_check_set_identifier | ( | struct cpe_check * | check, |
| const char * | new_identifier | ||
| ) |
| bool cpe_check_set_system | ( | struct cpe_check * | check, |
| const char * | new_system | ||
| ) |
| char* cpe_dict_detect_version | ( | const char * | file | ) |
Detects which version the given CPE file is.
Deallocate the result after use with "free(..)".
| bool cpe_dict_model_add_vendor | ( | struct cpe_dict_model * | dict, |
| struct cpe_vendor * | new_vendor | ||
| ) |
| void cpe_dict_model_export | ( | const struct cpe_dict_model * | dict, |
| const char * | file | ||
| ) |
Write the dict_model to a file.
| dict | CPE Dict model |
| void cpe_dict_model_free | ( | struct cpe_dict_model * | dict | ) |
| int cpe_dict_model_get_base_version | ( | const struct cpe_dict_model * | item | ) |
cpe_dict_model functions to get the base version from CPE dictionary model
The base version is the major CPE version, 1 or 2. These two versions differ in namespace when exporting so we have to remember which version we loaded.
CPE 1.0 also doesn't have cpe_generator structure inside so we can't get the version info from there.
| item | dictionary model |
|
read |
cpe_dict_model functions to get generator from CPE dictionary model
| item | dictionary model |
|
read |
cpe_dict_model functions to get CPE items
| item | dictionary model |
|
read |
cpe_dict_model functions to get vendors
| item | dictionary model |
|
read |
Load new CPE dictionary from file.
| file | filename |
| NULL | on failure |
|
read |
| bool cpe_dict_model_set_base_version | ( | struct cpe_dict_model * | item, |
| int | base_version | ||
| ) |
cpe_dict_model functions to get the base version from CPE dictionary model
| item | dictionary model |
| bool cpe_dict_model_set_origin_file | ( | struct cpe_dict_model * | dict, |
| const char * | origin_file | ||
| ) |
Sets the origin file hint.
| const char * cpe_dict_model_supported | ( | void | ) |
Get the newest supported version of CPE dictionary XML.
| bool cpe_edition_add_language | ( | struct cpe_edition * | edition, |
| struct cpe_language * | new_language | ||
| ) |
| void cpe_edition_free | ( | struct cpe_edition * | edition | ) |
|
read |
cpe_edition functions to get languages of edition
| item | cpe_edition of update |
| const char * cpe_edition_get_value | ( | const struct cpe_edition * | item | ) |
cpe_edition functions to get value of edition
| item | cpe_edition of update |
| void cpe_edition_iterator_free | ( | struct cpe_edition_iterator * | it | ) |
Iterator over CPE edition items.
| bool cpe_edition_iterator_has_more | ( | struct cpe_edition_iterator * | it | ) |
Iterator over CPE edition items.
|
read |
Iterator over CPE edition items.
| void cpe_edition_iterator_remove | ( | struct cpe_edition_iterator * | it | ) |
| void cpe_edition_iterator_reset | ( | struct cpe_edition_iterator * | it | ) |
|
read |
| bool cpe_edition_set_value | ( | struct cpe_edition * | edition, |
| const char * | new_value | ||
| ) |
| void cpe_generator_free | ( | struct cpe_generator * | generator | ) |
| const char * cpe_generator_get_product_name | ( | const struct cpe_generator * | item | ) |
cpe_generator functions to get product name
| item | document generator |
| const char * cpe_generator_get_product_version | ( | const struct cpe_generator * | item | ) |
cpe_generator functions to get product version
| item | document generator |
| const char * cpe_generator_get_schema_version | ( | const struct cpe_generator * | item | ) |
cpe_generator functions to get document schema version
| item | document generator |
| const char * cpe_generator_get_timestamp | ( | const struct cpe_generator * | item | ) |
cpe_generator functions to get timestamp from generator
| item | document generator |
|
read |
| bool cpe_generator_set_product_name | ( | struct cpe_generator * | generator, |
| const char * | new_product_name | ||
| ) |
| bool cpe_generator_set_product_version | ( | struct cpe_generator * | generator, |
| const char * | new_product_version | ||
| ) |
| bool cpe_generator_set_schema_version | ( | struct cpe_generator * | generator, |
| const char * | new_schema_version | ||
| ) |
| bool cpe_generator_set_timestamp | ( | struct cpe_generator * | generator, |
| const char * | new_timestamp | ||
| ) |
| bool cpe_item_add_note | ( | struct cpe_item * | item, |
| struct oscap_text * | new_title | ||
| ) |
| bool cpe_item_add_reference | ( | struct cpe_item * | item, |
| struct cpe_reference * | new_reference | ||
| ) |
| bool cpe_item_add_title | ( | struct cpe_item * | item, |
| struct oscap_text * | new_title | ||
| ) |
| void cpe_item_free | ( | struct cpe_item * | item | ) |
|
read |
cpe_item functions to get CPE checks
| item | CPE item |
cpe_item functions to get variable member deprecated_by
| item | CPE item |
cpe_item functions to get variable member deprecated_by
| item | CPE item |
| const char * cpe_item_get_deprecation_date | ( | const struct cpe_item * | item | ) |
cpe_item functions to get variable member date
| item | CPE item |
|
read |
cpe_item functions to get variable member name
| item | CPE item |
|
read |
cpe_item functions to get CPE notes
| item | CPE item |
|
read |
cpe_item functions to get CPE references
| item | CPE item |
|
read |
cpe_item functions to get CPE titles
| item | CPE item |
| bool cpe_item_is_applicable | ( | struct cpe_item * | item, |
| cpe_check_fn | cb, | ||
| void * | usr | ||
| ) |
| void cpe_item_iterator_free | ( | struct cpe_item_iterator * | it | ) |
Iterator over CPE dictionary items.
| bool cpe_item_iterator_has_more | ( | struct cpe_item_iterator * | it | ) |
Iterator over CPE dictionary items.
|
read |
Iterator over CPE dictionary items.
| void cpe_item_iterator_remove | ( | struct cpe_item_iterator * | it | ) |
| void cpe_item_iterator_reset | ( | struct cpe_item_iterator * | it | ) |
| const char * cpe_item_metadata_get_deprecated_by_nvd_id | ( | const struct cpe_item_metadata * | item | ) |
cpe_item_metadata function to get NVD ID of deprecated item
| item | metadata of CPE item |
| const char * cpe_item_metadata_get_modification_date | ( | const struct cpe_item_metadata * | item | ) |
cpe_item_metadata function to get date
| item | metadata of CPE item |
| const char * cpe_item_metadata_get_nvd_id | ( | const struct cpe_item_metadata * | item | ) |
cpe_item_metadata function to get nvd ID
| item | metadata of CPE item |
| const char * cpe_item_metadata_get_status | ( | const struct cpe_item_metadata * | item | ) |
cpe_item_metadata function to get status
| item | metadata of CPE item |
|
read |
| bool cpe_item_metadata_set_deprecated_by_nvd_id | ( | struct cpe_item_metadata * | item_metadata, |
| const char * | new_deprecated_by_nvd_id | ||
| ) |
| bool cpe_item_metadata_set_modification_date | ( | struct cpe_item_metadata * | item_metadata, |
| const char * | new_modification_date | ||
| ) |
| bool cpe_item_metadata_set_nvd_id | ( | struct cpe_item_metadata * | item_metadata, |
| const char * | new_nvd_id | ||
| ) |
| bool cpe_item_metadata_set_status | ( | struct cpe_item_metadata * | item_metadata, |
| const char * | new_status | ||
| ) |
|
read |
| bool cpe_item_set_deprecation_date | ( | struct cpe_item * | item, |
| const char * | new_deprecation_date | ||
| ) |
| void cpe_language_free | ( | struct cpe_language * | language | ) |
| const char * cpe_language_get_value | ( | const struct cpe_language * | item | ) |
cpe_language functions to get value of language
| item | language |
| void cpe_language_iterator_free | ( | struct cpe_language_iterator * | it | ) |
Iterator over CPE language items.
| bool cpe_language_iterator_has_more | ( | struct cpe_language_iterator * | it | ) |
Iterator over CPE language items.
|
read |
Iterator over CPE language items.
| void cpe_language_iterator_remove | ( | struct cpe_language_iterator * | it | ) |
| void cpe_language_iterator_reset | ( | struct cpe_language_iterator * | it | ) |
|
read |
| bool cpe_language_set_value | ( | struct cpe_language * | language, |
| const char * | new_value | ||
| ) |
| bool cpe_name_applicable_dict | ( | struct cpe_name * | cpe, |
| struct cpe_dict_model * | dict, | ||
| cpe_check_fn | cb, | ||
| void * | usr | ||
| ) |
Verify whether given CPE is applicable to current platform by evaluating checks associated with it.
| cpe | CPE to verify |
| dict | used CPE dictionary |
| bool cpe_name_match_dict | ( | struct cpe_name * | cpe, |
| struct cpe_dict_model * | dict | ||
| ) |
Verify wether given CPE is known according to specified dictionary.
| cpe | CPE to verify |
| dict | used CPE dictionary |
| bool cpe_name_match_dict_str | ( | const char * | cpe, |
| struct cpe_dict_model * | dict | ||
| ) |
Verify if CPE given by string is known according to specified dictionary.
| cpe | CPE to verify |
| dict | used CPE dictionary |
| bool cpe_product_add_version | ( | struct cpe_product * | product, |
| struct cpe_version * | new_version | ||
| ) |
| void cpe_product_free | ( | struct cpe_product * | product | ) |
| cpe_part_t cpe_product_get_part | ( | const struct cpe_product * | item | ) |
cpe_product functions to get product part
| item | cpe_product |
| const char * cpe_product_get_value | ( | const struct cpe_product * | item | ) |
cpe_product functions to get product value
| item | cpe_product |
|
read |
cpe_product functions to get versions of product
| item | cpe_product |
| void cpe_product_iterator_free | ( | struct cpe_product_iterator * | it | ) |
Iterator over CPE product items.
| bool cpe_product_iterator_has_more | ( | struct cpe_product_iterator * | it | ) |
Iterator over CPE product items.
|
read |
Iterator over CPE product items.
| void cpe_product_iterator_remove | ( | struct cpe_product_iterator * | it | ) |
| void cpe_product_iterator_reset | ( | struct cpe_product_iterator * | it | ) |
|
read |
| bool cpe_product_set_part | ( | struct cpe_product * | product, |
| cpe_part_t | new_part | ||
| ) |
| bool cpe_product_set_value | ( | struct cpe_product * | product, |
| const char * | new_value | ||
| ) |
| void cpe_reference_free | ( | struct cpe_reference * | ref | ) |
| const char * cpe_reference_get_content | ( | const struct cpe_reference * | item | ) |
cpe_reference functions to get content of reference
| item | CPE reference item |
| const char * cpe_reference_get_href | ( | const struct cpe_reference * | item | ) |
cpe_reference functions to get href of reference
| item | CPE reference item |
| void cpe_reference_iterator_free | ( | struct cpe_reference_iterator * | it | ) |
Iterator over CPE item reference items.
| bool cpe_reference_iterator_has_more | ( | struct cpe_reference_iterator * | it | ) |
Iterator over CPE item reference items.
|
read |
Iterator over CPE item reference items.
| void cpe_reference_iterator_remove | ( | struct cpe_reference_iterator * | it | ) |
| void cpe_reference_iterator_reset | ( | struct cpe_reference_iterator * | it | ) |
|
read |
| bool cpe_reference_set_content | ( | struct cpe_reference * | reference, |
| const char * | new_content | ||
| ) |
| bool cpe_reference_set_href | ( | struct cpe_reference * | reference, |
| const char * | new_href | ||
| ) |
| bool cpe_update_add_edition | ( | struct cpe_update * | update, |
| struct cpe_edition * | new_edition | ||
| ) |
| void cpe_update_free | ( | struct cpe_update * | update | ) |
|
read |
cpe_update functions to get editions of update
| item | cpe_update of product element |
| const char * cpe_update_get_value | ( | const struct cpe_update * | item | ) |
cpe_update functions to get updates of version
| item |
| void cpe_update_iterator_free | ( | struct cpe_update_iterator * | it | ) |
Iterator over CPE update items.
| bool cpe_update_iterator_has_more | ( | struct cpe_update_iterator * | it | ) |
Iterator over CPE update items.
|
read |
Iterator over CPE update items.
| void cpe_update_iterator_remove | ( | struct cpe_update_iterator * | it | ) |
| void cpe_update_iterator_reset | ( | struct cpe_update_iterator * | it | ) |
|
read |
| bool cpe_update_set_value | ( | struct cpe_update * | update, |
| const char * | new_value | ||
| ) |
| bool cpe_vendor_add_product | ( | struct cpe_vendor * | vendor, |
| struct cpe_product * | new_product | ||
| ) |
| bool cpe_vendor_add_title | ( | struct cpe_vendor * | vendor, |
| struct oscap_text * | new_title | ||
| ) |
| void cpe_vendor_free | ( | struct cpe_vendor * | vendor | ) |
|
read |
cpe_vendor functions to get vendor products
| item | cpe_vendor |
|
read |
cpe_vendor functions to get vendor titles
| item | cpe_vendor |
| const char * cpe_vendor_get_value | ( | const struct cpe_vendor * | item | ) |
cpe_vendor functions to get vendor value
| item | cpe_vendor |
| void cpe_vendor_iterator_free | ( | struct cpe_vendor_iterator * | it | ) |
Iterator over CPE vendor items.
| bool cpe_vendor_iterator_has_more | ( | struct cpe_vendor_iterator * | it | ) |
Iterator over CPE vendor items.
|
read |
Iterator over CPE vendor items.
| void cpe_vendor_iterator_remove | ( | struct cpe_vendor_iterator * | it | ) |
| void cpe_vendor_iterator_reset | ( | struct cpe_vendor_iterator * | it | ) |
|
read |
| bool cpe_vendor_set_value | ( | struct cpe_vendor * | vendor, |
| const char * | new_value | ||
| ) |
| bool cpe_version_add_update | ( | struct cpe_version * | version, |
| struct cpe_update * | new_update | ||
| ) |
| void cpe_version_free | ( | struct cpe_version * | version | ) |
|
read |
cpe_version functions to get value of version
| item | cpe_version |
| const char * cpe_version_get_value | ( | const struct cpe_version * | item | ) |
cpe_version functions to get vupdates of versions
| item | cpe_version |
| void cpe_version_iterator_free | ( | struct cpe_version_iterator * | it | ) |
Iterator over CPE version items.
| bool cpe_version_iterator_has_more | ( | struct cpe_version_iterator * | it | ) |
Iterator over CPE version items.
|
read |
Iterator over CPE version items.
| void cpe_version_iterator_remove | ( | struct cpe_version_iterator * | it | ) |
| void cpe_version_iterator_reset | ( | struct cpe_version_iterator * | it | ) |
|
read |
| bool cpe_version_set_value | ( | struct cpe_version * | version, |
| const char * | new_value | ||
| ) |
1.8.3.1