Make no config file not an error. Move /dev/crypto config to ctrl.
[openssl.git] / crypto / conf / conf_def.c
index 04d128bc75b529a5216dd395c55f2764418b887a..20b0760fcd958f835b99a4640d74aa4db240f6b4 100644 (file)
@@ -192,7 +192,10 @@ static int def_load(CONF *conf, const char *name, long *line)
 #endif
        if (in == NULL)
                {
-               CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB);
+               if(ERR_GET_REASON(ERR_peek_top_error()) == BIO_R_NO_SUCH_FILE)
+                       CONFerr(CONF_F_CONF_LOAD,CONF_R_NO_SUCH_FILE);
+               else
+                       CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB);
                return 0;
                }