Generate an error on an invalid directory.
[openssl.git] / crypto / x509 / by_dir.c
index 11725ec94c6e4e26facd6f8370e1cc72d66cfbe1..ee47582b0007d47babce2f408603b6194b19dbae 100644 (file)
@@ -192,7 +192,11 @@ int type;
        char *s,*ss,*p;
        char **pp;
 
-       if (dir == NULL) return(0);
+       if (dir == NULL || !*dir)
+           {
+           X509err(X509_F_ADD_CERT_DIR,X509_R_INVALID_DIRECTORY);
+           return 0;
+           }
 
        s=dir;
        p=s;