00001 00010 /* 00011 * Copyright 2008 Red Hat Inc., Durham, North Carolina. 00012 * All Rights Reserved. 00013 * 00014 * This library is free software; you can redistribute it and/or 00015 * modify it under the terms of the GNU Lesser General Public 00016 * License as published by the Free Software Foundation; either 00017 * version 2.1 of the License, or (at your option) any later version. 00018 * 00019 * This library is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00022 * Lesser General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU Lesser General Public 00025 * License along with this library; if not, write to the Free Software 00026 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00027 * 00028 * Authors: 00029 * Tomas Heinrich <theinric@redhat.com> 00030 */ 00031 00032 #ifndef _CVE_H_ 00033 #define _CVE_H_ 00034 00038 typedef struct cve_reference { 00039 char *summary; 00040 char *href; 00041 char *refType; 00042 char *source; 00043 00044 struct cve_reference *next; 00045 } cve_reference_t; 00046 00050 typedef struct cve_info { 00051 char *id; 00052 char *pub; 00053 char *mod; 00054 char *cwe; 00055 char *summary; 00056 00057 char *score; 00058 char *vector; 00059 char *complexity; 00060 char *authentication; 00061 char *confidentiality; 00062 char *integrity; 00063 char *availability; 00064 char *source; 00065 char *generated; 00066 00067 cve_reference_t *refs; 00068 00069 struct cve_info *next; 00070 } cve_info_t; 00071 00079 cve_reference_t *cveReferenceNew(); 00080 00086 void cveReferenceDel(cve_reference_t * reference); 00087 00093 void cveReferenceDelAll(cve_reference_t * ref); 00094 00102 cve_info_t *cveNew(); 00103 00109 void cveDel(cve_info_t * cve); 00110 00116 void cveDelAll(cve_info_t * cve); 00117 00126 int cveParse(char *xmlfile, cve_info_t ** outCveList); 00127 00128 #endif /* _CVE_H_ */