Juan Lang : crypt32: Correct error when a constrained, permitted name type isn't found in the subject name.

Alexandre Julliard julliard at winehq.org
Tue Nov 10 09:39:15 CST 2009


Module: wine
Branch: master
Commit: ee02d43731e945ac8045b81d44898786144874af
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ee02d43731e945ac8045b81d44898786144874af

Author: Juan Lang <juan.lang at gmail.com>
Date:   Mon Nov  9 16:52:00 2009 -0800

crypt32: Correct error when a constrained, permitted name type isn't found in the subject name.

---

 dlls/crypt32/chain.c       |    4 +++-
 dlls/crypt32/tests/chain.c |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index eab7f00..c6eaaec 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -699,7 +699,8 @@ static void CRYPT_CheckNameConstraints(
                     CRYPT_FindMatchingNameEntry(
                      &nameConstraints->rgPermittedSubtree[i].Base, subjectName,
                      trustErrorStatus,
-                     0, CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT);
+                     CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT,
+                     CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT);
                 LocalFree(subjectName);
             }
             else
@@ -711,6 +712,7 @@ static void CRYPT_CheckNameConstraints(
         {
             if (nameConstraints->cPermittedSubtree)
                 *trustErrorStatus |=
+                 CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
                  CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT;
             if (nameConstraints->cExcludedSubtree)
                 *trustErrorStatus |=
diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
index 1994d85..2209e1f 100644
--- a/dlls/crypt32/tests/chain.c
+++ b/dlls/crypt32/tests/chain.c
@@ -2731,7 +2731,7 @@ static ChainCheck chainCheck[] = {
      { CERT_TRUST_IS_UNTRUSTED_ROOT |
        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT, 0 },
      1, simpleStatus19 },
-   TODO_ERROR },
+   0 },
  { { sizeof(chain20) / sizeof(chain20[0]), chain20 },
    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
        CERT_TRUST_HAS_PREFERRED_ISSUER },
@@ -2746,7 +2746,7 @@ static ChainCheck chainCheck[] = {
      { CERT_TRUST_IS_UNTRUSTED_ROOT |
        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT, 0 },
      1, simpleStatus21 },
-   TODO_ERROR },
+   0 },
  { { sizeof(chain22) / sizeof(chain22[0]), chain22 },
    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
        CERT_TRUST_HAS_PREFERRED_ISSUER },




More information about the wine-cvs mailing list