| 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 #include "cert.h" | 5 #include "cert.h" |
| 6 #include "secoid.h" | 6 #include "secoid.h" |
| 7 #include "secder.h" /* XXX remove this when remove the DERTemplates */ | 7 #include "secder.h" /* XXX remove this when remove the DERTemplates */ |
| 8 #include "secasn1.h" | 8 #include "secasn1.h" |
| 9 #include "secitem.h" | 9 #include "secitem.h" |
| 10 #include <stdarg.h> | 10 #include <stdarg.h> |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 } | 403 } |
| 404 | 404 |
| 405 SECStatus | 405 SECStatus |
| 406 CERT_AddRDN(CERTName *name, CERTRDN *rdn) | 406 CERT_AddRDN(CERTName *name, CERTRDN *rdn) |
| 407 { | 407 { |
| 408 name->rdns = (CERTRDN**) AddToArray(name->arena, (void**) name->rdns, rdn); | 408 name->rdns = (CERTRDN**) AddToArray(name->arena, (void**) name->rdns, rdn); |
| 409 return name->rdns ? SECSuccess : SECFailure; | 409 return name->rdns ? SECSuccess : SECFailure; |
| 410 } | 410 } |
| 411 | 411 |
| 412 SECStatus | 412 SECStatus |
| 413 CERT_CopyName(PRArenaPool *arena, CERTName *to, CERTName *from) | 413 CERT_CopyName(PRArenaPool *arena, CERTName *to, const CERTName *from) |
| 414 { | 414 { |
| 415 CERTRDN **rdns, *frdn, *trdn; | 415 CERTRDN **rdns, *frdn, *trdn; |
| 416 SECStatus rv = SECSuccess; | 416 SECStatus rv = SECSuccess; |
| 417 | 417 |
| 418 if (!to || !from) { | 418 if (!to || !from) { |
| 419 PORT_SetError(SEC_ERROR_INVALID_ARGS); | 419 PORT_SetError(SEC_ERROR_INVALID_ARGS); |
| 420 return SECFailure; | 420 return SECFailure; |
| 421 } | 421 } |
| 422 | 422 |
| 423 CERT_DestroyName(to); | 423 CERT_DestroyName(to); |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 } | 700 } |
| 701 | 701 |
| 702 avaValue.data = utf8Val; | 702 avaValue.data = utf8Val; |
| 703 avaValue.len = utf8ValLen; | 703 avaValue.len = utf8ValLen; |
| 704 } | 704 } |
| 705 | 705 |
| 706 retItem = SECITEM_DupItem(&avaValue); | 706 retItem = SECITEM_DupItem(&avaValue); |
| 707 PORT_FreeArena(newarena, PR_FALSE); | 707 PORT_FreeArena(newarena, PR_FALSE); |
| 708 return retItem; | 708 return retItem; |
| 709 } | 709 } |
| OLD | NEW |