]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test_keyexpimp.c
MSVC: Fix absence of 'setenv'
[openssl-gost/engine.git] / test_keyexpimp.c
index 31a42f7260c041faabe7bee50f7ea6904fc76686..0fa549bf4bbfeddee0e5fda969ea19abbc38feac 100644 (file)
@@ -6,6 +6,7 @@
  */
 #ifdef _MSC_VER
 # include <Winsock2.h>
+# include <stdlib.h>
 #else
 # include <arpa/inet.h>
 #endif
@@ -108,7 +109,11 @@ int main(void)
     unsigned char tlsseq[8];
     unsigned char out[32];
 
+#ifdef _MSC_VER
+    _putenv_s("OPENSSL_ENGINES", ENGINE_DIR);
+#else
     setenv("OPENSSL_ENGINES", ENGINE_DIR, 0);
+#endif
     OPENSSL_add_all_algorithms_conf();
     ERR_load_crypto_strings();
     ENGINE *eng;