00001 00014 /* 00015 * Copyright 2008 Red Hat Inc., Durham, North Carolina. 00016 * All Rights Reserved. 00017 * 00018 * This library is free software; you can redistribute it and/or 00019 * modify it under the terms of the GNU Lesser General Public 00020 * License as published by the Free Software Foundation; either 00021 * version 2.1 of the License, or (at your option) any later version. 00022 * 00023 * This library is distributed in the hope that it will be useful, 00024 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00025 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00026 * Lesser General Public License for more details. 00027 * 00028 * You should have received a copy of the GNU Lesser General Public 00029 * License along with this library; if not, write to the Free Software 00030 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00031 * 00032 * Authors: 00033 * Tomas Heinrich <theinric@redhat.com> 00034 */ 00035 00036 #ifndef _CVE_H_ 00037 #define _CVE_H_ 00038 00039 #include <stdbool.h> 00040 #include "../common/oscap.h" 00041 00045 struct cve; 00046 00050 struct cve_info; 00051 00055 struct cve_reference; 00056 00057 00058 00063 struct cve_info_iterator; 00065 struct cve_info* cve_info_iterator_next(struct cve_info_iterator* it); 00067 bool cve_info_iterator_has_more(struct cve_info_iterator* it); 00069 void cve_info_iterator_free(struct cve_info_iterator* it); 00070 00075 struct cve_reference_iterator; 00077 struct cve_reference* cve_reference_iterator_next(struct cve_reference_iterator* it); 00079 bool cve_reference_iterator_has_more(struct cve_reference_iterator* it); 00081 void cve_reference_iterator_free(struct cve_reference_iterator* it); 00082 00083 00084 00090 struct cve* cve_new(const char* fname); 00091 00096 void cve_free(struct cve* cve); 00097 00102 struct cve_info_iterator* cve_get_entries(const struct cve* cve); 00103 00108 struct cve_info* cve_get_entry(const struct cve* cve, const char* id); 00109 00110 00115 const char* cve_info_get_id(const struct cve_info* info); 00116 00121 const char* cve_info_get_pub(const struct cve_info* info); 00122 00127 const char* cve_info_get_mod(const struct cve_info* info); 00128 00133 const char* cve_info_get_cwe(const struct cve_info* info); 00134 00139 const char* cve_info_get_summary(const struct cve_info* info); 00140 00145 const char* cve_info_get_score(const struct cve_info* info); 00146 00151 const char* cve_info_get_vector(const struct cve_info* info); 00152 00157 const char* cve_info_get_complexity(const struct cve_info* info); 00158 00163 const char* cve_info_get_authentication(const struct cve_info* info); 00164 00169 const char* cve_info_get_confidentiality(const struct cve_info* info); 00170 00175 const char* cve_info_get_integrity(const struct cve_info* info); 00176 00181 const char* cve_info_get_availability(const struct cve_info* info); 00182 00187 const char* cve_info_get_source(const struct cve_info* info); 00188 00193 const char* cve_info_get_generated(const struct cve_info* info); 00194 00199 struct cve_reference_iterator* cve_info_get_references(const struct cve_info* info); 00200 00201 00206 const char* cve_reference_get_summary(const struct cve_reference* ref); 00207 00212 const char* cve_reference_get_href(const struct cve_reference* ref); 00213 00218 const char* cve_reference_get_type(const struct cve_reference* ref); 00219 00224 const char* cve_reference_get_source(const struct cve_reference* ref); 00225 00226 #endif /* _CVE_H_ */ 00227