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

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

Issue 1504923011: Update NSS to 3.21 RTM and NSPR to 4.11 RTM (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 5 years 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 #include "plarena.h" 5 #include "plarena.h"
6 6
7 #include "seccomon.h" 7 #include "seccomon.h"
8 #include "secitem.h" 8 #include "secitem.h"
9 #include "secasn1.h" 9 #include "secasn1.h"
10 #include "secder.h" 10 #include "secder.h"
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 if (!SEC_ASN1EncodeInteger(tmpArena, &response->responseStatus, 537 if (!SEC_ASN1EncodeInteger(tmpArena, &response->responseStatus,
538 response->statusValue)) 538 response->statusValue))
539 goto done; 539 goto done;
540 540
541 result = SEC_ASN1EncodeItem(arena, NULL, response, ocsp_OCSPResponseTemplate ); 541 result = SEC_ASN1EncodeItem(arena, NULL, response, ocsp_OCSPResponseTemplate );
542 542
543 done: 543 done:
544 if (privKey) 544 if (privKey)
545 SECKEY_DestroyPrivateKey(privKey); 545 SECKEY_DestroyPrivateKey(privKey);
546 if (br->responseSignature.signature.data) 546 if (br && br->responseSignature.signature.data)
547 SECITEM_FreeItem(&br->responseSignature.signature, PR_FALSE); 547 SECITEM_FreeItem(&br->responseSignature.signature, PR_FALSE);
548 PORT_FreeArena(tmpArena, PR_FALSE); 548 PORT_FreeArena(tmpArena, PR_FALSE);
549 549
550 return result; 550 return result;
551 } 551 }
552 552
553 static const SEC_ASN1Template ocsp_OCSPErrorResponseTemplate[] = { 553 static const SEC_ASN1Template ocsp_OCSPErrorResponseTemplate[] = {
554 { SEC_ASN1_SEQUENCE, 554 { SEC_ASN1_SEQUENCE,
555 0, NULL, sizeof(CERTOCSPResponse) }, 555 0, NULL, sizeof(CERTOCSPResponse) },
556 { SEC_ASN1_ENUMERATED, 556 { SEC_ASN1_ENUMERATED,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 response.statusValue)) 591 response.statusValue))
592 return NULL; 592 return NULL;
593 593
594 result = SEC_ASN1EncodeItem(arena, NULL, &response, 594 result = SEC_ASN1EncodeItem(arena, NULL, &response,
595 ocsp_OCSPErrorResponseTemplate); 595 ocsp_OCSPErrorResponseTemplate);
596 596
597 SECITEM_FreeItem(&response.responseStatus, PR_FALSE); 597 SECITEM_FreeItem(&response.responseStatus, PR_FALSE);
598 598
599 return result; 599 return result;
600 } 600 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698