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 /* | 5 /* |
6 * X.509 Extension Encoding·· | 6 * X.509 Extension Encoding·· |
7 */ | 7 */ |
8 | 8 |
9 #include "prtypes.h" | 9 #include "prtypes.h" |
10 #include "seccomon.h" | 10 #include "seccomon.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 0, NULL, sizeof(CERTAuthInfoAccess) }, | 55 0, NULL, sizeof(CERTAuthInfoAccess) }, |
56 { SEC_ASN1_OBJECT_ID, | 56 { SEC_ASN1_OBJECT_ID, |
57 offsetof(CERTAuthInfoAccess, method) }, | 57 offsetof(CERTAuthInfoAccess, method) }, |
58 { SEC_ASN1_ANY, | 58 { SEC_ASN1_ANY, |
59 offsetof(CERTAuthInfoAccess, derLocation) }, | 59 offsetof(CERTAuthInfoAccess, derLocation) }, |
60 { 0 } | 60 { 0 } |
61 }; | 61 }; |
62 | 62 |
63 const SEC_ASN1Template CERTAuthInfoAccessTemplate[] = { | 63 const SEC_ASN1Template CERTAuthInfoAccessTemplate[] = { |
64 { SEC_ASN1_SEQUENCE_OF, 0, CERTAuthInfoAccessItemTemplate } | 64 { SEC_ASN1_SEQUENCE_OF, 0, CERTAuthInfoAccessItemTemplate } |
65 }; | 65 }; |
66 | 66 |
67 | |
68 SECStatus· | 67 SECStatus· |
69 CERT_EncodeSubjectKeyID(PLArenaPool *arena, const SECItem* srcString, | 68 CERT_EncodeSubjectKeyID(PLArenaPool *arena, const SECItem* srcString, |
70 SECItem *encodedValue) | 69 SECItem *encodedValue) |
71 { | 70 { |
72 SECStatus rv = SECSuccess; | 71 SECStatus rv = SECSuccess; |
73 | 72 |
74 if (!srcString) { | 73 if (!srcString) { |
75 PORT_SetError(SEC_ERROR_INVALID_ARGS); | 74 PORT_SetError(SEC_ERROR_INVALID_ARGS); |
76 return SECFailure; | 75 return SECFailure; |
77 } | 76 } |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 /* Note that this may leave some of the locations filled in. */ | 276 /* Note that this may leave some of the locations filled in. */ |
278 return SECFailure; | 277 return SECFailure; |
279 } | 278 } |
280 dummy = SEC_ASN1EncodeItem(arena, dest, &info, | 279 dummy = SEC_ASN1EncodeItem(arena, dest, &info, |
281 CERTAuthInfoAccessTemplate); | 280 CERTAuthInfoAccessTemplate); |
282 if (dummy == NULL) { | 281 if (dummy == NULL) { |
283 return SECFailure; | 282 return SECFailure; |
284 } | 283 } |
285 return SECSuccess; | 284 return SECSuccess; |
286 } | 285 } |
OLD | NEW |