Compare commits
2 commits
c2cc8ceb2a
...
481b9ce196
Author | SHA1 | Date | |
---|---|---|---|
481b9ce196 | |||
ce7fb29c14 |
3 changed files with 41 additions and 0 deletions
|
@ -16,6 +16,8 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|||
import im.angry.openeuicc.common.R
|
||||
import im.angry.openeuicc.util.*
|
||||
import kotlinx.coroutines.launch
|
||||
import net.typeblog.lpac_jni.impl.DEFAULT_PKID_GSMA_RSP2_ROOT_CI1
|
||||
import net.typeblog.lpac_jni.impl.PKID_GSMA_TEST_CI
|
||||
|
||||
class EuiccInfoActivity : BaseEuiccAccessActivity() {
|
||||
private lateinit var swipeRefresh: SwipeRefreshLayout
|
||||
|
@ -43,6 +45,11 @@ class EuiccInfoActivity : BaseEuiccAccessActivity() {
|
|||
|
||||
logicalSlotId = intent.getIntExtra("logicalSlotId", 0)
|
||||
|
||||
title = getString(
|
||||
R.string.euicc_info_activity_title,
|
||||
getString(R.string.channel_name_format, logicalSlotId)
|
||||
)
|
||||
|
||||
swipeRefresh.setOnRefreshListener { refresh() }
|
||||
|
||||
setupRootViewInsets(infoList)
|
||||
|
@ -105,6 +112,31 @@ class EuiccInfoActivity : BaseEuiccAccessActivity() {
|
|||
euiccInfo2?.freeNvram?.let { formatFreeSpace(it) } ?: unknownStr
|
||||
))
|
||||
|
||||
euiccInfoItems.add(
|
||||
Pair(
|
||||
getString(R.string.euicc_info_gsma_prod),
|
||||
if (euiccInfo2?.euiccCiPKIdListForSigning?.contains(
|
||||
DEFAULT_PKID_GSMA_RSP2_ROOT_CI1
|
||||
) == true
|
||||
) {
|
||||
getString(R.string.supported)
|
||||
} else {
|
||||
getString(R.string.unsupported)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
euiccInfoItems.add(
|
||||
Pair(
|
||||
getString(R.string.euicc_info_gsma_test),
|
||||
if (PKID_GSMA_TEST_CI.any { euiccInfo2?.euiccCiPKIdListForSigning?.contains(it) == true }) {
|
||||
getString(R.string.supported)
|
||||
} else {
|
||||
getString(R.string.unsupported)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
infoList.adapter!!.notifyDataSetChanged()
|
||||
|
||||
swipeRefresh.isRefreshing = false
|
||||
|
|
|
@ -72,12 +72,18 @@
|
|||
<string name="profile_notification_delete">Delete</string>
|
||||
|
||||
<string name="euicc_info">eUICC Info</string>
|
||||
<string name="euicc_info_activity_title">eUICC Info (%s)</string>
|
||||
<string name="euicc_info_eid">EID</string>
|
||||
<string name="euicc_info_firmware_version">eUICC OS Version</string>
|
||||
<string name="euicc_info_globalplatform_version">GlobalPlatform Version</string>
|
||||
<string name="euicc_info_sas_accreditation_number">SAS Accreditation Number</string>
|
||||
<string name="euicc_info_pp_version">Protected Profile Version</string>
|
||||
<string name="euicc_info_free_nvram">Free NVRAM (eSIM profile storage)</string>
|
||||
<string name="euicc_info_gsma_prod">GSMA Production Certificate</string>
|
||||
<string name="euicc_info_gsma_test">GSMA Test Certificate</string>
|
||||
|
||||
<string name="supported">Supported</string>
|
||||
<string name="unsupported">Unsupported</string>
|
||||
|
||||
<string name="logs_save">Save</string>
|
||||
<string name="logs_filename_template">Logs at %s</string>
|
||||
|
|
|
@ -7,6 +7,9 @@ import java.security.cert.CertificateFactory
|
|||
|
||||
const val DEFAULT_PKID_GSMA_RSP2_ROOT_CI1 = "81370f5125d0b1d408d4c3b232e6d25e795bebfb"
|
||||
|
||||
val PKID_GSMA_TEST_CI =
|
||||
arrayOf("34eecf13156518d48d30bdf06853404d115f955d", "2209f61cd9ec5c9c854e787341ff83ecf9776a5b")
|
||||
|
||||
private fun getCertificate(keyId: String): Certificate? =
|
||||
KNOWN_CI_CERTS[keyId]?.toByteArray()?.let { cert ->
|
||||
ByteArrayInputStream(cert).use { stream ->
|
||||
|
|
Loading…
Add table
Reference in a new issue