| 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 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, SECItem *encodedValue) | 81 CERT_DecodeAuthKeyID (PRArenaPool *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 Loading... |
| 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 } |
| OLD | NEW |