]> git.ozlabs.org Git - ppp.git/blob - pppd/eap-tls.c.rej
Add support for EAP-TLS (including experimental TLS v1.3 support).
[ppp.git] / pppd / eap-tls.c.rej
1 --- pppd/eap-tls.c
2 +++ pppd/eap-tls.c
3 @@ -328,11 +328,12 @@ SSL_CTX *eaptls_init_ssl(int init_server, char *cacertfile, char *capath,
4  
5         SSL_library_init();
6         SSL_load_error_strings();
7 -       /* load the openssl config file only once */
8 -        if (!ssl_config)
9 -        {
10 -                ssl_config = eaptls_ssl_load_config();
11 -       }
12 +
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()
15 +        */
16 +       if (!ssl_config)
17 +               ssl_config = eaptls_ssl_load_config();
18  
19         ctx = SSL_CTX_new(TLS_method());
20  
21 @@ -403,13 +404,12 @@ SSL_CTX *eaptls_init_ssl(int init_server, char *cacertfile, char *capath,
22                                 pkey_identifier = cert_identifier;
23                         }
24                 }
25 -
26         }
27  
28         if (ssl_config && cert_engine_name)
29                 cert_engine = eaptls_ssl_load_engine( cert_engine_name );
30  
31 -       if (pkey_engine_name)
32 +       if (ssl_config && pkey_engine_name)
33         {
34                 /* don't load the same engine twice */
35                 if ( cert_engine && strcmp( cert_engine_name, pkey_engine_name) == 0 )