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

Side by Side Diff: nss/lib/certhigh/ocsp.c

Issue 319593003: Update to NSS 3.16.2 Beta 3. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Remove unused function SEC_NumberOrNameStringToOIDTag Created 6 years, 6 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 /* 5 /*
6 * Implementation of OCSP services, for both client and server. 6 * Implementation of OCSP services, for both client and server.
7 * (XXX, really, mostly just for client right now, but intended to do both.) 7 * (XXX, really, mostly just for client right now, but intended to do both.)
8 */ 8 */
9 9
10 #include "prerror.h" 10 #include "prerror.h"
(...skipping 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 } 2570 }
2571 2571
2572 2572
2573 /* 2573 /*
2574 * Decode the responseBytes based on the responseType found in "rbytes", 2574 * Decode the responseBytes based on the responseType found in "rbytes",
2575 * leaving the resulting translated/decoded information in there as well. 2575 * leaving the resulting translated/decoded information in there as well.
2576 */ 2576 */
2577 static SECStatus 2577 static SECStatus
2578 ocsp_DecodeResponseBytes(PLArenaPool *arena, ocspResponseBytes *rbytes) 2578 ocsp_DecodeResponseBytes(PLArenaPool *arena, ocspResponseBytes *rbytes)
2579 { 2579 {
2580 PORT_Assert(rbytes != NULL); /* internal error, really */
2581 if (rbytes == NULL) { 2580 if (rbytes == NULL) {
2582 » PORT_SetError(SEC_ERROR_INVALID_ARGS);» /* XXX set better error? */ 2581 » PORT_SetError(SEC_ERROR_OCSP_UNKNOWN_RESPONSE_TYPE);
2583 return SECFailure; 2582 return SECFailure;
2584 } 2583 }
2585 2584
2586 rbytes->responseTypeTag = SECOID_FindOIDTag(&rbytes->responseType); 2585 rbytes->responseTypeTag = SECOID_FindOIDTag(&rbytes->responseType);
2587 switch (rbytes->responseTypeTag) { 2586 switch (rbytes->responseTypeTag) {
2588 case SEC_OID_PKIX_OCSP_BASIC_RESPONSE: 2587 case SEC_OID_PKIX_OCSP_BASIC_RESPONSE:
2589 { 2588 {
2590 ocspBasicOCSPResponse *basicResponse; 2589 ocspBasicOCSPResponse *basicResponse;
2591 2590
2592 basicResponse = ocsp_DecodeBasicOCSPResponse(arena, 2591 basicResponse = ocsp_DecodeBasicOCSPResponse(arena,
(...skipping 3581 matching lines...) Expand 10 before | Expand all | Expand 10 after
6174 case ocspResponse_unauthorized: 6173 case ocspResponse_unauthorized:
6175 PORT_SetError(SEC_ERROR_OCSP_UNAUTHORIZED_REQUEST); 6174 PORT_SetError(SEC_ERROR_OCSP_UNAUTHORIZED_REQUEST);
6176 break; 6175 break;
6177 case ocspResponse_unused: 6176 case ocspResponse_unused:
6178 default: 6177 default:
6179 PORT_SetError(SEC_ERROR_OCSP_UNKNOWN_RESPONSE_STATUS); 6178 PORT_SetError(SEC_ERROR_OCSP_UNKNOWN_RESPONSE_STATUS);
6180 break; 6179 break;
6181 } 6180 }
6182 return SECFailure; 6181 return SECFailure;
6183 } 6182 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698