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 00042 typedef struct cve_reference { 00043 char *summary; 00044 char *href; 00045 char *refType; 00046 char *source; 00047 00048 struct cve_reference *next; 00049 } cve_reference_t; 00050 00054 typedef struct cve_info { 00055 char *id; 00056 char *pub; 00057 char *mod; 00058 char *cwe; 00059 char *summary; 00060 00061 char *score; 00062 char *vector; 00063 char *complexity; 00064 char *authentication; 00065 char *confidentiality; 00066 char *integrity; 00067 char *availability; 00068 char *source; 00069 char *generated; 00070 00071 cve_reference_t *refs; 00072 00073 struct cve_info *next; 00074 } cve_info_t; 00075 00083 cve_reference_t *cveReferenceNew(); 00084 00090 void cveReferenceDel(cve_reference_t * reference); 00091 00097 void cveReferenceDelAll(cve_reference_t * ref); 00098 00106 cve_info_t *cveNew(); 00107 00113 void cveDel(cve_info_t * cve); 00114 00120 void cveDelAll(cve_info_t * cve); 00121 00130 int cveParse(char *xmlfile, cve_info_t ** outCveList); 00131 00132 #endif /* _CVE_H_ */