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_trustanchor.c | 5 * pkix_trustanchor.c |
6 * | 6 * |
7 * TrustAnchor Object Functions | 7 * TrustAnchor Object Functions |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 /* initialize fields */ | 362 /* initialize fields */ |
363 PKIX_CHECK( | 363 PKIX_CHECK( |
364 PKIX_PL_Cert_SetAsTrustAnchor(cert, plContext), | 364 PKIX_PL_Cert_SetAsTrustAnchor(cert, plContext), |
365 PKIX_CERTSETASTRUSTANCHORFAILED); | 365 PKIX_CERTSETASTRUSTANCHORFAILED); |
366 | 366 |
367 PKIX_INCREF(cert); | 367 PKIX_INCREF(cert); |
368 anchor->trustedCert = cert; | 368 anchor->trustedCert = cert; |
369 | 369 |
370 anchor->caName = NULL; | 370 anchor->caName = NULL; |
371 anchor->caPubKey = NULL; | 371 anchor->caPubKey = NULL; |
372 anchor->nameConstraints = NULL; | 372 |
| 373 PKIX_CHECK(PKIX_PL_Cert_GetNameConstraints |
| 374 (anchor->trustedCert, &anchor->nameConstraints, plContext), |
| 375 PKIX_CERTGETNAMECONSTRAINTSFAILED); |
| 376 |
373 | 377 |
374 *pAnchor = anchor; | 378 *pAnchor = anchor; |
375 anchor = NULL; | 379 anchor = NULL; |
376 | 380 |
377 cleanup: | 381 cleanup: |
378 | 382 |
379 PKIX_DECREF(anchor); | 383 PKIX_DECREF(anchor); |
380 | 384 |
381 PKIX_RETURN(TRUSTANCHOR); | 385 PKIX_RETURN(TRUSTANCHOR); |
382 | 386 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 PKIX_ENTER(TRUSTANCHOR, "PKIX_TrustAnchor_GetNameConstraints"); | 516 PKIX_ENTER(TRUSTANCHOR, "PKIX_TrustAnchor_GetNameConstraints"); |
513 PKIX_NULLCHECK_TWO(anchor, pNameConstraints); | 517 PKIX_NULLCHECK_TWO(anchor, pNameConstraints); |
514 | 518 |
515 PKIX_INCREF(anchor->nameConstraints); | 519 PKIX_INCREF(anchor->nameConstraints); |
516 | 520 |
517 *pNameConstraints = anchor->nameConstraints; | 521 *pNameConstraints = anchor->nameConstraints; |
518 | 522 |
519 cleanup: | 523 cleanup: |
520 PKIX_RETURN(TRUSTANCHOR); | 524 PKIX_RETURN(TRUSTANCHOR); |
521 } | 525 } |
OLD | NEW |