Add nameConstraints commonName checking.
[openssl.git] / crypto / x509 / x509_vfy.c
index c8ebc5085784c63f43b67daff445ef8684b598d6..469a0a869366091c3261740f566c0e7eecf409c7 100644 (file)
@@ -651,6 +651,10 @@ static int check_name_constraints(X509_STORE_CTX *ctx)
             if (nc) {
                 int rv = NAME_CONSTRAINTS_check(x, nc);
 
+                /* If EE certificate check commonName too */
+                if (rv == X509_V_OK && i == 0)
+                    rv = NAME_CONSTRAINTS_check_CN(x, nc);
+
                 switch (rv) {
                 case X509_V_OK:
                     break;