Commit graph

1432 commits

Author SHA1 Message Date
Jouni Malinen 36da1358bc dbus: Move some of conditional WPS code into separate files 2009-12-20 21:04:40 +02:00
Jouni Malinen a8c481c10a dbus: Remove unnecessary CONFIG_WPS ifdefs from header files 2009-12-20 20:40:23 +02:00
Jouni Malinen eb3b34ceea dbus: Clean dbus build files on wpa_supplicant 'make clean'
In addition, add preliminary build rules for build libwpadbus.a.
2009-12-20 20:29:09 +02:00
Jouni Malinen 926ab7e6a0 dbus: Rename .service file to use the service name as the file name 2009-12-20 20:15:40 +02:00
Witold Sowa 65bea134ad dbus: Add missing .service file for the new D-Bus API 2009-12-20 20:14:10 +02:00
Jouni Malinen 19b3211d19 Move D-Bus related files into their own subdirectory 2009-12-20 20:11:14 +02:00
Jouni Malinen 2944656925 Allow TLS flags to be configured (allow MD5, disable time checks)
Undocumented (at least for the time being) TLS parameters can now
be provided in wpa_supplicant configuration to enable some workarounds
for being able to connect insecurely to some networks. phase1 and
phase2 network parameters can use following options:
tls_allow_md5=1
- allow MD5 signature to be used (disabled by default with GnuTLS)
tls_disable_time_checks=1
- ignore certificate expiration time

