aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_sim.c
Commit message (Collapse)AuthorAgeFilesLines
* EAP-SIM peer: Fix memory leak on reauth error pathJouni Malinen2015-11-281-1/+1
| | | | | | | | If init_for_reauth fails, the EAP-SIM peer state was not freed properly. Use eap_sim_deinit() to make sure all allocations get freed. This could be hit only if no random data could be derived for NONCE_MT. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-SIM/AKA: Explicitly check for header to include Reserved fieldJouni Malinen2015-05-031-1/+1
| | | | | | | | | This was previously checked as part of the eap_sim_parse_attr() processing, but it is easier to review the code if there is an additional explicit check for confirming that the Reserved field is present since the pos variable is advanced beyond it. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP peer: Clear keying material on deinitJouni Malinen2014-07-021-0/+16
| | | | | | | | | Reduce the amount of time keying material (MSK, EMSK, temporary private data) remains in memory in EAP methods. This provides additional protection should there be any issues that could expose process memory to external observers. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-SIM/AKA: Pass EAP type as argument to eap_sim_msg_finish()Jouni Malinen2014-07-021-5/+6
| | | | | | | | This makes it easier for static analyzers to figure out which code paths are possible within eap_sim_msg_finish() for EAP-SIM. This will hopefully avoid some false warnings (CID 68110, CID 68113, CID 68114). Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-SIM/AKA: Remove unused RESULT_FAILURE stateJouni Malinen2014-06-201-8/+4
| | | | | | | This was not set anywhere, so remove the unnecessary code trying to handle the unused state. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-SIM peer: Fix counter-too-small message buildingJouni Malinen2014-05-111-1/+6
| | | | | | | | | | | | The extra data (nonce_s) used in this message was pointing to the parsed, decrypted data and that buffer was previously freed just before building the new message. This resulted in use of freed data and possibly incorrect extra data value that caused the authentication attempt to fail. Fix this by reordering the code to free the decrypted data only after the new message has been generated. This was already the case for EAP-AKA/AKA', but somehow missing from EAP-SIM. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-SIM peer: Allow external SIM processing to be usedJouni Malinen2013-10-201-2/+90
| | | | | | | | | | | | | | | | | | | | | | | | This allows the new external_sim=1 case to be used to perform GSM authentication step in EAP-SIM peer process. Following control interface event is used to request the operation: CTRL-REQ-SIM-<network id>:GSM-AUTH:<RAND1>:<RAND2>[:<RAND3>] needed for SSID <SSID> For example: <3>CTRL-REQ-SIM-0:GSM-AUTH:5e3496ce7d5863b3b09f97f565513bc3: 73f0f0bc5c47bcbed6f572d07ab74056:447b784f08de80bdc2b1e100fccbb534 needed for SSID test Response from external processing is returned with CTRL-RSP-SIM-<network id> GSM-AUTH:<Kc1>:<SRES1>:<Kc2>:<SRES2> [:<Kc3>:<SRES3>] For example: wpa_cli sim 0 GSM-AUTH:d41c76e0079247aa:2709ebfb:43baa77cfc8bcd6c: 0fa98dc1:a8ad1f6e30e Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP peer: Add Session-Id derivation to more EAP methodsJouni Malinen2013-02-081-0/+24
| | | | | | | This commit adds Session-Id derivation for EAP-SIM, EAP-AKA, EAP-AKA', EAP-PSK, and EAP-SAK peer methods. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* EAP-SIM/AKA: Store pseudonym identity in configurationJouni Malinen2012-09-021-9/+22
| | | | | | | | Use the anonymous_identity field to store EAP-SIM/AKA pseudonym identity so that this can be maintained between EAP sessions (e.g., after wpa_supplicant restart) even if fast re-authentication data was cleared. Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-SIM/AKA peer: Note sending of Client-Error in debug logJouni Malinen2012-09-011-0/+2
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-SIM peer: Fix AT_COUNTER_TOO_SMALL useJouni Malinen2012-09-011-4/+5
| | | | | | | | | The AT_NONCE_S value needs to be used in AT_MAC calculation for SIM/Re-authentication response even if re-authentication is rejected with AT_COUNTER_TOO_SMALL. Signed-hostap: Jouni Malinen <j@w1.fi> intended-for: hostap-1
* 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>
* EAP-SIM peer: Append realm when learning the pseudonymSimon Baatz2012-01-281-9/+30
| | | | | | | | The pseudonym identity should use a realm in environments where a realm is used. Thus, the realm of the permanent identity is added to the pseudonym username sent by the server. Signed-hostap: Simon Baatz <gmbnomis@gmail.com>
* EAP-SIM peer: Only log the identities that we actually forgetSimon Baatz2011-12-041-7/+6
| | | | [Bug 425]
* EAP-SIM: Keep pseudonym identitySimon Baatz2011-12-041-5/+5
| | | | | | | The pseudonym is a temporary identity, but is no one-time identifier (like the fast re-authentication identity). Thus, do not forget it if the server does not include it in every challenge. There are servers that include the pseudonym identity only at full-auth. [Bug 424]
* Annotate places depending on strong random numbersJouni Malinen2010-11-231-2/+3
| | | | | | | | | | | | | This commit adds a new wrapper, random_get_bytes(), that is currently defined to use os_get_random() as is. The places using random_get_bytes() depend on the returned value being strong random number, i.e., something that is infeasible for external device to figure out. These values are used either directly as a key or as nonces/challenges that are used as input for key derivation or authentication. The remaining direct uses of os_get_random() do not need as strong random numbers to function correctly.
* Move milenage.[ch] into src/cryptoJouni Malinen2009-12-051-4/+2
|
* EAP-SIM peer: Remove AT_NOTIFICATION from Notification responseJouni Malinen2009-06-291-2/+0
| | | | | | | | | | | This attribute is not supposed to be used in the response frame (i.e., it is only in the EAP-Request/SIM-Notification frame) per RFC 4186 chapters 10.1 and 9.9. This is a minor bug since the server is required to ignore the contents of the EAP-Response/SIM-Notification during protected result indication per chapter 6.2. EAP-AKA peer was already following the similar specification in RFC 4187, but this was somehow missed in the EAP-SIM peer implementation.
* Add more verbose debug output for GSM-Milenage use (RAND,SRES,Kc)Jouni Malinen2008-11-221-10/+15
|
* Added Milenage-GSM simulator for EAP-SIMJouni Malinen2008-11-061-12/+73
| | | | | CONFIG_SIM_SIMULATOR=y in .config and password="Ki:OPc" in network config to enable.
* Re-initialize hostapd/wpa_supplicant git repository based on 0.6.3 releaseJouni Malinen2008-02-281-0/+1038