3 @@ -328,11 +328,12 @@ SSL_CTX *eaptls_init_ssl(int init_server, char *cacertfile, char *capath,
6 SSL_load_error_strings();
7 - /* load the openssl config file only once */
10 - ssl_config = eaptls_ssl_load_config();
13 + /* load the openssl config file only once and load it before triggering
14 + the loading of a global openssl config file via SSL_CTX_new()
17 + ssl_config = eaptls_ssl_load_config();
19 ctx = SSL_CTX_new(TLS_method());
21 @@ -403,13 +404,12 @@ SSL_CTX *eaptls_init_ssl(int init_server, char *cacertfile, char *capath,
22 pkey_identifier = cert_identifier;
28 if (ssl_config && cert_engine_name)
29 cert_engine = eaptls_ssl_load_engine( cert_engine_name );
31 - if (pkey_engine_name)
32 + if (ssl_config && pkey_engine_name)
34 /* don't load the same engine twice */
35 if ( cert_engine && strcmp( cert_engine_name, pkey_engine_name) == 0 )