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

Side by Side Diff: nss/lib/certdb/xauthkid.c

Issue 16132005: Allow NSS to be built with NO_NSPR_10_SUPPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 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
« no previous file with comments | « nss/lib/certdb/stanpcertdb.c ('k') | nss/lib/certdb/xbsconst.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * X.509 v3 Subject Key Usage Extension 6 * X.509 v3 Subject Key Usage Extension
7 * 7 *
8 */ 8 */
9 9
10 #include "prtypes.h" 10 #include "prtypes.h"
(...skipping 17 matching lines...) Expand all
28 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1, 28 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
29 offsetof(CERTAuthKeyID, DERAuthCertIssuer), CERT_GeneralNamesTemplate} , 29 offsetof(CERTAuthKeyID, DERAuthCertIssuer), CERT_GeneralNamesTemplate} ,
30 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 2, 30 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 2,
31 offsetof(CERTAuthKeyID,authCertSerialNumber), 31 offsetof(CERTAuthKeyID,authCertSerialNumber),
32 SEC_ASN1_SUB(SEC_IntegerTemplate) }, 32 SEC_ASN1_SUB(SEC_IntegerTemplate) },
33 { 0 } 33 { 0 }
34 }; 34 };
35 35
36 36
37 37
38 SECStatus CERT_EncodeAuthKeyID (PRArenaPool *arena, CERTAuthKeyID *value, SECIte m *encodedValue) 38 SECStatus CERT_EncodeAuthKeyID (PLArenaPool *arena, CERTAuthKeyID *value, SECIte m *encodedValue)
39 { 39 {
40 SECStatus rv = SECFailure; 40 SECStatus rv = SECFailure;
41 41
42 PORT_Assert (value); 42 PORT_Assert (value);
43 PORT_Assert (arena); 43 PORT_Assert (arena);
44 PORT_Assert (value->DERAuthCertIssuer == NULL); 44 PORT_Assert (value->DERAuthCertIssuer == NULL);
45 PORT_Assert (encodedValue); 45 PORT_Assert (encodedValue);
46 46
47 do { 47 do {
48 48
(...skipping 22 matching lines...) Expand all
71 if (SEC_ASN1EncodeItem (arena, encodedValue, value, 71 if (SEC_ASN1EncodeItem (arena, encodedValue, value,
72 CERTAuthKeyIDTemplate) == NULL) 72 CERTAuthKeyIDTemplate) == NULL)
73 break; 73 break;
74 rv = SECSuccess; 74 rv = SECSuccess;
75 75
76 } while (0); 76 } while (0);
77 return(rv); 77 return(rv);
78 } 78 }
79 79
80 CERTAuthKeyID * 80 CERTAuthKeyID *
81 CERT_DecodeAuthKeyID (PRArenaPool *arena, const SECItem *encodedValue) 81 CERT_DecodeAuthKeyID (PLArenaPool *arena, const SECItem *encodedValue)
82 { 82 {
83 CERTAuthKeyID * value = NULL; 83 CERTAuthKeyID * value = NULL;
84 SECStatus rv = SECFailure; 84 SECStatus rv = SECFailure;
85 void * mark; 85 void * mark;
86 SECItem newEncodedValue; 86 SECItem newEncodedValue;
87 87
88 PORT_Assert (arena); 88 PORT_Assert (arena);
89 89
90 do { 90 do {
91 mark = PORT_ArenaMark (arena); 91 mark = PORT_ArenaMark (arena);
(...skipping 27 matching lines...) Expand all
119 } 119 }
120 } while (0); 120 } while (0);
121 121
122 if (rv != SECSuccess) { 122 if (rv != SECSuccess) {
123 PORT_ArenaRelease (arena, mark); 123 PORT_ArenaRelease (arena, mark);
124 return ((CERTAuthKeyID *)NULL); 124 return ((CERTAuthKeyID *)NULL);
125 } 125 }
126 PORT_ArenaUnmark(arena, mark); 126 PORT_ArenaUnmark(arena, mark);
127 return (value); 127 return (value);
128 } 128 }
OLDNEW
« no previous file with comments | « nss/lib/certdb/stanpcertdb.c ('k') | nss/lib/certdb/xbsconst.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698