For now, only the GnuTLS TLS wrapper implements support for these.
2009-12-20 19:28:47 +02:00
Jouni Malinen 4a1e97790d GnuTLS: Report certificate validation failures with TLS alert
In addition, show more detailed reason for the failure in debug log.
2009-12-20 19:14:17 +02:00
Jouni Malinen a86a7316a4 OpenSSL: Fix memleak in previous wpabuf changes on an error path 2009-12-20 19:12:59 +02:00
Jouni Malinen 2574634b7f Check TLS status on EAP server during handshake
The new TLS wrapper use may end up returning alert data and we need to
make sure here that it does not end up getting interpreted as success
due to non-NULL response.
2009-12-20 19:11:43 +02:00
Jouni Malinen 074be2332f GnuTLS: Use struct wpabuf for push/pull buffers 2009-12-20 18:31:56 +02:00
Jouni Malinen 81c85c069a Convert TLS wrapper to use struct wpabuf
This converts tls_connection_handshake(),
tls_connection_server_handshake(), tls_connection_encrypt(), and
tls_connection_decrypt() to use struct wpa_buf to allow higher layer
code to be cleaned up with consistent struct wpabuf use.
2009-12-20 18:17:55 +02:00
Jouni Malinen 94c3e91fc5 Add empty FIPS PRF wrapper for CryptoAPI 2009-12-20 18:14:20 +02:00
Jouni Malinen 8f431bc808 Add empty crypto_mod_exp() wrapper for CryptoAPI. 2009-12-20 18:13:42 +02:00
Jouni Malinen de979ef18c Fix MinGW build: CertCreateCertificateContext() is now known 2009-12-20 18:10:10 +02:00
Jouni Malinen f266d1a162 eloop_win: Fix build after eloop user_data removal 2009-12-20 17:48:55 +02:00
Jouni Malinen f52ab9e6b0 Fix lastReqData freeing to use wpabuf_free() 2009-12-20 17:22:25 +02:00
Jouni Malinen eeb04821ad wpabuf: Add WPA_TRACE code to validate correct freeing of wpabuf
Use an extra header to move the returned pointer to break os_free()
or free() of the returned value and verify that the correct magic
is present when freeing or resizing the wpabuf. Show backtrace on
invalid wpabuf use.
2009-12-20 13:11:31 +02:00
Jouni Malinen 859db534bf wpabuf: Allow wpabuf_resize(NULL, len) to be used
This matches with realloc() usage, i.e., allocate a new buffer if no
buffer was specified.
2009-12-20 12:52:54 +02:00
Jouni Malinen c479e41f53 EAP-FAST server: Piggyback Phase 2 start with end of Phase 1
If Finished message from peer has been received before the server
Finished message, start Phase 2 with the same message to avoid extra
roundtrip when the peer does not have anything to send after the server
Finished message.
2009-12-20 11:39:45 +02:00
Jouni Malinen 1a1bf008cb WPS ER: Delay wpa_supplicant termination to allow unsubscription
Instead of forcefully deinitializing ER immediately, give it some
time to complete unsubscription and call eloop_terminate() only once
ER code has completed its work.
2009-12-19 23:47:54 +02:00
Jouni Malinen e46338fc76 WPS ER: Unsubscribe from AP events whenever removing the AP entry
Store the subscription identifier during subscription process and use
this to unsubscribe from events when removing the AP.
2009-12-19 23:20:22 +02:00
Jouni Malinen 187533a4c5 WPS: Convert Registrar PIN list to use struct dl_list 2009-12-19 22:26:55 +02:00
Jouni Malinen 3433ed8c03 hostapd_cli: Use os_program_{init,deinit} 2009-12-19 22:26:36 +02:00
Jouni Malinen 96f5234735 WPS ER: Convert lists to use struct dl_list 2009-12-19 22:14:06 +02:00
Jouni Malinen a24eb8424b Free readline() output with free(), not os_free() 2009-12-19 22:01:09 +02:00
Jouni Malinen 45767a9597 WPS: Remove unused net_if copy 2009-12-19 21:58:00 +02:00
Jouni Malinen eeb49f991b driver_test: Use OS wrappers consistently for memory allocation 2009-12-19 21:49:51 +02:00
Jouni Malinen fb4baa688b Add memory allocation analyzer to verify OS wrapper use
WPA_TRACE=y builds will now verify that memory allocation in done
consistently using os_{zalloc,malloc,realloc,strdup,free} (i.e., no
mixing of os_* functions and unwrapper functions). In addition, some
common memory allocation issues (double-free, memory leaks, etc.) are
detected automatically.
2009-12-19 21:47:56 +02:00
Jouni Malinen 80d77c31ff hostapd: Call os_program_{init,deinit}() 2009-12-19 20:55:17 +02:00
Jouni Malinen f45fb672cc eloop: Do not use printf() or fprintf() directly 2009-12-19 20:27:55 +02:00
Jouni Malinen eaa3f04b97 eloop: Use struct dl_list for timeouts 2009-12-19 20:26:22 +02:00
Jouni Malinen 0456ea16d8 eloop: Remove global user data pointer
This is not really needed since all signal handlers can use a context
pointer provided during signal handler registration.
2009-12-19 19:22:16 +02:00
Jouni Malinen 9969e5a46a Make hostapd_for_each_interface() take context pointer as argument
This removes need for using eloop_get_user_data().
2009-12-19 19:07:31 +02:00
Jouni Malinen 2988796257 Fix RADIUS client to cancel IPv6 socket read notifications 2009-12-19 18:52:42 +02:00
Jouni Malinen f481459f5e Fix RADIUS server deinit to cancel timeout for session removal 2009-12-19 18:52:15 +02:00
Jouni Malinen 930f704aac Add backtrace support for debugging
WPA_TRACE=y can now be used to enable internal backtrace support that
will provide more details about implementation errors, e.g., when some
resources are not released correctly. In addition, this will print out
a backtrace automatically if SIGSEGV is received.
2009-12-19 18:40:54 +02:00
Jouni Malinen f5d4a8ead4 eapol_test: Fix build after RADIUS msg API changes 2009-12-19 18:40:11 +02:00
Jouni Malinen 1489e11a94 Make struct radius_msg private to radius.c
This is internal data structure for RADIUS message handling and
external code should not touch it directly.
2009-12-19 17:26:57 +02:00
Jouni Malinen aa235d2ef7 Convert RADIUS message code to use wpabuf internally 2009-12-19 17:12:07 +02:00
Jouni Malinen 9e7245bdb4 Change radius_msg_free() to free the buffer
Since all callers were freeing the buffer immediately anyway, move
this operation into radius_msg_free() to reduce code size.
2009-12-19 16:34:41 +02:00
Jouni Malinen d94f86d85e RADIUS message initialization cleanup 2009-12-19 16:20:53 +02:00
Jouni Malinen d04a96b0d6 Add documentation for RADIUS code and some minor cleanup 2009-12-19 16:13:06 +02:00
Jouni Malinen a9f92c487f WPS: Remove parent pointer from advertisement state machine 2009-12-19 14:51:36 +02:00
Jouni Malinen 158aff0035 WPS: Convert struct advertisement_state_machine to use struct dl_list 2009-12-19 14:46:52 +02:00
Jouni Malinen ea8f09acb2 WPS: Remove unused struct subscr_addr parent pointer 2009-12-19 14:30:49 +02:00
Jouni Malinen f1de40f728 WPS: Convert struct wps_event_ to use struct dl_list 2009-12-19 14:29:01 +02:00
Jouni Malinen ec32c29471 WPS: Convert struct subscription to use struct dl_list 2009-12-19 14:15:43 +02:00
Jouni Malinen f98b440c47 WPS: Convert struct subscr_addr to use dl_list 2009-12-19 13:47:00 +02:00
Jouni Malinen dacf478352 Add generic doubly-linked list implementation 2009-12-19 13:43:25 +02:00