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_certselector.c | 5 * pkix_certselector.c |
6 * | 6 * |
7 * CertSelector Object Functions | 7 * CertSelector Object Functions |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 PKIX_PL_CertNameConstraints *nameConstraints = NULL; | 418 PKIX_PL_CertNameConstraints *nameConstraints = NULL; |
419 | 419 |
420 PKIX_ENTER(CERTSELECTOR, "pkix_CertSelector_Match_NameConstraints"); | 420 PKIX_ENTER(CERTSELECTOR, "pkix_CertSelector_Match_NameConstraints"); |
421 PKIX_NULLCHECK_THREE(params, cert, pResult); | 421 PKIX_NULLCHECK_THREE(params, cert, pResult); |
422 | 422 |
423 PKIX_CHECK(PKIX_ComCertSelParams_GetNameConstraints | 423 PKIX_CHECK(PKIX_ComCertSelParams_GetNameConstraints |
424 (params, &nameConstraints, plContext), | 424 (params, &nameConstraints, plContext), |
425 PKIX_COMCERTSELPARAMSGETNAMECONSTRAINTSFAILED); | 425 PKIX_COMCERTSELPARAMSGETNAMECONSTRAINTSFAILED); |
426 | 426 |
427 if (nameConstraints != NULL) { | 427 if (nameConstraints != NULL) { |
428 | 428 /* As only the end-entity certificate should have |
| 429 * the common name constrained as if it was a dNSName, |
| 430 * do not constrain the common name when building a |
| 431 * forward path. |
| 432 */ |
429 PKIX_CHECK(PKIX_PL_Cert_CheckNameConstraints | 433 PKIX_CHECK(PKIX_PL_Cert_CheckNameConstraints |
430 (cert, nameConstraints, plContext), | 434 (cert, nameConstraints, PKIX_FALSE, plContext), |
431 PKIX_CERTCHECKNAMECONSTRAINTSFAILED); | 435 PKIX_CERTCHECKNAMECONSTRAINTSFAILED); |
432 } | 436 } |
433 | 437 |
434 cleanup: | 438 cleanup: |
435 if (PKIX_ERROR_RECEIVED) { | 439 if (PKIX_ERROR_RECEIVED) { |
436 *pResult = PKIX_FALSE; | 440 *pResult = PKIX_FALSE; |
437 } | 441 } |
438 | 442 |
439 PKIX_DECREF(nameConstraints); | 443 PKIX_DECREF(nameConstraints); |
440 PKIX_RETURN(CERTSELECTOR); | 444 PKIX_RETURN(CERTSELECTOR); |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1624 filtered = NULL; | 1628 filtered = NULL; |
1625 | 1629 |
1626 cleanup: | 1630 cleanup: |
1627 | 1631 |
1628 PKIX_DECREF(filtered); | 1632 PKIX_DECREF(filtered); |
1629 PKIX_DECREF(candidate); | 1633 PKIX_DECREF(candidate); |
1630 | 1634 |
1631 PKIX_RETURN(CERTSELECTOR); | 1635 PKIX_RETURN(CERTSELECTOR); |
1632 | 1636 |
1633 } | 1637 } |
OLD | NEW |