- Add ppp-compiling-with-clang-encounters-an-error-in-eap-tls..patch that fixed the following rpmlint error: executable-stack (Badness: 10000) /usr/sbin/pppd OBS-URL: https://build.opensuse.org/request/show/979388 OBS-URL: https://build.opensuse.org/package/show/network/ppp?expand=0&rev=71
55 lines
2.0 KiB
Diff
55 lines
2.0 KiB
Diff
diff --git a/pppd/eap-tls.c b/pppd/eap-tls.c
|
|
index 5740f30..46a4d5b 100644
|
|
--- a/pppd/eap-tls.c
|
|
+++ b/pppd/eap-tls.c
|
|
@@ -280,6 +280,23 @@ ENGINE *eaptls_ssl_load_engine( char *engine_name )
|
|
|
|
|
|
|
|
+#ifndef OPENSSL_NO_ENGINE
|
|
+static int eaptls_UI_writer(UI *ui, UI_STRING *uis)
|
|
+{
|
|
+ PW_CB_DATA* cb_data = (PW_CB_DATA*)UI_get0_user_data(ui);
|
|
+ UI_set_result(ui, uis, cb_data->password);
|
|
+ return 1;
|
|
+}
|
|
+
|
|
+static int eaptls_UI_stub(UI* ui) {
|
|
+ return 1;
|
|
+}
|
|
+
|
|
+static int eaptls_UI_reader(UI *ui, UI_STRING *uis) {
|
|
+ return 1;
|
|
+}
|
|
+#endif
|
|
+
|
|
/*
|
|
* Initialize the SSL stacks and tests if certificates, key and crl
|
|
* for client or server use can be loaded.
|
|
@@ -516,20 +533,11 @@ SSL_CTX *eaptls_init_ssl(int init_server, char *cacertfile, char *capath,
|
|
{
|
|
UI_METHOD* transfer_pin = UI_create_method("transfer_pin");
|
|
|
|
- int writer (UI *ui, UI_STRING *uis)
|
|
- {
|
|
- PW_CB_DATA* cb_data = (PW_CB_DATA*)UI_get0_user_data(ui);
|
|
- UI_set_result(ui, uis, cb_data->password);
|
|
- return 1;
|
|
- };
|
|
- int stub (UI* ui) {return 1;};
|
|
- int stub_reader (UI *ui, UI_STRING *uis) {return 1;};
|
|
-
|
|
- UI_method_set_writer(transfer_pin, writer);
|
|
- UI_method_set_opener(transfer_pin, stub);
|
|
- UI_method_set_closer(transfer_pin, stub);
|
|
- UI_method_set_flusher(transfer_pin, stub);
|
|
- UI_method_set_reader(transfer_pin, stub_reader);
|
|
+ UI_method_set_writer(transfer_pin, eaptls_UI_writer);
|
|
+ UI_method_set_opener(transfer_pin, eaptls_UI_stub);
|
|
+ UI_method_set_closer(transfer_pin, eaptls_UI_stub);
|
|
+ UI_method_set_flusher(transfer_pin, eaptls_UI_stub);
|
|
+ UI_method_set_reader(transfer_pin, eaptls_UI_reader);
|
|
|
|
dbglog( "Using our private key '%s' in engine", pkey_identifier );
|
|
pkey = ENGINE_load_private_key(pkey_engine, pkey_identifier, transfer_pin, &cb_data);
|