aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_tls_common.c
Commit message (Collapse)AuthorAgeFilesLines
* TLS: Use separate TLS library context for tunneled TLSJouni Malinen2012-04-071-19/+22
| | | | | | | | | | | OpenSSL wrapper was using the same certificate store for both Phase 1 and Phase 2 TLS exchange in case of EAP-PEAP/TLS, EAP-TTLS/TLS, and EAP-FAST/TLS. This would be fine if the same CA certificates were used in both phases, but does not work properly if different CA certificates are used. Enforce full separation of TLS state between the phases by using a separate TLS library context in EAP peer implementation. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* Rename tls_prf() to tls_prf_sha1_md5()Jouni Malinen2011-11-271-3/+3
| | | | | | | | Prepare for multiple TLS PRF functions by renaming the SHA1+MD5 based TLS PRF function to more specific name and add tls_prf() within the internal TLS implementation as a wrapper for this for now. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove EAP-TTLSv1 and TLS/IAJouni Malinen2011-09-251-1/+0
| | | | | | | | | | | | | | These protocols seem to be abandoned: latest IETF drafts have expired years ago and it does not seem likely that EAP-TTLSv1 would be deployed. The implementation in hostapd/wpa_supplicant was not complete and not fully tested. In addition, the TLS/IA functionality was only available when GnuTLS was used. Since GnuTLS removed this functionality in 3.0.0, there is no available TLS/IA implementation in the latest version of any supported TLS library. Remove the EAP-TTLSv1 and TLS/IA implementation to clean up unwanted complexity from hostapd and wpa_supplicant. In addition, this removes any potential use of the GnuTLS extra library.
* Avoid theoretical NULL pointer dereference during TLS reassembleJouni Malinen2011-04-141-1/+2
| | | | | | This function does not get called with in_data == NULL in practice, but it seems to be at least partly prepared for that case, so better make it consistent by handling the NULL value throughout the function.
* Fix memory leak on TLS setup error pathJouni Malinen2010-02-131-0/+4
| | | | | Need tof free TLS context in some cases to avoid a memory leak on error path.
* Allow TLS flags to be configured (allow MD5, disable time checks)Jouni Malinen2009-12-201-0/+14
| | | | | | | | | | | | | 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.
* Convert TLS wrapper to use struct wpabufJouni Malinen2009-12-201-102/+54
| | | | | | | 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.
* Remove src/crypto from default include pathJouni Malinen2009-11-291-2/+2
| | | | | | In addition, start ordering header file includes to be in more consistent order: system header files, src/utils, src/*, same directory as the *.c file.
* Use larger buffer for TLS encryption to avoid issues with GnuTLSJouni Malinen2009-02-091-1/+1
| | | | | | | | | | | | It looks like GnuTLS (at least newer versions) is using random padding on the application data and the previously used 100 byte extra buffer for tls_connection_encrypt() calls was not enough to handle all cases. This resulted in semi-random authentication failures with EAP-PEAP and EAP-TTLS during Phase 2. Increase the extra space for encryption from 100 to 300 bytes and add an error message into tls_gnutls.c to make it easier to notice this issue should it ever show up again even with the larger buffer.
* Fix TLS message processing if Flags field is not presentJouni Malinen2008-12-301-2/+15
| | | | | | | | | | | | | | | | | | | | | | Previous version assumed that the Flags field is always present and ended up reading one octet past the end of the buffer should the Flags field be missing. The message length would also be set incorrectly (size_t)-1 or (size_t)-5, but it looks like reassembly code ended up failing in malloc before actually using this huge length to read data. RFC 2716 uses a somewhat unclear description on what exactly is included in the TLS Ack message ("no data" can refer to either Data field in 4.1 or TLS Data field in 4.2), so in theory, it would be possible for some implementations to not include Flags field. However, EAP-{PEAP,TTLS,FAST} need the Flags field in Ack messages, too, for indicating the used version. The EAP peer code will now accept the no-Flags case as an Ack message if EAP workarounds are enabled (which is the default behavior). If workarounds are disabled, the message without Flags field will be rejected. [Bug 292]
* Fixed interoperability issue with PEAPv0 cryptobinding and NPSJouni Malinen2008-12-151-0/+11
| | | | | | | | | | | | | | Windows Server 2008 NPS gets very confused if the TLS Message Length is not included in the Phase 1 messages even if fragmentation is not used. If the TLS Message Length field is not included in ClientHello message, NPS seems to decide to use the ClientHello data (excluding first six octets, i.e., EAP header, type, Flags) as the OuterTLVs data in Cryptobinding Compound_MAC calculation (per PEAPv2; not MS-PEAP).. Lets add the TLS Message Length to PEAPv0 Phase 1 messages to get rid of this issue. This seems to fix Cryptobinding issues with NPS and PEAPv0 is now using optional Cryptobinding by default (again) since there are no known interop issues with it anymore.
* Separate OpenSSL engine configuration for Phase 2Carolin Latze2008-11-181-5/+9
| | | | | | | | | | | | | | I fixed the engine issue in phase2 of EAP-TTLS. The problem was that you only defined one engine variable, which was read already in phase1. I defined some new variables: engine2 engine2_id pin2 and added support to read those in phase2 wheres all the engine variables without number are only read in phase1. That solved it and I am now able to use an engine also in EAP-TTLS phase2.
* Added a workaround for handling TLS compressionJouni Malinen2008-05-261-0/+8
| | | | | | | | | | | | | | Even though we try to disable TLS compression, it is possible that this cannot be done with all TLS libraries. For example, OpenSSL 0.9.8 does not seem to have a configuration item for disabling all compression (0.9.9 has such an option). If compression is used, Phase 2 decryption may end up producing more data than the input buffer due to compressed data. This shows up especially with EAP-TNC that uses very compressible data format. As a workaround, increase the decryption buffer length to (orig_len+500)*3. This is a hack, but at least it handles most cases. TLS compression should really be disabled for EAP use of TLS, but since this can show up with common setups, it is better to handle this case.
* Add support to eap_peer for client cert and CA cert on smartcard and inDavid Smith2008-05-231-0/+7
| | | | phase2 auth.
* Re-initialize hostapd/wpa_supplicant git repository based on 0.6.3 releaseJouni Malinen2008-02-271-0/+1007