2

I'm using the openssl downloaded in http://slproweb.com/products/Win32OpenSSL.html. The first one of the list. I installed it in windows x64 system. When I use openssl to work. It signed: WARNING: can't open config file: /usr/local/ssl/openssl.cnf Unable to load config info from /usr/local/ssl/openssl.cnf

I'm using windows and it have no /usr/.... instead of C:/... and the config file is in C:\OpenSSL-Win32\bin\openssl.cfg what can I do? how to change the config local.

ChaoHui Ye
  • 23
  • 1
  • 3

1 Answers1

2

The location of the configuration file can be affected by the environment variable OPENSSL_CONF.

Since OpenSSL 1.1, initialization via configuration happens automatically. If you need some explicit initialization, you would use OPENSSL_init_crypto.

Prior to version 1.1, you would use OPENSSL_config:

#include <openssl/conf.h>
void OPENSSL_config(const char *config_name);

DESCRIPTION: OPENSSL_config() configures OpenSSL using the standard openssl.cnf configuration file name using config_name.

NOTES: The environment variable OPENSSL_CONF can be set to specify the location of the configuration file.

jxh
  • 69,070
  • 8
  • 110
  • 193