Previously this x509 command line was working, restore that
[openssl.git] / crypto / conf / conf_sap.c
index a1c25b3ee6765acc5038f4e99769c9339ac99ac2..3d2e065e5b07c54d42c46b11d8f0830fe257bdaf 100644 (file)
 #include <stdio.h>
 #include <openssl/crypto.h>
 #include "internal/cryptlib.h"
-#include <internal/conf.h>
+#include "internal/conf.h"
 #include <openssl/x509.h>
 #include <openssl/asn1.h>
 #include <openssl/engine.h>
 
+#ifdef _WIN32
+# define strdup _strdup
+#endif
+
 /*
  * This is the automatic configuration loader: it is called automatically by
  * OpenSSL when any of a number of standard initialisation functions are
 static int openssl_configured = 0;
 
 #if OPENSSL_API_COMPAT < 0x10100000L
-void OPENSSL_config(const char *config_name)
+void OPENSSL_config(const char *appname)
 {
     OPENSSL_INIT_SETTINGS settings;
 
     memset(&settings, 0, sizeof(settings));
-    if (config_name != NULL)
-        settings.config_name = strdup(config_name);
+    if (appname != NULL)
+        settings.appname = strdup(appname);
     OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, &settings);
 }
 #endif
 
-void openssl_config_int(const char *config_name)
+void openssl_config_int(const char *appname)
 {
     if (openssl_configured)
         return;
@@ -47,7 +51,7 @@ void openssl_config_int(const char *config_name)
 #endif
     ERR_clear_error();
 #ifndef OPENSSL_SYS_UEFI
-    CONF_modules_load_file(NULL, config_name,
+    CONF_modules_load_file(NULL, appname,
                                CONF_MFLAGS_DEFAULT_SECTION |
                                CONF_MFLAGS_IGNORE_MISSING_FILE);
 #endif