Permit nested ASN1 string encoding but with a maximum depth to avoid
[oweals/openssl.git] / crypto / conf / conf_err.c
index 62506897462eebd902e5540f840b39de959cc87d..a16a5e0bd44bca41bac0921f3ef3777b86c6a6a3 100644 (file)
@@ -118,15 +118,12 @@ static ERR_STRING_DATA CONF_str_reasons[]=
 
 void ERR_load_CONF_strings(void)
        {
-       static int init=1;
+#ifndef OPENSSL_NO_ERR
 
-       if (init)
+       if (ERR_func_error_string(CONF_str_functs[0].error) == NULL)
                {
-               init=0;
-#ifndef OPENSSL_NO_ERR
                ERR_load_strings(0,CONF_str_functs);
                ERR_load_strings(0,CONF_str_reasons);
-#endif
-
                }
+#endif
        }