mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "IRadio 1.6: Public Key Type For IMSI Encryption"
This commit is contained in:
@@ -496,4 +496,20 @@ interface IRadio extends @1.5::IRadio {
|
||||
* Response function is IRadioResponse.getCurrentCallsResponse_1_6()
|
||||
*/
|
||||
oneway getCurrentCalls_1_6(int32_t serial);
|
||||
|
||||
/**
|
||||
* Provide Carrier specific information to the modem that must be used to
|
||||
* encrypt the IMSI and IMPI. Sent by the framework during boot, carrier
|
||||
* switch and everytime the framework receives a new certificate.
|
||||
*
|
||||
* @param serial Serial number of request.
|
||||
* @param imsiEncryptionInfo ImsiEncryptionInfo as defined in types.hal.
|
||||
*
|
||||
* Response callback is
|
||||
* IRadioResponse.setCarrierInfoForImsiEncryptionResponse()
|
||||
*
|
||||
* Note this API is the same as the 1.1 version except using the 1.6 ImsiEncryptionInfo
|
||||
* as the input param.
|
||||
*/
|
||||
oneway setCarrierInfoForImsiEncryption_1_6(int32_t serial, @1.6::ImsiEncryptionInfo imsiEncryptionInfo);
|
||||
};
|
||||
|
||||
@@ -27,6 +27,7 @@ import @1.1::EutranBands;
|
||||
import @1.1::GeranBands;
|
||||
import @1.1::ScanStatus;
|
||||
import @1.1::UtranBands;
|
||||
import @1.1::ImsiEncryptionInfo;
|
||||
import @1.2::Call;
|
||||
import @1.2::CellInfoCdma;
|
||||
import @1.2::CellConnectionStatus;
|
||||
@@ -898,3 +899,20 @@ enum DataCallFailCause : @1.4::DataCallFailCause {
|
||||
*/
|
||||
SLICE_REJECTED = 0x8CC,
|
||||
};
|
||||
|
||||
/**
|
||||
* Public key type from carrier certificate.
|
||||
*/
|
||||
enum PublicKeyType : int32_t {
|
||||
EPDG = 1, // Key type to be used for ePDG
|
||||
WLAN = 2, // Key type to be used for WLAN
|
||||
};
|
||||
|
||||
/**
|
||||
* Carrier specific Information sent by the carrier,
|
||||
* which will be used to encrypt the IMSI and IMPI.
|
||||
*/
|
||||
struct ImsiEncryptionInfo {
|
||||
@1.1::ImsiEncryptionInfo base;
|
||||
PublicKeyType keyType; // Public key type
|
||||
};
|
||||
|
||||
@@ -583,3 +583,29 @@ TEST_P(RadioHidlTest_v1_6, getCurrentCalls_1_6) {
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
EXPECT_EQ(::android::hardware::radio::V1_6::RadioError::NONE, radioRsp_v1_6->rspInfo.error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Test IRadio.setCarrierInfoForImsiEncryption_1_6() for the response returned.
|
||||
*/
|
||||
TEST_P(RadioHidlTest_v1_6, setCarrierInfoForImsiEncryption_1_6) {
|
||||
serial = GetRandomSerialNumber();
|
||||
::android::hardware::radio::V1_6::ImsiEncryptionInfo imsiInfo;
|
||||
imsiInfo.base.mcc = "310";
|
||||
imsiInfo.base.mnc = "004";
|
||||
imsiInfo.base.carrierKey = (std::vector<uint8_t>){1, 2, 3, 4, 5, 6};
|
||||
imsiInfo.base.keyIdentifier = "Test";
|
||||
imsiInfo.base.expirationTime = 20180101;
|
||||
imsiInfo.keyType = PublicKeyType::EPDG;
|
||||
|
||||
radio_v1_6->setCarrierInfoForImsiEncryption_1_6(serial, imsiInfo);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
|
||||
if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::NONE,
|
||||
::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user