OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 /* | 4 /* |
5 * pkix_pl_ocspcertid.c | 5 * pkix_pl_ocspcertid.c |
6 * | 6 * |
7 * Certificate ID Object for OCSP | 7 * Certificate ID Object for OCSP |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 * Returns a Fatal Error if the function fails in an unrecoverable way. | 106 * Returns a Fatal Error if the function fails in an unrecoverable way. |
107 */ | 107 */ |
108 PKIX_Error * | 108 PKIX_Error * |
109 PKIX_PL_OcspCertID_Create( | 109 PKIX_PL_OcspCertID_Create( |
110 PKIX_PL_Cert *cert, | 110 PKIX_PL_Cert *cert, |
111 PKIX_PL_Date *validity, | 111 PKIX_PL_Date *validity, |
112 PKIX_PL_OcspCertID **object, | 112 PKIX_PL_OcspCertID **object, |
113 void *plContext) | 113 void *plContext) |
114 { | 114 { |
115 PKIX_PL_OcspCertID *cid = NULL; | 115 PKIX_PL_OcspCertID *cid = NULL; |
116 int64 time = 0; | 116 PRTime time = 0; |
117 | 117 |
118 PKIX_ENTER(DATE, "PKIX_PL_OcspCertID_Create"); | 118 PKIX_ENTER(DATE, "PKIX_PL_OcspCertID_Create"); |
119 PKIX_NULLCHECK_TWO(cert, object); | 119 PKIX_NULLCHECK_TWO(cert, object); |
120 | 120 |
121 PKIX_CHECK(PKIX_PL_Object_Alloc | 121 PKIX_CHECK(PKIX_PL_Object_Alloc |
122 (PKIX_OCSPCERTID_TYPE, | 122 (PKIX_OCSPCERTID_TYPE, |
123 sizeof (PKIX_PL_OcspCertID), | 123 sizeof (PKIX_PL_OcspCertID), |
124 (PKIX_PL_Object **)&cid, | 124 (PKIX_PL_Object **)&cid, |
125 plContext), | 125 plContext), |
126 PKIX_COULDNOTCREATEOBJECT); | 126 PKIX_COULDNOTCREATEOBJECT); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 */ | 174 */ |
175 PKIX_Error * | 175 PKIX_Error * |
176 PKIX_PL_OcspCertID_GetFreshCacheStatus( | 176 PKIX_PL_OcspCertID_GetFreshCacheStatus( |
177 PKIX_PL_OcspCertID *cid, | 177 PKIX_PL_OcspCertID *cid, |
178 PKIX_PL_Date *validity, | 178 PKIX_PL_Date *validity, |
179 PKIX_Boolean *hasFreshStatus, | 179 PKIX_Boolean *hasFreshStatus, |
180 PKIX_Boolean *statusIsGood, | 180 PKIX_Boolean *statusIsGood, |
181 SECErrorCodes *missingResponseError, | 181 SECErrorCodes *missingResponseError, |
182 void *plContext) | 182 void *plContext) |
183 { | 183 { |
184 int64 time = 0; | 184 PRTime time = 0; |
185 SECStatus rv; | 185 SECStatus rv; |
186 SECStatus rvOcsp; | 186 SECStatus rvOcsp; |
187 | 187 |
188 PKIX_ENTER(DATE, "PKIX_PL_OcspCertID_GetFreshCacheStatus"); | 188 PKIX_ENTER(DATE, "PKIX_PL_OcspCertID_GetFreshCacheStatus"); |
189 PKIX_NULLCHECK_THREE(cid, hasFreshStatus, statusIsGood); | 189 PKIX_NULLCHECK_THREE(cid, hasFreshStatus, statusIsGood); |
190 | 190 |
191 if (validity != NULL) { | 191 if (validity != NULL) { |
192 PKIX_CHECK(pkix_pl_Date_GetPRTime(validity, &time, plContext), | 192 PKIX_CHECK(pkix_pl_Date_GetPRTime(validity, &time, plContext), |
193 PKIX_DATEGETPRTIMEFAILED); | 193 PKIX_DATEGETPRTIMEFAILED); |
194 } else { | 194 } else { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 cert_RememberOCSPProcessingFailure(cid->certID, &certIDWasConsumed); | 242 cert_RememberOCSPProcessingFailure(cid->certID, &certIDWasConsumed); |
243 | 243 |
244 if (certIDWasConsumed) { | 244 if (certIDWasConsumed) { |
245 cid->certID = NULL; | 245 cid->certID = NULL; |
246 } | 246 } |
247 | 247 |
248 PKIX_RETURN(OCSPCERTID); | 248 PKIX_RETURN(OCSPCERTID); |
249 } | 249 } |
250 | 250 |
OLD | NEW |