Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c

Issue 105893015: Update third_party/nss to NSS 3.15.4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Remove SVN property on new file nss/lib/freebl/rsapkcs.c Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 PRTime time = 0; 184 PRTime time = 0;
185 SECStatus rv; 185 SECStatus rv;
186 SECStatus rvOcsp; 186 SECStatus rvOcsp;
187 OCSPFreshness freshness;
187 188
188 PKIX_ENTER(DATE, "PKIX_PL_OcspCertID_GetFreshCacheStatus"); 189 PKIX_ENTER(DATE, "PKIX_PL_OcspCertID_GetFreshCacheStatus");
189 PKIX_NULLCHECK_THREE(cid, hasFreshStatus, statusIsGood); 190 PKIX_NULLCHECK_THREE(cid, hasFreshStatus, statusIsGood);
190 191
191 if (validity != NULL) { 192 if (validity != NULL) {
192 PKIX_CHECK(pkix_pl_Date_GetPRTime(validity, &time, plContext), 193 PKIX_CHECK(pkix_pl_Date_GetPRTime(validity, &time, plContext),
193 PKIX_DATEGETPRTIMEFAILED); 194 PKIX_DATEGETPRTIMEFAILED);
194 } else { 195 } else {
195 time = PR_Now(); 196 time = PR_Now();
196 } 197 }
197 198
198 rv = ocsp_GetCachedOCSPResponseStatusIfFresh( 199 rv = ocsp_GetCachedOCSPResponseStatus(
199 cid->certID, time, PR_TRUE, /*ignoreGlobalOcspFailureSetting*/ 200 cid->certID, time, PR_TRUE, /*ignoreGlobalOcspFailureSetting*/
200 &rvOcsp, missingResponseError); 201 &rvOcsp, missingResponseError, &freshness);
201 202
202 *hasFreshStatus = (rv == SECSuccess); 203 *hasFreshStatus = (rv == SECSuccess && freshness == ocspFresh);
203 if (*hasFreshStatus) { 204 if (*hasFreshStatus) {
204 *statusIsGood = (rvOcsp == SECSuccess); 205 *statusIsGood = (rvOcsp == SECSuccess);
205 } 206 }
206 cleanup: 207 cleanup:
207 PKIX_RETURN(OCSPCERTID); 208 PKIX_RETURN(OCSPCERTID);
208 } 209 }
209 210
210 /* 211 /*
211 * FUNCTION: PKIX_PL_OcspCertID_RememberOCSPProcessingFailure 212 * FUNCTION: PKIX_PL_OcspCertID_RememberOCSPProcessingFailure
212 * DESCRIPTION: 213 * DESCRIPTION:
(...skipping 28 matching lines...) Expand all
241 242
242 cert_RememberOCSPProcessingFailure(cid->certID, &certIDWasConsumed); 243 cert_RememberOCSPProcessingFailure(cid->certID, &certIDWasConsumed);
243 244
244 if (certIDWasConsumed) { 245 if (certIDWasConsumed) {
245 cid->certID = NULL; 246 cid->certID = NULL;
246 } 247 }
247 248
248 PKIX_RETURN(OCSPCERTID); 249 PKIX_RETURN(OCSPCERTID);
249 } 250 }
250 251
OLDNEW
« no previous file with comments | « nss/lib/libpkix/pkix/checker/pkix_ocspchecker.c ('k') | nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698