00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _CVSSCALC_H_
00034 #define _CVSSCALC_H_
00035
00037
00038 typedef enum {
00039 AV_LOCAL,
00040 AV_ADJACENT_NETWORK,
00041 AV_NETWORK
00042 } AccessVector_t;
00043
00045
00048 typedef enum {
00049 AC_HIGH,
00050 AC_MEDIUM,
00051 AC_LOW
00052 } AccessComplexity_t;
00053
00055
00058 typedef enum {
00059 AU_NONE,
00060 AU_SINGLE_INSTANCE,
00061 AU_MULTIPLE_INSTANCE
00062 } Authentication_t;
00063
00065
00068 typedef enum {
00069 CI_NONE,
00070 CI_PARTIAL,
00071 CI_COMPLETE
00072 } ConfImpact_t;
00073
00075
00078 typedef enum {
00079 II_NONE,
00080 II_PARTIAL,
00081 II_COMPLETE
00082 } IntegImpact_t;
00083
00085
00088 typedef enum {
00089 AI_NONE,
00090 AI_PARTIAL,
00091 AI_COMPLETE
00092 } AvailImpact_t;
00093
00095
00098 typedef enum {
00099 EX_UNPROVEN,
00100 EX_PROOF_OF_CONCEPT,
00101 EX_FUNCTIONAL,
00102 EX_HIGH,
00103 EX_NOT_DEFINED
00104 } Exploitability_t;
00105
00107
00110 typedef enum {
00111 RL_OFFICIAL_FIX,
00112 RL_TEMPORARY_FIX,
00113 RL_WORKAROUND,
00114 RL_UNAVAILABLE,
00115 RL_NOT_DEFINED
00116 } RemediationLevel_t;
00117
00119
00123 typedef enum {
00124 RC_UNCONFIRMED,
00125 RC_UNCORROBORATED,
00126 RC_CONFIRMED,
00127 RC_NOT_DEFINED
00128 } ReportConfidence_t;
00129
00131
00134 typedef enum {
00135 CD_NONE,
00136 CD_LOW,
00137 CD_LOW_MEDIUM,
00138 CD_MEDIUM_HIGH,
00139 CD_HIGH,
00140 CD_NOT_DEFINED
00141 } CollateralDamagePotential_t;
00142
00144
00148 typedef enum {
00149 TD_NONE,
00150 TD_LOW,
00151 TD_MEDIUM,
00152 TD_HIGH,
00153 TD_NOT_DEFINED
00154 } TargetDistribution_t;
00155
00157
00161 typedef enum {
00162 CR_LOW,
00163 CR_MEDIUM,
00164 CR_HIGH,
00165 CR_NOT_DEFINED
00166 } ConfReq_t;
00167
00169
00173 typedef enum {
00174 IR_LOW,
00175 IR_MEDIUM,
00176 IR_HIGH,
00177 IR_NOT_DEFINED
00178 } IntegReq_t;
00179
00181
00185 typedef enum {
00186 AR_LOW,
00187 AR_MEDIUM,
00188 AR_HIGH,
00189 AR_NOT_DEFINED
00190 } AvailReq_t;
00191
00198 int baseScore(AccessVector_t ave, AccessComplexity_t ace, Authentication_t aue,
00199 ConfImpact_t cie, IntegImpact_t iie, AvailImpact_t aie,
00200 double *base_score,
00201 double *impact_score,
00202 double *exploitability_score);
00203
00208 int tempScore(Exploitability_t exe, RemediationLevel_t rle,
00209 ReportConfidence_t rce, double base_score,
00210 double *temporal_score);
00211
00221 int envScore(CollateralDamagePotential_t cde, TargetDistribution_t tde,
00222 ConfReq_t cre, IntegReq_t ire,
00223 AvailReq_t are, double *enviromental_score,
00224 AccessVector_t ave, AccessComplexity_t ace,
00225 Authentication_t aue, ConfImpact_t cie,
00226 IntegImpact_t iie, AvailImpact_t aie,
00227 Exploitability_t exe, RemediationLevel_t rle,
00228 ReportConfidence_t rce);
00229
00230 #endif