int load_config(BIO *err, CONF *cnf)
	{
	static int load_config_called = 0;
	if (load_config_called)
		return 1;
	load_config_called = 1;
	if (!cnf)
		cnf = config;
	if (!cnf)
		return 1;

	OPENSSL_load_builtin_modules();

	if (CONF_modules_load(cnf, NULL, 0) <= 0)
		{
		BIO_printf(err, "Error configuring OpenSSL\n");
		ERR_print_errors(err);
		return 0;
		}
	return 1;
	}
int load_config(BIO *err, CONF *cnf)
	{
	static int load_config_called = 0;
	if (load_config_called)
		return 1;
	load_config_called = 1;
	if (!cnf)
		cnf = config;
	if (!cnf)
		return 1;

	OPENSSL_load_builtin_modules();

	if (CONF_modules_load(cnf, NULL, 0) <= 0)
		{
		BIO_printf(err, "Error configuring OpenSSL\n");
		ERR_print_errors(err);
		return 0;
		}
	return 1;
	}