| 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 * pkix_pl_crldp.c | 5 * pkix_pl_crldp.c |
| 6 * | 6 * |
| 7 * Crl DP Object Functions | 7 * Crl DP Object Functions |
| 8 * | 8 * |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 PKIX_ERROR(PKIX_NOTCONFORMINGCRLDP); | 115 PKIX_ERROR(PKIX_NOTCONFORMINGCRLDP); |
| 116 } | 116 } |
| 117 issuerName = &dp->crlIssuer->name.directoryName; | 117 issuerName = &dp->crlIssuer->name.directoryName; |
| 118 } else { | 118 } else { |
| 119 issuerName = certIssuerName; | 119 issuerName = certIssuerName; |
| 120 } | 120 } |
| 121 rdnArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); | 121 rdnArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); |
| 122 if (!rdnArena) { | 122 if (!rdnArena) { |
| 123 PKIX_ERROR(PKIX_PORTARENAALLOCFAILED); | 123 PKIX_ERROR(PKIX_PORTARENAALLOCFAILED); |
| 124 } | 124 } |
| 125 issuerNameCopy = (CERTName *)PORT_ArenaZNew(rdnArena, CERTName*); | 125 issuerNameCopy = (CERTName *)PORT_ArenaZNew(rdnArena, CERTName); |
| 126 if (!issuerNameCopy) { | 126 if (!issuerNameCopy) { |
| 127 PKIX_ERROR(PKIX_ALLOCERROR); | 127 PKIX_ERROR(PKIX_ALLOCERROR); |
| 128 } | 128 } |
| 129 rv = CERT_CopyName(rdnArena, issuerNameCopy, (CERTName*)issuerName); | 129 rv = CERT_CopyName(rdnArena, issuerNameCopy, (CERTName*)issuerName); |
| 130 if (rv == SECFailure) { | 130 if (rv == SECFailure) { |
| 131 PKIX_ERROR(PKIX_ALLOCERROR); | 131 PKIX_ERROR(PKIX_ALLOCERROR); |
| 132 } | 132 } |
| 133 rv = CERT_AddRDN(issuerNameCopy, (CERTRDN*)relName); | 133 rv = CERT_AddRDN(issuerNameCopy, (CERTRDN*)relName); |
| 134 if (rv == SECFailure) { | 134 if (rv == SECFailure) { |
| 135 PKIX_ERROR(PKIX_ALLOCERROR); | 135 PKIX_ERROR(PKIX_ALLOCERROR); |
| 136 } | 136 } |
| 137 dpl->distPointType = relativeDistinguishedName; | 137 dpl->distPointType = relativeDistinguishedName; |
| 138 dpl->name.issuerName = issuerNameCopy; | 138 dpl->name.issuerName = issuerNameCopy; |
| 139 rdnArena = NULL; | 139 rdnArena = NULL; |
| 140 } | 140 } |
| 141 *pPkixDP = dpl; | 141 *pPkixDP = dpl; |
| 142 dpl = NULL; | 142 dpl = NULL; |
| 143 | 143 |
| 144 cleanup: | 144 cleanup: |
| 145 if (rdnArena) { | 145 if (rdnArena) { |
| 146 PORT_FreeArena(rdnArena, PR_FALSE); | 146 PORT_FreeArena(rdnArena, PR_FALSE); |
| 147 } | 147 } |
| 148 PKIX_DECREF(dpl); | 148 PKIX_DECREF(dpl); |
| 149 | 149 |
| 150 PKIX_RETURN(CRLDP); | 150 PKIX_RETURN(CRLDP); |
| 151 } | 151 } |
| OLD | NEW |