[wpa_supplicant] EAP-SIM send AT_IDENTITY first

For EAP-SIM connections, reorder the order of the attributes in
EAP-Response/SIM/Start message: Send AT_IDENTITY first, then
AT_NONCE and AT_VERSION instead of AT_IDENTITY last. Even though there
is no order requirements in the RFC, some implementations expect the
order of the attributes to be exactly as described in the RFC figures.

Peer                                      Authenticator
|                                                 |
|                      +------------------------------+
|                      | Server does not have a       |
|                      | Subscriber identity available|
|                      | When starting EAP-SIM        |
|                      +------------------------------+
|                                                 |
|          EAP-Request/SIM/Start                  |
|          (AT_ANY_ID_REQ, AT_VERSION_LIST)       |
|<------------------------------------------------|
|                                                 |
|                                                 |
| EAP-Response/SIM/Start                          |
| (AT_IDENTITY, AT_NONCE_MT,                      |
|  AT_SELECTED_VERSION)                           |
|------------------------------------------------>|
|                                                 |

Bug: 169771165
Test: Test EAP-SIM with a live carrier network
Change-Id: If0f5c9afd9cc060958942112b99f80a42ea227b2
Merged-In: If0f5c9afd9cc060958942112b99f80a42ea227b2
(cherry picked from commit 0447876c4bf3b3bdbc8b4e37e96ece4237d257cf)
1 file changed