00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _CVE_H_
00038 #define _CVE_H_
00039
00040 #include <stdbool.h>
00041 #include "oscap.h"
00042 #include "cpeuri.h"
00043
00048 struct cve_model;
00049 struct cve_entry;
00050 struct cve_summary;
00051 struct cve_product;
00052 struct cve_configuration;
00053 struct cwe_entry;
00054 struct cve_reference;
00055
00060 struct cve_entry_iterator;
00061
00062 struct cve_entry* cve_entry_iterator_next(struct cve_entry_iterator* it);
00063
00064 bool cve_entry_iterator_has_more(struct cve_entry_iterator* it);
00065
00066 void cve_entry_iterator_free(struct cve_entry_iterator* it);
00067
00072 struct cve_summary_iterator;
00073
00074 struct cve_summary* cve_summary_iterator_next(struct cve_summary_iterator* it);
00075
00076 bool cve_summary_iterator_has_more(struct cve_summary_iterator* it);
00077
00078 void cve_summary_iterator_free(struct cve_summary_iterator* it);
00079
00084 struct cve_product_iterator;
00085
00086 struct cve_product* cve_product_iterator_next(struct cve_product_iterator* it);
00087
00088 bool cve_product_iterator_has_more(struct cve_product_iterator* it);
00089
00090 void cve_product_iterator_free(struct cve_product_iterator* it);
00091
00096 struct cve_configuration_iterator;
00097
00098 struct cve_configuration* cve_configuration_iterator_next(struct cve_configuration_iterator* it);
00099
00100 bool cve_configuration_iterator_has_more(struct cve_configuration_iterator* it);
00101
00102 void cve_configuration_iterator_free(struct cve_configuration_iterator* it);
00103
00108 struct cve_reference_iterator;
00110 struct cve_reference* cve_reference_iterator_next(struct cve_reference_iterator* it);
00112 bool cve_reference_iterator_has_more(struct cve_reference_iterator* it);
00114 void cve_reference_iterator_free(struct cve_reference_iterator* it);
00115
00116
00117
00118
00119
00120
00121
00122
00123 struct cve_model * cve_model_import(const struct oscap_import_source * source);
00124
00129 struct cve_entry_iterator* cve_model_get_entries(const struct cve_model* cve_model);
00130
00135 const char* cve_entry_get_id(const struct cve_entry* item);
00136
00141 const char* cve_entry_get_cwe(const struct cve_entry* item);
00142
00147 struct cve_summary_iterator* cve_entry_get_summaries(const struct cve_entry* item);
00148
00153 struct cve_reference_iterator* cve_entry_get_references(const struct cve_entry* item);
00154
00155
00160 const char* cve_reference_get_value(const struct cve_reference* ref);
00161
00166 const char* cve_reference_get_href(const struct cve_reference* ref);
00167
00172 const char* cve_reference_get_type(const struct cve_reference* ref);
00173
00178 const char* cve_reference_get_source(const struct cve_reference * ref);
00179
00180
00181 const char* cve_summary_get_summary(const struct cve_summary * summary);
00182
00183 const char* cve_product_get_value(const struct cve_product * product);
00184 const char* cwe_entry_get_value(const struct cwe_entry * entry);
00185 const char* cve_configuration_get_id(const struct cve_configuration * conf);
00186 const char* cve_entry_get_published(const struct cve_entry * entry);
00187 const char* cve_entry_get_modified(const struct cve_entry * entry);
00188 const char* cve_entry_get_sec_protection(const struct cve_entry * entry);
00189
00190 struct cve_product_iterator * cve_entry_get_products(const struct cve_entry * entry);
00191 struct cve_configuration_iterator * cve_entry_get_configurations(const struct cve_entry * entry);
00192 const struct cpe_testexpr * cve_configuration_get_expr(const struct cve_configuration * conf);
00193
00194 void cve_model_export(struct cve_model * cve, const struct oscap_export_target * target);
00195
00196 struct cve_model * cve_model_import(const struct oscap_import_source * source);
00197
00198 void cve_model_free(struct cve_model * cve_model);
00199
00200 void cve_entry_free(struct cve_entry * entry);
00201
00202 void cve_summary_free(struct cve_summary * summary);
00203
00204 void cve_product_free(struct cve_product * product);
00205
00206 void cve_reference_free(struct cve_reference * ref);
00207
00208 void cwe_entry_free(struct cwe_entry * entry);
00209
00210 void cve_configuration_free(struct cve_configuration * conf);
00211
00212 struct cve_entry * cve_entry_new(void);
00213 struct cve_configuration * cve_configuration_new(void);
00214 struct cwe_entry * cwe_entry_new(void);
00215 struct cve_product * cve_product_new(void);
00216 struct cve_summary * cve_summary_new(void);
00217 struct cve_reference * cve_reference_new(void);
00218 struct cve_model * cve_model_new(void);
00219
00220 bool cve_model_add_entry(struct cve_model *motel, struct cve_entry *new_entry);
00221
00222 bool cve_reference_set_value(struct cve_reference *reference, const char *new_value);
00223 bool cve_reference_set_href(struct cve_reference *reference, const char *new_href);
00224 bool cve_reference_set_type(struct cve_reference *reference, const char *new_type);
00225 bool cve_reference_set_source(struct cve_reference *reference, const char *new_source);
00226
00227 bool cve_summary_set_summary(struct cve_summary *summary, const char *new_summary);
00228
00229 bool cve_product_set_value(struct cve_product *product, const char *new_value);
00230
00231 bool cve_entry_set_id(struct cve_entry *entry, const char *new_id);
00232 bool cve_entry_set_published(struct cve_entry *entry, const char *new_published);
00233 bool cve_entry_set_modified(struct cve_entry *entry, const char *new_modified);
00234 bool cve_entry_set_sec_protection(struct cve_entry *entry, const char *new_protection);
00235 bool cve_entry_set_cwe(struct cve_entry *entry, const char *cwe);
00236
00237 bool cwe_entry_set_value(struct cwe_entry *entry, const char *new_value);
00238
00239 bool cve_configuration_set_id(struct cve_configuration * conf, const char *new_id);
00240
00241
00242
00243
00244 #endif
00245