- Update to latest development release; remove upstreamed patches
This commit is contained in:
parent
8c8f86cedd
commit
a3815518cd
24 changed files with 106 additions and 1047 deletions
|
|
@ -5,3 +5,4 @@ wpa_supplicant-0.4.8.tar.gz
|
|||
madwifi-headers-r1475.tar.bz2
|
||||
wpa_supplicant-0.4.9.tar.gz
|
||||
wpa_supplicant-0.5.7.tar.gz
|
||||
wpa_supplicant-0.6.3.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
[D-BUS Service]
|
||||
Name=fi.epitest.hostap.WPASupplicant
|
||||
Exec=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u -f
|
||||
User=root
|
||||
|
||||
2
sources
2
sources
|
|
@ -1,2 +1,2 @@
|
|||
b82289b140cc1c66db11564bde248d8a madwifi-headers-r1475.tar.bz2
|
||||
bd2436392ad3c6d2513da701a12f2d27 wpa_supplicant-0.5.7.tar.gz
|
||||
b51b2975f21006f85f7297f3fb1acde1 wpa_supplicant-0.6.3.tar.gz
|
||||
|
|
|
|||
9
wpa_supplicant-0.5.10-dbus-service-file.patch
Normal file
9
wpa_supplicant-0.5.10-dbus-service-file.patch
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
diff -up wpa_supplicant-0.6.3/wpa_supplicant/dbus-wpa_supplicant.service.fedora wpa_supplicant-0.6.3/wpa_supplicant/dbus-wpa_supplicant.service
|
||||
--- wpa_supplicant-0.6.3/wpa_supplicant/dbus-wpa_supplicant.service.fedora 2008-03-02 20:58:35.000000000 -0500
|
||||
+++ wpa_supplicant-0.6.3/wpa_supplicant/dbus-wpa_supplicant.service 2008-03-02 20:58:41.000000000 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
[D-BUS Service]
|
||||
Name=fi.epitest.hostap.WPASupplicant
|
||||
-Exec=/sbin/wpa_supplicant -u
|
||||
+Exec=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u -f /var/log/wpa_supplicant.log
|
||||
User=root
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up wpa_supplicant-0.5.7/wpa_supplicant.c.always-scan wpa_supplicant-0.5.7/wpa_supplicant.c
|
||||
--- wpa_supplicant-0.5.7/wpa_supplicant.c.always-scan 2007-09-25 15:51:35.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/wpa_supplicant.c 2007-09-25 16:31:27.000000000 -0400
|
||||
@@ -972,7 +972,7 @@ static void wpa_supplicant_scan(void *el
|
||||
struct wpa_ssid *ssid;
|
||||
int enabled, scan_req = 0, ret;
|
||||
|
||||
- if (wpa_s->disconnected)
|
||||
+ if (wpa_s->disconnected && !wpa_s->scan_req)
|
||||
return;
|
||||
|
||||
enabled = 0;
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
diff --git a/wpa_supplicant/ctrl_iface_dbus.c b/wpa_supplicant/ctrl_iface_dbus.c
|
||||
index 1d66c96..8e236e8 100644
|
||||
--- a/wpa_supplicant/ctrl_iface_dbus.c
|
||||
+++ b/wpa_supplicant/ctrl_iface_dbus.c
|
||||
@@ -536,6 +536,10 @@ static DBusHandlerResult wpas_iface_message_handler(DBusConnection *connection,
|
||||
reply = wpas_dbus_iface_set_ap_scan(message, wpa_s);
|
||||
else if (!strcmp(method, "state"))
|
||||
reply = wpas_dbus_iface_get_state(message, wpa_s);
|
||||
+ else if (!strcmp(method, "setBlobs"))
|
||||
+ reply = wpas_dbus_iface_set_blobs(message, wpa_s);
|
||||
+ else if (!strcmp(method, "removeBlobs"))
|
||||
+ reply = wpas_dbus_iface_remove_blobs(message, wpa_s);
|
||||
}
|
||||
|
||||
/* If the message was handled, send back the reply */
|
||||
diff --git a/wpa_supplicant/ctrl_iface_dbus_handlers.c b/wpa_supplicant/ctrl_iface_dbus_handlers.c
|
||||
index 5e952ec..3ece2fe 100644
|
||||
--- a/wpa_supplicant/ctrl_iface_dbus_handlers.c
|
||||
+++ b/wpa_supplicant/ctrl_iface_dbus_handlers.c
|
||||
@@ -1203,3 +1203,129 @@ DBusMessage * wpas_dbus_iface_get_state(DBusMessage *message,
|
||||
|
||||
return reply;
|
||||
}
|
||||
+
|
||||
+
|
||||
+/**
|
||||
+ * wpas_dbus_iface_set_blobs - Store named binary blobs (ie, for certificates)
|
||||
+ * @message: Pointer to incoming dbus message
|
||||
+ * @global: %wpa_supplicant global data structure
|
||||
+ * Returns: A dbus message containing a UINT32 indicating success (1) or
|
||||
+ * failure (0)
|
||||
+ *
|
||||
+ * Asks wpa_supplicant to internally store a one or more binary blobs.
|
||||
+ */
|
||||
+DBusMessage * wpas_dbus_iface_set_blobs(DBusMessage *message,
|
||||
+ struct wpa_supplicant *wpa_s)
|
||||
+{
|
||||
+ DBusMessage *reply = NULL;
|
||||
+ struct wpa_dbus_dict_entry entry = { .type = DBUS_TYPE_STRING };
|
||||
+ DBusMessageIter iter, iter_dict;
|
||||
+
|
||||
+ dbus_message_iter_init(message, &iter);
|
||||
+
|
||||
+ if (!wpa_dbus_dict_open_read(&iter, &iter_dict))
|
||||
+ return wpas_dbus_new_invalid_opts_error(message, NULL);
|
||||
+
|
||||
+ while (wpa_dbus_dict_has_dict_entry(&iter_dict)) {
|
||||
+ struct wpa_config_blob *blob;
|
||||
+
|
||||
+ if (!wpa_dbus_dict_get_entry(&iter_dict, &entry)) {
|
||||
+ reply = wpas_dbus_new_invalid_opts_error(message, NULL);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (entry.type != DBUS_TYPE_ARRAY ||
|
||||
+ entry.array_type != DBUS_TYPE_BYTE) {
|
||||
+ reply = wpas_dbus_new_invalid_opts_error(message,
|
||||
+ "Byte array expected.");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if ( (entry.array_len <= 0)
|
||||
+ || (entry.array_len > 65536)
|
||||
+ || !strlen(entry.key)) {
|
||||
+ reply = wpas_dbus_new_invalid_opts_error(message,
|
||||
+ "Invalid array size.");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ blob = os_zalloc(sizeof(*blob));
|
||||
+ if (blob == NULL) {
|
||||
+ reply = dbus_message_new_error(message,
|
||||
+ WPAS_ERROR_ADD_ERROR,
|
||||
+ "Not enough memory to add blob.");
|
||||
+ break;
|
||||
+ }
|
||||
+ blob->data = os_zalloc(entry.array_len);
|
||||
+ if (blob->data == NULL) {
|
||||
+ reply = dbus_message_new_error(message,
|
||||
+ WPAS_ERROR_ADD_ERROR,
|
||||
+ "Not enough memory to add blob data.");
|
||||
+ os_free(blob);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ blob->name = os_strdup(entry.key);
|
||||
+ blob->len = entry.array_len;
|
||||
+ os_memcpy(blob->data, (u8 *) entry.bytearray_value,
|
||||
+ entry.array_len);
|
||||
+ if (blob->name == NULL || blob->data == NULL) {
|
||||
+ wpa_config_free_blob(blob);
|
||||
+ reply = dbus_message_new_error(message,
|
||||
+ WPAS_ERROR_ADD_ERROR,
|
||||
+ "Error adding blob.");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Success */
|
||||
+ wpa_config_remove_blob(wpa_s->conf, blob->name);
|
||||
+ wpa_config_set_blob(wpa_s->conf, blob);
|
||||
+ wpa_dbus_dict_entry_clear(&entry);
|
||||
+ }
|
||||
+ wpa_dbus_dict_entry_clear(&entry);
|
||||
+
|
||||
+ return reply ? reply : wpas_dbus_new_success_reply(message);;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * wpas_dbus_iface_remove_blob - Remove named binary blobs
|
||||
+ * @message: Pointer to incoming dbus message
|
||||
+ * @global: %wpa_supplicant global data structure
|
||||
+ * Returns: A dbus message containing a UINT32 indicating success (1) or
|
||||
+ * failure (0)
|
||||
+ *
|
||||
+ * Asks wpa_supplicant to remove one or more previously stored binary blobs.
|
||||
+ */
|
||||
+DBusMessage * wpas_dbus_iface_remove_blobs(DBusMessage *message,
|
||||
+ struct wpa_supplicant *wpa_s)
|
||||
+{
|
||||
+ DBusMessageIter iter, array;
|
||||
+ char *err_msg = NULL;
|
||||
+
|
||||
+ dbus_message_iter_init(message, &iter);
|
||||
+
|
||||
+ if ((dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_ARRAY)
|
||||
+ || (dbus_message_iter_get_element_type (&iter) != DBUS_TYPE_STRING))
|
||||
+ return wpas_dbus_new_invalid_opts_error(message, NULL);
|
||||
+
|
||||
+ dbus_message_iter_recurse(&iter, &array);
|
||||
+ while (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_STRING) {
|
||||
+ const char *name;
|
||||
+
|
||||
+ dbus_message_iter_get_basic(&array, &name);
|
||||
+ if (!strlen(name))
|
||||
+ err_msg = "Invalid blob name.";
|
||||
+
|
||||
+ if (wpa_config_remove_blob(wpa_s->conf, name) != 0)
|
||||
+ err_msg = "Error removing blob.";
|
||||
+ dbus_message_iter_next(&array);
|
||||
+ }
|
||||
+
|
||||
+ if (err_msg) {
|
||||
+ return dbus_message_new_error(message, WPAS_ERROR_REMOVE_ERROR,
|
||||
+ err_msg);
|
||||
+ }
|
||||
+
|
||||
+ return wpas_dbus_new_success_reply(message);
|
||||
+}
|
||||
+
|
||||
diff --git a/wpa_supplicant/ctrl_iface_dbus_handlers.h b/wpa_supplicant/ctrl_iface_dbus_handlers.h
|
||||
index 0fd1d31..0ae94c4 100644
|
||||
--- a/wpa_supplicant/ctrl_iface_dbus_handlers.h
|
||||
+++ b/wpa_supplicant/ctrl_iface_dbus_handlers.h
|
||||
@@ -71,6 +71,12 @@ DBusMessage * wpas_dbus_iface_set_ap_scan(DBusMessage *message,
|
||||
DBusMessage * wpas_dbus_iface_get_state(DBusMessage *message,
|
||||
struct wpa_supplicant *wpa_s);
|
||||
|
||||
+DBusMessage * wpas_dbus_iface_set_blobs(DBusMessage *message,
|
||||
+ struct wpa_supplicant *wpa_s);
|
||||
+
|
||||
+DBusMessage * wpas_dbus_iface_remove_blobs(DBusMessage *message,
|
||||
+ struct wpa_supplicant *wpa_s);
|
||||
+
|
||||
#endif /* CONFIG_CTRL_IFACE_DBUS */
|
||||
|
||||
#endif /* CTRL_IFACE_DBUS_HANDLERS_H */
|
||||
diff -up wpa_supplicant-0.5.7/config.c.dbus-blobs wpa_supplicant-0.5.7/config.c
|
||||
--- a/wpa_supplicant-0.5.7/config.c.dbus-blobs 2007-10-24 16:41:37.000000000 -0400
|
||||
+++ b/wpa_supplicant-0.5.7/config.c 2007-10-24 16:41:49.000000000 -0400
|
||||
@@ -70,13 +70,14 @@ static char * wpa_config_parse_string(co
|
||||
if (hlen & 1)
|
||||
return NULL;
|
||||
*len = hlen / 2;
|
||||
- str = os_malloc(*len);
|
||||
+ str = os_malloc(*len + 1);
|
||||
if (str == NULL)
|
||||
return NULL;
|
||||
if (hexstr2bin(value, str, *len)) {
|
||||
os_free(str);
|
||||
return NULL;
|
||||
}
|
||||
+ str[*len] = '\0';
|
||||
return (char *) str;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff -up wpa_supplicant-0.5.7/wpa_supplicant.c.global-iface-segfault-fix wpa_supplicant-0.5.7/wpa_supplicant.c
|
||||
--- wpa_supplicant-0.5.7/wpa_supplicant.c.global-iface-segfault-fix 2007-10-09 17:34:25.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/wpa_supplicant.c 2007-10-09 17:35:17.000000000 -0400
|
||||
@@ -2352,7 +2352,8 @@ static void wpa_supplicant_deinit_iface(
|
||||
wpa_clear_keys(wpa_s, NULL);
|
||||
}
|
||||
|
||||
- wpas_dbus_unregister_iface(wpa_s);
|
||||
+ if (wpa_s->global)
|
||||
+ wpas_dbus_unregister_iface(wpa_s);
|
||||
|
||||
wpa_supplicant_cleanup(wpa_s);
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
diff -up wpa_supplicant-0.5.7/dbus-wpa_supplicant.conf.permfix wpa_supplicant-0.5.7/dbus-wpa_supplicant.conf
|
||||
--- wpa_supplicant-0.5.7/dbus-wpa_supplicant.conf.permfix 2007-10-20 07:42:01.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/dbus-wpa_supplicant.conf 2007-10-20 07:42:22.000000000 -0400
|
||||
@@ -8,10 +8,6 @@
|
||||
<allow send_destination="fi.epitest.hostap.WPASupplicant"/>
|
||||
<allow send_interface="fi.epitest.hostap.WPASupplicant"/>
|
||||
</policy>
|
||||
- <policy at_console="true">
|
||||
- <allow send_destination="fi.epitest.hostap.WPASupplicant"/>
|
||||
- <allow send_interface="fi.epitest.hostap.WPASupplicant"/>
|
||||
- </policy>
|
||||
<policy context="default">
|
||||
<deny own="fi.epitest.hostap.WPASupplicant"/>
|
||||
<deny send_destination="fi.epitest.hostap.WPASupplicant"/>
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
--- wpa_supplicant-0.5.7/main.c.debugfile 2007-07-30 21:48:35.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/main.c 2007-07-30 22:12:06.000000000 -0400
|
||||
@@ -45,7 +45,12 @@ static void usage(void)
|
||||
"[-p<driver_param>] \\\n"
|
||||
" [-b<br_ifname> [-N -i<ifname> -c<conf> [-C<ctrl>] "
|
||||
"[-D<driver>] \\\n"
|
||||
- " [-p<driver_param>] [-b<br_ifname>] ...]\n"
|
||||
+ " [-p<driver_param>] [-b<br_ifname>] ...] "
|
||||
+#ifdef CONFIG_DEBUG_FILE
|
||||
+ "[-f] \\\n"
|
||||
+#else
|
||||
+ "\n"
|
||||
+#endif
|
||||
"\n"
|
||||
"drivers:\n",
|
||||
wpa_supplicant_version, wpa_supplicant_license);
|
||||
@@ -65,6 +70,9 @@ static void usage(void)
|
||||
" -i = interface name\n"
|
||||
" -d = increase debugging verbosity (-dd even more)\n"
|
||||
" -D = driver name\n"
|
||||
+#ifdef CONFIG_DEBUG_FILE
|
||||
+ " -f = Log output to /var/log/wpa_supplicant.log\n"
|
||||
+#endif
|
||||
" -g = global ctrl_interface\n"
|
||||
" -K = include keys (passwords, etc.) in debug output\n"
|
||||
" -t = include timestamp in debug messages\n"
|
||||
@@ -143,7 +151,7 @@ int main(int argc, char *argv[])
|
||||
wpa_supplicant_fd_workaround();
|
||||
|
||||
for (;;) {
|
||||
- c = getopt(argc, argv, "b:Bc:C:D:dg:hi:KLNp:P:qtuvwW");
|
||||
+ c = getopt(argc, argv, "b:Bc:C:D:dfg:hi:KLNp:P:qtuvwW");
|
||||
if (c < 0)
|
||||
break;
|
||||
switch (c) {
|
||||
@@ -172,6 +180,11 @@ int main(int argc, char *argv[])
|
||||
params.wpa_debug_level--;
|
||||
break;
|
||||
#endif /* CONFIG_NO_STDOUT_DEBUG */
|
||||
+#ifdef CONFIG_DEBUG_FILE
|
||||
+ case 'f':
|
||||
+ params.wpa_debug_use_file = 1;
|
||||
+ break;
|
||||
+#endif
|
||||
case 'g':
|
||||
params.ctrl_interface = optarg;
|
||||
break;
|
||||
--- wpa_supplicant-0.5.7/common.c.debugfile 2007-07-30 21:39:40.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/common.c 2007-07-30 22:11:11.000000000 -0400
|
||||
@@ -354,11 +354,8 @@ int wpa_debug_open_file(void)
|
||||
#ifdef _WIN32
|
||||
os_snprintf(fname, sizeof(fname), "\\Temp\\wpa_supplicant-log-%d.txt",
|
||||
count++);
|
||||
-#else /* _WIN32 */
|
||||
- os_snprintf(fname, sizeof(fname), "/tmp/wpa_supplicant-log-%d.txt",
|
||||
- count++);
|
||||
#endif /* _WIN32 */
|
||||
- out_file = fopen(fname, "w");
|
||||
+ out_file = fopen("/var/log/wpa_supplicant.log", "a");
|
||||
return out_file == NULL ? -1 : 0;
|
||||
#else /* CONFIG_DEBUG_FILE */
|
||||
return 0;
|
||||
--- wpa_supplicant-0.5.7/Makefile.debugfile 2007-07-30 21:44:14.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/Makefile 2007-07-30 21:44:46.000000000 -0400
|
||||
@@ -744,6 +744,10 @@ ifndef LDO
|
||||
LDO=$(CC)
|
||||
endif
|
||||
|
||||
+ifdef CONFIG_DEBUG_FILE
|
||||
+CFLAGS += -DCONFIG_DEBUG_FILE
|
||||
+endif
|
||||
+
|
||||
dynamic_eap_methods: $(EAPDYN)
|
||||
|
||||
wpa_supplicant: .config $(OBJS)
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
Backport from 0.6.x branch; apparently this hasn't even landed on
|
||||
the stable 0.5.x branch yet.
|
||||
|
||||
diff -up wpa_supplicant-0.5.7/driver_wext.c.dynamic-wep-mac80211 wpa_supplicant-0.5.7/driver_wext.c
|
||||
--- wpa_supplicant-0.5.7/driver_wext.c.dynamic-wep-mac80211 2007-10-28 00:57:11.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/driver_wext.c 2007-10-28 00:57:38.000000000 -0400
|
||||
@@ -1724,6 +1724,7 @@ static int wpa_driver_wext_keymgmt2wext(
|
||||
{
|
||||
switch (keymgmt) {
|
||||
case KEY_MGMT_802_1X:
|
||||
+ case KEY_MGMT_802_1X_NO_WPA:
|
||||
return IW_AUTH_KEY_MGMT_802_1X;
|
||||
case KEY_MGMT_PSK:
|
||||
return IW_AUTH_KEY_MGMT_PSK;
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
diff -up wpa_supplicant-0.5.7/ctrl_iface_dbus.c.signal-leak-fix wpa_supplicant-0.5.7/ctrl_iface_dbus.c
|
||||
--- wpa_supplicant-0.5.7/ctrl_iface_dbus.c.signal-leak-fix 2007-12-06 18:10:22.000000000 -0500
|
||||
+++ wpa_supplicant-0.5.7/ctrl_iface_dbus.c 2007-12-06 18:11:38.000000000 -0500
|
||||
@@ -649,6 +649,7 @@ void wpa_supplicant_dbus_notify_scan_res
|
||||
return;
|
||||
}
|
||||
dbus_connection_send(iface->con, signal, NULL);
|
||||
+ dbus_message_unref (signal);
|
||||
}
|
||||
|
||||
|
||||
@@ -666,7 +667,7 @@ void wpa_supplicant_dbus_notify_state_ch
|
||||
wpa_states old_state)
|
||||
{
|
||||
struct ctrl_iface_dbus_priv *iface;
|
||||
- DBusMessage *signal;
|
||||
+ DBusMessage *signal = NULL;
|
||||
const char *path;
|
||||
const char *new_state_str, *old_state_str;
|
||||
|
||||
@@ -711,7 +712,7 @@ void wpa_supplicant_dbus_notify_state_ch
|
||||
wpa_printf(MSG_ERROR,
|
||||
"wpa_supplicant_dbus_notify_state_change[dbus]: "
|
||||
"couldn't convert state strings.");
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
if (!dbus_message_append_args(signal,
|
||||
@@ -724,8 +725,13 @@ void wpa_supplicant_dbus_notify_state_ch
|
||||
"wpa_supplicant_dbus_notify_state_change[dbus]: "
|
||||
"not enough memory to construct state change "
|
||||
"signal.");
|
||||
+ goto out;
|
||||
}
|
||||
+
|
||||
dbus_connection_send(iface->con, signal, NULL);
|
||||
+
|
||||
+out:
|
||||
+ dbus_message_unref (signal);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--- wpa_supplicant-0.5.7/common.c.flush-debug 2007-07-30 23:15:34.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/common.c 2007-07-30 23:17:06.000000000 -0400
|
||||
--- wpa_supplicant-0.6.3/src/utils/wpa_debug.c.flush-debug 2007-07-30 23:15:34.000000000 -0400
|
||||
+++ wpa_supplicant-0.6.3/src/utils/wpa_debug.c 2007-07-30 23:17:06.000000000 -0400
|
||||
@@ -157,6 +157,7 @@ void wpa_debug_print_timestamp(void)
|
||||
if (out_file) {
|
||||
fprintf(out_file, "%ld.%06u: ", (long) tv.sec,
|
||||
|
|
|
|||
|
|
@ -1,155 +0,0 @@
|
|||
diff -up wpa_supplicant-0.5.7/tls_openssl.c.ignore-dup-ca-cert-addition wpa_supplicant-0.5.7/tls_openssl.c
|
||||
--- wpa_supplicant-0.5.7/tls_openssl.c.ignore-dup-ca-cert-addition 2006-11-29 23:50:28.000000000 -0500
|
||||
+++ wpa_supplicant-0.5.7/tls_openssl.c 2007-11-13 11:19:30.000000000 -0500
|
||||
@@ -1105,11 +1105,21 @@ static int tls_connection_ca_cert(void *
|
||||
}
|
||||
|
||||
if (!X509_STORE_add_cert(ssl_ctx->cert_store, cert)) {
|
||||
+ unsigned long err = ERR_peek_error();
|
||||
+
|
||||
tls_show_errors(MSG_WARNING, __func__,
|
||||
"Failed to add ca_cert_blob to "
|
||||
"certificate store");
|
||||
- X509_free(cert);
|
||||
- return -1;
|
||||
+
|
||||
+ if (ERR_GET_LIB(err) == ERR_LIB_X509 &&
|
||||
+ ERR_GET_REASON(err) == X509_R_CERT_ALREADY_IN_HASH_TABLE) {
|
||||
+ wpa_printf(MSG_DEBUG, "OpenSSL: %s - ignoring "
|
||||
+ "cert already in hash table error",
|
||||
+ __func__);
|
||||
+ } else {
|
||||
+ X509_free(cert);
|
||||
+ return -1;
|
||||
+ }
|
||||
}
|
||||
X509_free(cert);
|
||||
wpa_printf(MSG_DEBUG, "OpenSSL: %s - added ca_cert_blob "
|
||||
@@ -1259,15 +1269,28 @@ static int tls_connection_client_cert(st
|
||||
if (client_cert == NULL && client_cert_blob == NULL)
|
||||
return 0;
|
||||
|
||||
- if (client_cert_blob &&
|
||||
- SSL_use_certificate_ASN1(conn->ssl, (u8 *) client_cert_blob,
|
||||
+ if (client_cert_blob) {
|
||||
+ if (SSL_use_certificate_ASN1(conn->ssl, (u8 *) client_cert_blob,
|
||||
client_cert_blob_len) == 1) {
|
||||
- wpa_printf(MSG_DEBUG, "OpenSSL: SSL_use_certificate_ASN1 --> "
|
||||
- "OK");
|
||||
- return 0;
|
||||
- } else if (client_cert_blob) {
|
||||
- tls_show_errors(MSG_DEBUG, __func__,
|
||||
- "SSL_use_certificate_ASN1 failed");
|
||||
+ wpa_printf(MSG_DEBUG, "OpenSSL: SSL_use_certificate_ASN1"
|
||||
+ " --> OK");
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ unsigned long err = ERR_peek_error();
|
||||
+
|
||||
+ if (ERR_GET_LIB(err) == ERR_LIB_X509 &&
|
||||
+ ERR_GET_REASON(err) == X509_R_CERT_ALREADY_IN_HASH_TABLE) {
|
||||
+ wpa_printf(MSG_DEBUG, "OpenSSL: %s - ignoring "
|
||||
+ "cert already in hash table error",
|
||||
+ __func__);
|
||||
+ wpa_printf(MSG_DEBUG, "OpenSSL: "
|
||||
+ "SSL_use_certificate_ASN1 --> OK");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ tls_show_errors(MSG_DEBUG, __func__,
|
||||
+ "SSL_use_certificate_ASN1 failed");
|
||||
+ }
|
||||
}
|
||||
|
||||
if (client_cert == NULL)
|
||||
@@ -1515,40 +1538,73 @@ static int tls_connection_private_key(vo
|
||||
while (private_key_blob) {
|
||||
if (SSL_use_PrivateKey_ASN1(EVP_PKEY_RSA, conn->ssl,
|
||||
(u8 *) private_key_blob,
|
||||
- private_key_blob_len) == 1) {
|
||||
- wpa_printf(MSG_DEBUG, "OpenSSL: SSL_use_PrivateKey_"
|
||||
- "ASN1(EVP_PKEY_RSA) --> OK");
|
||||
- ok = 1;
|
||||
- break;
|
||||
- } else {
|
||||
+ private_key_blob_len) != 1) {
|
||||
+ unsigned long err = ERR_peek_error();
|
||||
+
|
||||
tls_show_errors(MSG_DEBUG, __func__,
|
||||
"SSL_use_PrivateKey_ASN1(EVP_PKEY_RSA)"
|
||||
" failed");
|
||||
+ if (ERR_GET_LIB(err) == ERR_LIB_X509 &&
|
||||
+ ERR_GET_REASON(err) == X509_R_CERT_ALREADY_IN_HASH_TABLE) {
|
||||
+ wpa_printf(MSG_DEBUG, "OpenSSL: %s - ignoring "
|
||||
+ "cert already in hash table error",
|
||||
+ __func__);
|
||||
+ ok = 1;
|
||||
+ }
|
||||
+ } else
|
||||
+ ok = 1;
|
||||
+
|
||||
+ if (ok == 1) {
|
||||
+ wpa_printf(MSG_DEBUG, "OpenSSL: SSL_use_PrivateKey_"
|
||||
+ "ASN1(EVP_PKEY_RSA) --> OK");
|
||||
+ break;
|
||||
}
|
||||
|
||||
if (SSL_use_PrivateKey_ASN1(EVP_PKEY_DSA, conn->ssl,
|
||||
(u8 *) private_key_blob,
|
||||
- private_key_blob_len) == 1) {
|
||||
- wpa_printf(MSG_DEBUG, "OpenSSL: SSL_use_PrivateKey_"
|
||||
- "ASN1(EVP_PKEY_DSA) --> OK");
|
||||
- ok = 1;
|
||||
- break;
|
||||
- } else {
|
||||
+ private_key_blob_len) != 1) {
|
||||
+ unsigned long err = ERR_peek_error();
|
||||
+
|
||||
tls_show_errors(MSG_DEBUG, __func__,
|
||||
"SSL_use_PrivateKey_ASN1(EVP_PKEY_DSA)"
|
||||
" failed");
|
||||
+ if (ERR_GET_LIB(err) == ERR_LIB_X509 &&
|
||||
+ ERR_GET_REASON(err) == X509_R_CERT_ALREADY_IN_HASH_TABLE) {
|
||||
+ wpa_printf(MSG_DEBUG, "OpenSSL: %s - ignoring "
|
||||
+ "cert already in hash table error",
|
||||
+ __func__);
|
||||
+ ok = 1;
|
||||
+ }
|
||||
+ } else
|
||||
+ ok = 1;
|
||||
+
|
||||
+ if (ok == 1) {
|
||||
+ wpa_printf(MSG_DEBUG, "OpenSSL: SSL_use_PrivateKey_"
|
||||
+ "ASN1(EVP_PKEY_DSA) --> OK");
|
||||
+ break;
|
||||
}
|
||||
|
||||
if (SSL_use_RSAPrivateKey_ASN1(conn->ssl,
|
||||
(u8 *) private_key_blob,
|
||||
- private_key_blob_len) == 1) {
|
||||
+ private_key_blob_len) != 1) {
|
||||
+ unsigned long err = ERR_peek_error();
|
||||
+
|
||||
+ tls_show_errors(MSG_DEBUG, __func__,
|
||||
+ "SSL_use_RSAPrivateKey_ASN1 failed");
|
||||
+ if (ERR_GET_LIB(err) == ERR_LIB_X509 &&
|
||||
+ ERR_GET_REASON(err) == X509_R_CERT_ALREADY_IN_HASH_TABLE) {
|
||||
+ wpa_printf(MSG_DEBUG, "OpenSSL: %s - ignoring "
|
||||
+ "cert already in hash table error",
|
||||
+ __func__);
|
||||
+ ok = 1;
|
||||
+ }
|
||||
+ } else
|
||||
+ ok = 1;
|
||||
+
|
||||
+ if (ok == 1) {
|
||||
wpa_printf(MSG_DEBUG, "OpenSSL: "
|
||||
"SSL_use_RSAPrivateKey_ASN1 --> OK");
|
||||
- ok = 1;
|
||||
break;
|
||||
- } else {
|
||||
- tls_show_errors(MSG_DEBUG, __func__,
|
||||
- "SSL_use_RSAPrivateKey_ASN1 failed");
|
||||
}
|
||||
|
||||
if (tls_read_pkcs12_blob(ssl_ctx, conn->ssl, private_key_blob,
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
diff -up wpa_supplicant-0.5.7/wpa_gui/networkconfig.ui.h.atoi wpa_supplicant-0.5.7/wpa_gui/networkconfig.ui.h
|
||||
--- wpa_supplicant-0.5.7/wpa_gui/networkconfig.ui.h.atoi 2006-12-09 19:38:48.000000000 -0500
|
||||
+++ wpa_supplicant-0.5.7/wpa_gui/networkconfig.ui.h 2008-02-22 11:51:28.000000000 -0500
|
||||
@@ -10,6 +10,7 @@
|
||||
** destructor.
|
||||
*****************************************************************************/
|
||||
|
||||
+#include <stdlib.h>
|
||||
|
||||
enum {
|
||||
AUTH_NONE = 0,
|
||||
diff -up wpa_supplicant-0.5.7/wpa_gui/wpagui.ui.h.atoi wpa_supplicant-0.5.7/wpa_gui/wpagui.ui.h
|
||||
--- wpa_supplicant-0.5.7/wpa_gui/wpagui.ui.h.atoi 2008-02-22 14:39:19.000000000 -0500
|
||||
+++ wpa_supplicant-0.5.7/wpa_gui/wpagui.ui.h 2008-02-22 14:39:31.000000000 -0500
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
+#include <stdlib.h>
|
||||
|
||||
void WpaGui::init()
|
||||
{
|
||||
diff -up wpa_supplicant-0.5.7/wpa_gui/userdatarequest.ui.h.atoi wpa_supplicant-0.5.7/wpa_gui/userdatarequest.ui.h
|
||||
--- wpa_supplicant-0.5.7/wpa_gui/userdatarequest.ui.h.atoi 2008-02-22 14:38:32.000000000 -0500
|
||||
+++ wpa_supplicant-0.5.7/wpa_gui/userdatarequest.ui.h 2008-02-22 14:38:56.000000000 -0500
|
||||
@@ -10,6 +10,8 @@
|
||||
** destructor.
|
||||
*****************************************************************************/
|
||||
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
int UserDataRequest::setParams(WpaGui *_wpagui, const char *reqMsg)
|
||||
{
|
||||
char *tmp, *pos, *pos2;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--- wpa_supplicant-0.5.7/Makefile.qmake 2007-07-30 22:17:29.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/Makefile 2007-07-30 22:17:46.000000000 -0400
|
||||
--- wpa_supplicant-0.6.3/wpa_supplicant/Makefile.qmake 2007-07-30 22:17:29.000000000 -0400
|
||||
+++ wpa_supplicant-0.6.3/wpa_supplicant/Makefile 2007-07-30 22:17:46.000000000 -0400
|
||||
@@ -818,7 +818,7 @@ windows-bin: $(WINALL)
|
||||
$(STRIP) $(WINALL)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
--- wpa_supplicant-0.5.7/wpa_supplicant.c.sigusr1 2007-08-24 11:24:51.000000000 -0400
|
||||
+++ wpa_supplicant-0.5.7/wpa_supplicant.c 2007-08-24 11:43:08.000000000 -0400
|
||||
@@ -930,6 +930,22 @@ static void wpa_supplicant_reconfig(int
|
||||
}
|
||||
}
|
||||
|
||||
+static void wpa_supplicant_handle_sigusr1(int sig, void *eloop_ctx,
|
||||
+ void *signal_ctx)
|
||||
+{
|
||||
+ /* Increase verbosity (by decreasing the debug level) and wrap back
|
||||
+ * to MSG_INFO when needed.
|
||||
+ */
|
||||
+ if (wpa_debug_level)
|
||||
+ wpa_debug_level--;
|
||||
+ else
|
||||
+ wpa_debug_level = MSG_INFO;
|
||||
+
|
||||
+ wpa_printf(MSG_INFO, "Signal %d received - changing debug level to %s", sig,
|
||||
+ (wpa_debug_level == MSG_INFO) ? "INFO" :
|
||||
+ ((wpa_debug_level == MSG_DEBUG) ? "DEBUG" :
|
||||
+ ((wpa_debug_level == MSG_MSGDUMP) ? "MSGDUMP" : "UNKNOWN")));
|
||||
+}
|
||||
|
||||
static void wpa_supplicant_gen_assoc_event(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
@@ -2561,6 +2577,8 @@ int wpa_supplicant_run(struct wpa_global
|
||||
eloop_register_signal_terminate(wpa_supplicant_terminate, NULL);
|
||||
eloop_register_signal_reconfig(wpa_supplicant_reconfig, NULL);
|
||||
|
||||
+ eloop_register_signal(SIGUSR1, wpa_supplicant_handle_sigusr1, NULL);
|
||||
+
|
||||
eloop_run();
|
||||
|
||||
return 0;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Index: wpa_supplicant-0.4.8/driver_wext.c
|
||||
Index: wpa_supplicant-0.6.3/src/drivers/driver_wext.c
|
||||
===================================================================
|
||||
--- wpa_supplicant-0.4.8.orig/driver_wext.c 2006-07-13 11:23:05.000000000 +0200
|
||||
+++ wpa_supplicant-0.4.8/driver_wext.c 2006-07-13 11:23:57.000000000 +0200
|
||||
--- wpa_supplicant-0.6.3/src/drivers/driver_wext.c.orig 2006-07-13 11:23:05.000000000 +0200
|
||||
+++ wpa_supplicant-0.6.3/src/drivers/driver_wext.c 2006-07-13 11:23:57.000000000 +0200
|
||||
@@ -1280,6 +1280,7 @@ static int wpa_driver_wext_set_key_ext(v
|
||||
memset(&iwr, 0, sizeof(iwr));
|
||||
strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
|
||||
|
|
|
|||
|
|
@ -1,75 +0,0 @@
|
|||
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
|
||||
index 6a21bbc..10c454f 100644
|
||||
--- a/wpa_supplicant/config.c
|
||||
+++ b/wpa_supplicant/config.c
|
||||
@@ -1157,7 +1157,8 @@ static const struct parse_data ssid_fiel
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
{ INT_RANGE(ieee80211w, 0, 2) },
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
- { INT_RANGE(peerkey, 0, 1) }
|
||||
+ { INT_RANGE(peerkey, 0, 1) },
|
||||
+ { INT_RANGE(frequency, 0, 10000) }
|
||||
};
|
||||
|
||||
#undef OFFSETdiff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
|
||||
index d4c3654..393f750 100644
|
||||
--- a/wpa_supplicant/config_ssid.h
|
||||
+++ b/wpa_supplicant/config_ssid.h
|
||||
@@ -851,6 +851,18 @@ struct wpa_ssid {
|
||||
IEEE80211W_REQUIRED = 2
|
||||
} ieee80211w;
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
+
|
||||
+ /**
|
||||
+ * frequency - Channel frequency in megahertz (MHz) for IBSS
|
||||
+ *
|
||||
+ * This value is used to configure the initial channel for IBSS (adhoc)
|
||||
+ * networks, e.g., 2412 = IEEE 802.11b/g channel 1. It is ignored in
|
||||
+ * the infrastructure mode. In addition, this value is only used by the
|
||||
+ * station that creates the IBSS. If an IBSS network with the
|
||||
+ * configured SSID is already present, the frequency of the network
|
||||
+ * will be used instead of this configured value.
|
||||
+ */
|
||||
+ int frequency;
|
||||
};
|
||||
|
||||
int wpa_config_allowed_eap_method(struct wpa_ssid *ssid, int vendor,
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
|
||||
index d5342fe..35ddbcd 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -1468,6 +1468,8 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
||||
params.ssid = ssid->ssid;
|
||||
params.ssid_len = ssid->ssid_len;
|
||||
}
|
||||
+ if (ssid->mode == 1 && ssid->frequency > 0 && params.freq == 0)
|
||||
+ params.freq = ssid->frequency; /* Initial channel for IBSS */
|
||||
params.wpa_ie = wpa_ie;
|
||||
params.wpa_ie_len = wpa_ie_len;
|
||||
params.pairwise_suite = cipher_pairwise;
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
|
||||
index dce9d87..ec8b0ee 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.conf
|
||||
+++ b/wpa_supplicant/wpa_supplicant.conf
|
||||
@@ -192,6 +192,13 @@ fast_reauth=1
|
||||
# proto=WPA, key_mgmt=WPA-NONE, pairwise=NONE, group=TKIP (or CCMP, but not
|
||||
# both), and psk must also be set.
|
||||
#
|
||||
+# frequency: Channel frequency in megahertz (MHz) for IBSS, e.g.,
|
||||
+# 2412 = IEEE 802.11b/g channel 1. This value is used to configure the initial
|
||||
+# channel for IBSS (adhoc) networks. It is ignored in the infrastructure mode.
|
||||
+# In addition, this value is only used by the station that creates the IBSS. If
|
||||
+# an IBSS network with the configured SSID is already present, the frequency of
|
||||
+# the network will be used instead of this configured value.
|
||||
+#
|
||||
# proto: list of accepted protocols
|
||||
# WPA = WPA/IEEE 802.11i/D3.0
|
||||
# RSN = WPA2/IEEE 802.11i (also WPA2 can be used as an alias for RSN)
|
||||
@@ -657,6 +664,7 @@ network={
|
||||
network={
|
||||
ssid="test adhoc"
|
||||
mode=1
|
||||
+ frequency=2412
|
||||
proto=WPA
|
||||
key_mgmt=WPA-NONE
|
||||
pairwise=NONE
|
||||
45
wpa_supplicant-0.6.3-wpa-gui-fixes.patch
Normal file
45
wpa_supplicant-0.6.3-wpa-gui-fixes.patch
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
diff -up wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/networkconfig.ui.h.atoi wpa_supplicant-0.5.7/wpa_gui/networkconfig.ui.h
|
||||
--- wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/networkconfig.ui.h.atoi 2006-12-09 19:38:48.000000000 -0500
|
||||
+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/networkconfig.ui.h 2008-02-22 11:51:28.000000000 -0500
|
||||
@@ -10,6 +10,7 @@
|
||||
** destructor.
|
||||
*****************************************************************************/
|
||||
|
||||
+#include <stdlib.h>
|
||||
|
||||
enum {
|
||||
AUTH_NONE = 0,
|
||||
diff -up wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpagui.ui.h.atoi wpa_supplicant-0.5.7/wpa_gui/wpagui.ui.h
|
||||
--- wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpagui.ui.h.atoi 2008-02-22 14:39:19.000000000 -0500
|
||||
+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpagui.ui.h 2008-02-22 14:39:31.000000000 -0500
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
+#include <stdlib.h>
|
||||
|
||||
void WpaGui::init()
|
||||
{
|
||||
diff -up wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/userdatarequest.ui.h.atoi wpa_supplicant-0.5.7/wpa_gui/userdatarequest.ui.h
|
||||
--- wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/userdatarequest.ui.h.atoi 2008-02-22 14:38:32.000000000 -0500
|
||||
+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/userdatarequest.ui.h 2008-02-22 14:38:56.000000000 -0500
|
||||
@@ -10,6 +10,8 @@
|
||||
** destructor.
|
||||
*****************************************************************************/
|
||||
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
int UserDataRequest::setParams(WpaGui *_wpagui, const char *reqMsg)
|
||||
{
|
||||
char *tmp, *pos, *pos2;
|
||||
diff -up wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpamsg.h.fix wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpamsg.h
|
||||
--- wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpamsg.h.fix 2008-03-03 11:58:18.000000000 -0500
|
||||
+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpamsg.h 2008-03-03 11:58:33.000000000 -0500
|
||||
@@ -14,6 +14,7 @@ typedef QValueList<WpaMsg> WpaMsgList;
|
||||
|
||||
class WpaMsg {
|
||||
public:
|
||||
+ WpaMsg() {}
|
||||
WpaMsg(const QString &_msg, int _priority = 2)
|
||||
: msg(_msg), priority(_priority)
|
||||
{
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--- wpa_supplicant-0.4.8/wpa_supplicant.c.timeout 2006-03-03 22:26:13.000000000 -0500
|
||||
+++ wpa_supplicant-0.4.8/wpa_supplicant.c 2006-03-03 22:26:45.000000000 -0500
|
||||
--- wpa_supplicant-0.6.3/wpa_supplicant/wpa_supplicant.c.timeout 2006-03-03 22:26:13.000000000 -0500
|
||||
+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_supplicant.c 2006-03-03 22:26:45.000000000 -0500
|
||||
@@ -1252,9 +1252,9 @@
|
||||
/* Timeout for IEEE 802.11 authentication and association */
|
||||
int timeout;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue