pkanwar | 5a42197 | 2018-01-17 18:47:28 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.hardware.wifi.supplicant@1.1; |
| 18 | |
| 19 | import @1.0::ISupplicantNetwork; |
| 20 | import @1.0::ISupplicantStaNetworkCallback; |
| 21 | import @1.0::SupplicantStatus; |
| 22 | import @1.0::ISupplicantStaNetwork; |
| 23 | |
| 24 | /** |
| 25 | * Interface exposed by the supplicant for each station mode network |
| 26 | * configuration it controls. |
| 27 | */ |
| 28 | interface ISupplicantStaNetwork extends @1.0::ISupplicantStaNetwork { |
| 29 | /** |
| 30 | * EAP IMSI Identity to be used for authentication to EAP SIM networks. |
| 31 | * The identity must be derived from the IMSI retrieved from the SIM card. |
| 32 | * |
| 33 | * See RFC4186 & RFC4187 & RFC5448 for EAP SIM protocols. |
| 34 | * |
| 35 | * Identity string is built from IMSI. Format is: |
| 36 | * eapPrefix | IMSI | '@' | realm |
| 37 | * where: |
| 38 | * - "|" denotes concatenation |
| 39 | * - realm is the 3GPP network domain name derived from the given |
| 40 | * MCC/MNC according to the 3GGP spec(TS23.003) |
| 41 | * |
| 42 | * eapPrefix value: |
| 43 | * '0' - EAP-AKA Identity |
| 44 | * '1' - EAP-SIM Identity |
| 45 | * '6' - EAP-AKA-PRIME Identity |
| 46 | */ |
| 47 | typedef vec<uint8_t> EapSimIdentity; |
| 48 | |
| 49 | /** |
| 50 | * Encrypted EAP IMSI Identity to be used for authentication to EAP SIM |
| 51 | * networks which supports encrypted IMSI. |
| 52 | * The identity must be derived from the IMSI retrieved from the SIM card. |
| 53 | * This identity is then encrypted using the public key of the carrier. |
| 54 | * |
| 55 | * See RFC4186 & RFC4187 & RFC5448 for EAP SIM protocols. |
| 56 | * See section 7.1 of RFC 2437 for RSA-OAEP encryption scheme. |
| 57 | * |
| 58 | * Identity string is built from encrypted IMSI. Format is: |
| 59 | * '\0' | Base64{RSA-OAEP-SHA-256(eapPrefix | IMSI)} |
| 60 | * | '@' | realm | {',' Key Identifier} |
| 61 | * where: |
| 62 | * - "|" denotes concatenation |
| 63 | * - "{}" denotes an optional value |
| 64 | * - realm is the 3GPP network domain name derived from the given |
| 65 | * MCC/MNC according to the 3GGP spec(TS23.003) |
| 66 | * - Key Identifier is a null-terminated string of the form "<Key>=<Value>" |
| 67 | */ |
| 68 | typedef vec<uint8_t> EapSimEncryptedIdentity; |
| 69 | |
| 70 | /** |
| 71 | * Set EAP encrypted IMSI Identity for this network. |
| 72 | * |
| 73 | * @param identity Identity string built from the encrypted IMSI. |
| 74 | * @return status Status of the operation. |
| 75 | * Possible status codes: |
| 76 | * |SupplicantStatusCode.SUCCESS|, |
| 77 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 78 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 79 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 80 | */ |
| 81 | setEapEncryptedImsiIdentity(EapSimEncryptedIdentity identity) |
| 82 | generates (SupplicantStatus status); |
| 83 | |
| 84 | /** |
| 85 | * Used to send a response to the |
| 86 | * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request. |
| 87 | * |
| 88 | * @param identity Identity string containing the IMSI. |
| 89 | * @param encryptedIdentity Identity string containing the encrypted IMSI. |
| 90 | * @return status Status of the operation. |
| 91 | * Possible status codes: |
| 92 | * |SupplicantStatusCode.SUCCESS|, |
| 93 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 94 | * |SupplicantStatusCode.FAILURE_NETWORK_INVALID| |
| 95 | */ |
| 96 | sendNetworkEapIdentityResponse_1_1( |
| 97 | EapSimIdentity identity, |
| 98 | EapSimEncryptedIdentity encryptedIdentity) |
| 99 | generates (SupplicantStatus status); |
| 100 | }; |