=j?zdZddlZddlmZmZmZmZddlmZmZm Z ddl m Z ddl Tddl TddlmZddlm Z mZmZdd lmZdd lmZddlZGd d ed ZejjjedefdZ de!fdZ"Gdde#Z$e$ede%Z&dZ'dZ(dZ)dZ*GddedZ+Gddede+gZ,Gd d!ed"ejj-e,gzZ.Gd#d$ed%Z/Gd&d'ed(Z0Gd)d*ed+e/e0gZ1Gd,d-ed%Z2Gd.d/ed0e/e2gZ3Gd1d2ed%Z4Gd3d4ed5e4gZ5Gd6d7edZ6Gd8d9ed:Z7Gd;dd?ed@e7gZ9GdAdBedCe6e8e9gZ:GdDdEed(Z;GdFdGedHZ<GdIdJedKZ=GdLdMedNZ>GdOdPedQZ?GdRdSedTZ@GdUdVedWZAGdXdYedZZBGd[d\ed:ZCGd]d^ed_ZDGd`daedbZEGdcdded%ZFGdedfedgeFgZGGdhdiedjeGgZHGdkdledme;e6ee?e@eAe8e9eBeCeDeEeHgZIGdndoed(ZJGdpdqedreJgZKGdsdted%ZLGdudved_ZMGdwdxed ZNGdydzed{eLeJeMeNgZOGd|d}edgeOgZPGd~ded(ZQGddedrePeQgZRGdded%ZSGddedeLgZTGddedeSgZUGddedgZVGddedZWGddedeWgZXGddedZYGddedZZGddedbZ[GddedZ\GddedZ]GddedZ^GddedjZ_GddedZ`GddedZaGddedZbGdded%ZcGdded(ZdGddedZeGddedecedeegZfGddedZgGddedeNeYeZe[e\e]e^e_e`eaebefegg ZhGddedgehgZiGdded(ZjGddedeiejgZkGdÄded(ZlGdńded%ZmGdDŽdedgeYeNgZnGdɄdedenelgZoGd̄dedemgZpGd΄ded%ZqGdЄdedenelgZrGdӄdedeqgZsGdՄded%ZtGdׄdedeYeNgZuGdڄdedetgZvGd܄dedZwGdބded%ZxGddedewgZyGddedexgZzGdded Z{GddedeWe{gZ|GddedZ}GddedeNe}gZ~Gdded%ZGddedegZGddedZGddedZGddedZGdded(ZGddedeeegZGdded%ZGdded(ZGddedZGddedHZGd d edKZGd d edTZGd ded%eeeeeegZGddedgegZGddedegZGddejjZGddejjZGddeZGddeZGddeZdS(z Various definitions related to GSMA consumer + IoT eSIM / eUICC Does *not* implement anything related to M2M eUICC Related Specs: GSMA SGP.21, SGP.22, SGP.31, SGP32 N)ArrayStruct FlagsEnum GreedyRange)cmd2 CommandSetwith_default_category)Hexstr)*) SwMatchError)r SwHexstr SwMatchstr)SimCardCommands)CardProfileUICCc$eZdZeeZdS)Sgp02EidN)__name__ __module__ __qualname__ BcdAdapter GreedyBytes _constructA/home/jenkins/jenkins/workspace/simtester-sanitize/pySim/euicc.pyrr)sK((JJJrrZtagreturnc^t|trYt|dkr|dz }n0t|dkr|dddz}ntdt |}n$t|tr|}|dzr||dzz}d|d zz }||z }t|S) zYCompute and add/replace check digits of an EID value according to GSMA SGP.29 Section 10.00 Nzand EID must be 30 or 32 digitsdba) isinstancestrlen ValueErrorint)eideid_intcsums rcompute_eid_checksumr0/s#s% s88r>> 4KCC XX^^crc(T/CC>?? ?c(( C  % S= % w} $G 2 D tOG w<<rc.t|dzdkS)zLVerify the check digits of an EID value according to GSMA SGP.29 Section 10.r'r,)r-s rverify_eid_checksumr4Gs s88b=A rceZdZdZdZdZdS)VersionAdapterzCconvert an EUICC Version (3-int array) to a textual representation.c6d|d|d|dfzS)Nz%u.%u.%urr2rselfobjcontextpaths r_decodezVersionAdapter._decodePs SVSVSV444rc@d|dDS)Nc,g|]}t|Srr3).0xs r z*VersionAdapter._encode..Ts///1A///r.)splitr9s r_encodezVersionAdapter._encodeSs // #////rN)rrr__doc__r>rFrrrr6r6Ms8MM55500000rr6 A0000005591010FFFFFFFF8900000100 A0000005591010FFFFFFFF8900000200 A0000005591010FFFFFFFF8900000D00 A0000005591010FFFFFFFF8900000E00ceZdZeZdS)SupportedVersionNumberNrrrrrrrrrNrN^JJJrrNceZdZdS)"IsdrProprietaryApplicationTemplateNrrrrrrrSrSaDrrS)rnestedceZdZdS) FciTemplateNrTrrrrYrYfrUrrYoc$eZdZeeZdS)DefaultDpAddressNrrr Utf8Adapterrrrrrr\r\l[))JJJrr\c$eZdZeeZdS) RootDsAddressNr]rrrrbrbnr_rrbceZdZdS)EuiccConfiguredAddressesNrTrrrrerepDrrei<c*eZdZeeddZdS)SetDefaultDpAddrResr)okundefinedErrorNrrrEnumInt8ubrrrrrhrhts$f3777JJJrrhceZdZdS)SetDefaultDpAddressNrTrrrrprpvrfrrpi?c$eZdZedZdS)EuiccChallengeN)rrrBytesrrrrrrrrzsrJJJrrrceZdZdS)GetEuiccChallengeNrTrrrrvrv|rfrrvi.ceZdZeZdS)SVNNrrr VersionTyperrrrrxrxrPrrxceZdZeZdS)SubjectKeyIdentifierNrOrrrr|r|rPrr|ceZdZdS)EuiccCiPkiListForVerificationNrTrrrrrrfrrceZdZdS)EuiccCiPkiListForSigningNrTrrrrrrfrrceZdZdS) EuiccInfo1NrTrrrrrrfrri ceZdZeZdS)ProfileVersionNryrrrrrrPrrceZdZeZdS)EuiccFirmwareVerNryrrrrrrPrrceZdZeZdS)ExtCardResourceNrOrrrrrrPrrceZdZeZdS)UiccCapabilityNrOrrrrrrPrrceZdZeZdS)TS102241VersionNryrrrrrrPrrceZdZeZdS)GlobalPlatformVersionNryrrrrrrPrrceZdZeZdS) RspCapabilityNrOrrrrrrPrrc.eZdZeeddddZdS) EuiccCategoryrr2r8rH)other basicEuicc mediumEuicccontactlessEuiccNrlrrrrrs)fA!UVWWWJJJrrceZdZeZdS) PpVersionNryrrrrrrPrrc$eZdZeeZdS)SsAcreditationNumberNr]rrrrrr_rr c*eZdZeeddZdS)IpaModerr2)ipadipeaNrlrrrrrs$f11---JJJrrceZdZeZdS) IotVersionNryrrrrrrPrrceZdZdS) IotVersionSeqNrTrrrrrrfrrceZdZdS)IotSpecificInfoNrTrrrrrrfrrceZdZdS) EuiccInfo2NrTrrrrrs  Drri"c HeZdZeedeeddddz ZdS)ProfileMgmtOperationpmor`@r#rs)installenabledisabledeleteN)rrrrByterrrrrrrs;eIIdDW[dh$i$i$iijjJJJrrceZdZdS)ListNotificationReqNrTrrrrrrfrri(c"eZdZeZdS) SeqNumberNrrrAsn1DerIntegerrrrrrr!!JJJrrc$eZdZeeZdS)NotificationAddressNr]rrrrrr_rrc$eZdZeeZdS)IccidN)rrrPaddedBcdAdapterrrrrrrrs!!+..JJJrrceZdZdS)NotificationMetadataNrTrrrrrrUrri/ceZdZdS)NotificationMetadataListNrTrrrrrrfrrc(eZdZeedZdS)ListNotificationsResultErrorri)rkNrlrrrrrs"fS111JJJrrceZdZdS)ListNotificationRespNrTrrrrrrUrrc,eZdZeedddZdS)DeleteNotificationStatusrr2rirjnothingToDeleterkNrlrrrrr&fAcJJJJJJrrceZdZdS)NotificationSentReqNrTrrrrrrfrri0ceZdZdS)NotificationSentRespNrTrrrrrrfrrceZdZdS)LoadCRLNrTrrrrrrfrri5c$eZdZeeZdS)TagListN)rrrrrnrrrrrrsV$$JJJrr\ceZdZdS)ProfileInfoListReqNrTrrrrrrfrri-ceZdZeZdS)IsdpAidNrOrrrrrrPrrOc*eZdZeeddZdS) ProfileStaterr2)disabledenabledNrlrrrrrs$fq!444JJJrripc$eZdZeeZdS)ProfileNicknameNr]rrrrrr_rrc$eZdZeeZdS)ServiceProviderNameNr]rrrrrr_rrc$eZdZeeZdS) ProfileNameNr]rrrrrr_rrc*eZdZeeddZdS)IconTyperr2)jpgpngNrlrrrrrs$f!+++JJJrrceZdZeZdS)IconNrOrrrrrrPrrc,eZdZeedddZdS) ProfileClassrr2r8)test provisioning operationalNrlrrrrrs&f11!DDDJJJrrceZdZeZdS)ProfilePolicyRulesNrOrrrrrrPrrceZdZeZdS)NotificationConfigurationInfoNrOrrrrrrPrrc6eZdZeedZdS)ProfileOwnerPLMNrHN)rrr PlmnAdapterrtrrrrrrs%UU1XX&&JJJrrceZdZeZdS)ProfileOwnerGID1NrOrrrrrrPrrceZdZeZdS)ProfileOwnerGID2NrOrrrr r rPrr ceZdZeZdS) ProfileOwnerNrOrrrr r rPrr ceZdZeZdS)SMDPPProprietaryDataNrOrrrrrrPrrceZdZdS) ProfileInfoNrTrrrrrs DrrceZdZdS)ProfileInfoSeqNrTrrrrrrfrrc*eZdZeeddZdS)ProfileInfoListErrorr2r8)incorrectInputValuesrkNrlrrrrrs$f1QGGGJJJrrceZdZdS)ProfileInfoListRespNrTrrrrrrfrrceZdZeZdS) RefreshFlagN)rrrrnrrrrrrsJJJrrc 4eZdZeedddddddZd S) EnableResultrr2r8rHr}ri)rjiccidOrAidNotFoundprofileNotInDisabledStatedisallowedByPolicywrongProfileReenablingcatBusyrkNrlrrrrrs:fqTU)*1a`ceeeJJJrrceZdZdS)ProfileIdentifierNrTrrrr&r& rfrr&ceZdZdS)EnableProfileReqNrTrrrr(r( rfrr(i1ceZdZdS)EnableProfileRespNrTrrrr*r* rfrr*c 2eZdZeeddddddZdS) DisableResultrr2r8rHrri)rjr profileNotInEnabledStater"r$rkNrlrrrr,r,s7fqST)*AcKKKJJJrr,ceZdZdS)DisableProfileReqNrTrrrr/r/rfrr/i2ceZdZdS)DisableProfileRespNrTrrrr1r1rfrr1c0eZdZeedddddZdS) DeleteResultrr2r8rHri)rjr r!r"rkNrlrrrr3r3s5fqTU)*3@@@JJJrr3ceZdZdS)DeleteProfileReqNrTrrrr5r5rfrr5i3ceZdZdS)DeleteProfileRespNrTrrrr7r7rfrr7c,eZdZeedddZdS) ResetOptionsr`rr#)deleteOperationalProfilesdeleteFieldLoadedTestProfilesresetDefaultSmdpAddressN)rrrrrrrrrr9r9#s.44_c37999JJJrr9c,eZdZeedddZdS) ResetResultrr2rirNrlrrrr>r>&rrr>ceZdZdS)EuiccMemoryResetReqNrTrrrr@r@(rfrr@i4ceZdZdS)EuiccMemoryResetRespNrTrrrrBrB*rfrrBceZdZeZdS)EidValueNrOrrrrDrD.rPrrDceZdZdS) GetEuiccDataNrTrrrrFrF0rfrrFi>c$eZdZeeZdS)SnrProfileNicknameNr]rrrrHrH4r_rrHceZdZdS)SetNicknameReqNrTrrrrKrK6rfrrKi)c,eZdZeedddZdS)SetNicknameResultrr2ri)rj iccidNotFoundrkNrlrrrrMrM8s&f!CHHHJJJrrMceZdZdS)SetNicknameRespNrTrrrrPrP:rfrrPceZdZdS) GetCertsReqNrTrrrrRrR>rfrrRiVceZdZeZdS)EumCertificateNrOrrrrTrT@rPrrTceZdZeZdS)EuiccCertificateNrOrrrrWrWBrPrrWc*eZdZeeddZdS) GetCertsErrorr2ri) invalidCiPKIdrkNrlrrrrZrZDs$fAcBBBJJJrrZceZdZdS) GetCertsRespNrTrrrr]r]Frfrr]c$eZdZeeZdS)EimIdNr]rrrr_r_Jr_rr_c$eZdZeeZdS)EimFqdnNr]rrrraraLr_rrac,eZdZeedddZdS) EimIdTyper2r8rH) eimIdTypeOid eimIdTypeFqdneimIdTypeProprietaryNrlrrrrcrcNs'f1ATUVVVJJJrrcc"eZdZeZdS) CounterValueNrrrrrhrhPrrrhc"eZdZeZdS)AssociationTokenNrrrrrjrjRrrrjc0eZdZeedddddZdS)EimSupportedProtocolrr2r8rHr})eimRetrieveHttpseimRetrieveCoapseimInjectHttpseimInjectCoapseimProprietaryNrlrrrrlrlTs3fq1UVgh%&(((JJJrrlceZdZdS)EimConfigurationDataNrTrrrrsrsXrUrrsceZdZdS)EimConfigurationDataSeqNrTrrrruru[rfrruceZdZdS)GetEimConfigurationDataNrTrrrrwrw]rfrrwiUc eZdZfdZeddedededeee ffdZ eddedefdZ edede fd Z d edefd Zed Gd deZxZS)CardApplicationISDRctdtd|j|j_|jxj|gz c_d|j_dS)Nz ADF.ISD-Rz/ISD-R (Issuer Security Domain Root) ApplicationnameaiddescEID)super__init__ AID_ISD_Rdecode_select_responseadfshell_commandsAddlShellCommandsscp_key_identityr: __class__s rrzCardApplicationISDR.__init__asp kyO  Q Q Q*.*E' D$:$:$<$<#==$)!!!r9000scctx_doexp_swrc\dt|dz|fz}|||S)zzPerform STORE DATA according to Table 47+48 in Section 5.7.2 of SGP.22. Only single-block store supported for now.z80E29100%02x%s00r8)r*send_apdu_checksw)rrrcapdus r store_datazCardApplicationISDR.store_datais3#c%jj!mU%;;$$UF333rcB|r9|}t|}|dkrtdSnd}t|t ||\}}|r2|r.|}|t||S|SdS)zTransceive STORE DATA APDU with the card, transparently encoding the command data from TLV and decoding the response data tlv.z DO > 255 bytes not supported yetr)rN)to_tlvr*r+ryrb2hfrom_tlvh2b) rcmd_doresp_clsr cmd_do_enc cmd_do_lendata_swresp_dos rstore_data_tlvz"CardApplicationISDR.store_data_tlvps  JZJC!"DEEE J)44S#j//RX4YY s   "(**  T+++ 4rcttdgg}t||t}|}t t |ddS)Nrdecodedchildrenget_euicc_data eid_value)rFrryrto_dictrflatten_dict_lists)rged_cmdgedds rget_eidzCardApplicationISDR.get_eidsh$)@)@)@(ABBB!00g|LL KKMM%a(8&9::;GHHHrdata_hexct}|t||}t |dSN fci_templaterYrrrrr:rtrs rrz*CardApplicationISDR.decode_select_responseC MM 3x==!!! IIKK!!N"3444rApplication-Specific CommandsceZdZejZeddejedZ dZ ejZ e ddeje dZ d Z d Zd Zd ZejZed edejedZejZedddejedZejZeZeddeddedddejedZejZeZeddeddedddejedZejZeZeddeddejedZejZ e ddd e d!dd"e d#dd$eje d%Z!d&Z"ejZ#e#d'd(e#d)d*eje#d+Z$d,Z%d-Z&d.S)/%CardApplicationISDR.AddlShellCommandsTX_DOz)Hexstring of encoded to-be-transmitted DO)helpcjt|jjj|j\}}dS)zJPerform a raw STORE DATA command as defined for the ES10x eUICC interface.N)ryr_cmdlchanrr)r:opts_datars rdo_es10x_store_dataz9CardApplicationISDR.AddlShellCommands.do_es10x_store_datas*/99$)/:MtzZZLUCCCrct|jjjt t }|}|jt|ddS)z6Perform an ES10a GetEuiccConfiguredAddresses function.euicc_configured_addressesN) ryrrrrrer poutput_jsonr)r:_optsecars r!do_get_euicc_configured_addresseszGCardApplicationISDR.AddlShellCommands.do_get_euicc_configured_addressess`%44TY_5HJbJdJdf~C A I " "#5a8T6U#V#V W W W W Wr DP_ADDRESSz&Default SM-DP+ address as UTF-8 stringc0tt|jg}t|jjj|t}|}|j t|ddS)z.Perform an ES10a SetDefaultDpAddress function.rrset_default_dp_addressN) rpr\rryrrrrrrr)r:rsdda_cmdsddars rdo_set_default_dp_addressz?CardApplicationISDR.AddlShellCommands.do_set_default_dp_addresss|+5Edo5^5^5^4_```H&55dio6I8UhiiD A I " "#5a8P6Q#R#R S S S S Srct|jjjt t }|}|jt|ddS)z,Perform an ES10b GetEUICCChallenge function.get_euicc_challengeN) ryrrrrrvrrrr:rgecrs rdo_get_euicc_challengez.sXXXTXXXrrirrprofile_info_list_respN)allrnested_collection_clsrWappendrrryrrrrrrrr)r:rtagsu8tagsrreqpirs rdo_get_profiles_infoz:CardApplicationISDR.AddlShellCommands.do_get_profiles_infosx +XX[-N-N-P-P-WXXX22Cczz c**** cQh/// cDj111(763J3J3J2KLLL(**$33DIO4GNabbB A I " "#5a8P6Q#R#R S S S S Srz --isdp-aidz#Profile identified by its ISD-P AIDz--iccidzProfile identified by its ICCIDz--refresh-requiredzwhether a REFRESH is requiredc|jr%tt|jg}n;|jr%tt |jg}nt d|t |jg}t|}t |j j j |t}|}|j t#|ddS)z(Perform an ES10c EnableProfile function.rr'Either ISD-P AID or ICCID must be givenenable_profile_respN)isdp_aidr&riccidrr+rrefresh_requiredr(ryrrrrr*rrr)r:rp_idep_cmd_contentsep_cmdeprs rdo_enable_profilez7CardApplicationISDR.AddlShellCommands.do_enable_profiles} L(74=3Q3Q3Q2RSSS L(53L3L3L2MNNN!!JKKK#[9N%O%O%OPO%???F$33DIO4GQbccB A I " "#5a8M6N#O#O P P P P Prc|jr%tt|jg}n;|jr%tt |jg}nt d|t |jg}t|}t |j j j |t}|}|j t#|ddS)z)Perform an ES10c DisableProfile function.rrrdisable_profile_respN)rr&rrrr+rrr/ryrrrrr1rrrr:rrdp_cmd_contentsdp_cmddprs rdo_disable_profilez8CardApplicationISDR.AddlShellCommands.do_disable_profiles} L(74=3Q3Q3Q2RSSS L(53L3L3L2MNNN!!JKKK#[9N%O%O%OPO&@@@F$33DIO4GQcddB A I " "#5a8N6O#P#P Q Q Q Q Qrc|jrt|j}n,|jrt|j}nt d|g}t |}t |jj j |t}| }|j t|ddS)z(Perform an ES10c DeleteProfile function.rrrdelete_profile_respN)rrrrr+r5ryrrrrr7rrrrs rdo_delete_profilez7CardApplicationISDR.AddlShellCommands.do_delete_profiles} Lt}555 LTZ000!!JKKK#fO%???F$33DIO4GQbccB A I " "#5a8M6N#O#O P P P P Prz--delete-operationalzDelete all operational profilesz--delete-test-field-installedz3Delete all test profiles, except pre-installed onesz--reset-smdp-addresszReset the SM-DP+ addresscri}|jrd|d<|jrd|d<|jrd|d<tt |g}t |jjj |t}| }|j t|ddS) zPerform an ES10c eUICCMemoryReset function. This will permanently delete the selected subset of profiles from the eUICC.Tr:r;r<rreuicc_memory_reset_respN)delete_operationaldelete_test_field_installedreset_smdp_addressr@r9ryrrrrrBrrr)r:rflagsmr_cmdmrrs rdo_euicc_memory_resetz;CardApplicationISDR.AddlShellCommands.do_euicc_memory_reset4sE& :5912/ >9=56& 837/0(<3N3N3N2OPPPF$33DIO4GQeffB A I " "#5a8Q6R#S#S T T T T Trc(ttdgg}t|jjj|t}|}|jt|ddS)z!Perform an ES10c GetEID function.rrrrN) rFrryrrrrrrr)r:rrrrs r do_get_eidz0CardApplicationISDR.AddlShellCommands.do_get_eidEsy"WdV-D-D-D,EFFFG%44TY_5H'S_``C A I " "#5a8H6I#J#J K K K K Krz--profile-nicknamezNickname of the profileICCIDz*ICCID of the profile whose nickname to setcd|jpd}t|jt|g}t |}t |jjj |t}| }|j t|ddS)z&Perform an ES10c SetNickname function.rrset_nickname_respN)profile_nicknamerrrrKryrrrrrPrrr)r:rnicknamesn_cmd_contentssn_cmdsnrs rdo_set_nicknamez5CardApplicationISDR.AddlShellCommands.do_set_nicknamePs,2H$TZ888/RZ:[:[:[\O#_===F$33DIO4GQ`aaB A I " "#5a8K6L#M#M N N N N Nrct|jjjt t }|}|jt|ddS)z5Perform an ES10c GetCerts() function on an IoT eUICC.get_certs_respN) ryrrrrrRr]rrr)r:rgcrs r do_get_certsz2CardApplicationISDR.AddlShellCommands.do_get_certsZs]$33DIO4GXdeeB A I " "#5a8H6I#J#J K K K K Krct|jjjt t }|}|jt|ddS)zBPerform an ES10b GetEimConfigurationData function on an Iot eUICC.get_eim_configuration_dataN) ryrrrrrwrrrrs rdo_get_eim_configuration_datazCCardApplicationISDR.AddlShellCommands.do_get_eim_configuration_data`sf%44TY_5HJaJcJc5LNNC A I " "#5a8T6U#V#V W W W W WrN)'rrrargparseArgumentParseres10x_store_data_parser add_argumentrwith_argparserrrset_def_dp_addr_parserrrrrrrem_notif_parserr,rget_profiles_info_parserren_prof_parseradd_mutually_exclusive_group en_prof_grprdis_prof_parser dis_prof_grprdel_prof_parser del_prof_grprmem_res_parserrrset_nickname_parserrr!r$rrrrrs#:("9";";,,W;f,ggg  4 5 5 [ [ 6 5 [ X X X "9!8!:!:++L?g+hhh  3 4 4 T T 5 4 T Q Q Q  I I I  I I I  T T T 38244%%hS?r%sss  - . . T T / . T$;8#:#<#<  --glQw-xxx  5 6 6 T T 7 6 T*1022$AACC   4Y ZZZ  1R SSS##$8Ts#ttt  ^ , , Q Q - , Q2(133&CCEE !!,5Z![[[!!)2S!TTT$$%9,Ut$uuu  _ - - R R . - R2(133&CCEE !!,5Z![[[!!)2S!TTT  _ - - Q Q . - Q1022##$:<)J $ L L L##$CL)^ $ ` ` `##$:<)C $ E E E  ^ , , U U - , U  L L L6h577(()=D](^^^((7c(ddd  0 1 1 O O 2 1 O L L L  X X X X Xrr)r)rrrr staticmethodrr rTupler rrr)robjectrr rr __classcell__rs@rryry`sj*****4444 4W\]cem]mWn444\4 Oz\*I_IIII\I 5v5&5555 :;;QXQXQXQXQXJQXQX<;QXQXQXQXQXrrycleZdZdedefdZfdZedGddeZ xZ S)CardApplicationECASDrrct}|t||}t |dSrrrs rrz+CardApplicationECASD.decode_select_responsehrrctdtd|j|j_|jxj|gz c_d|j_dS)Nz ADF.ECASDz?ECASD (eUICC Controlling Authority Security Domain) Applicationr{r)rr AID_ECASDrrrrrrs rrzCardApplicationECASD.__init__nsp ky_  a a a*.*E' D$:$:$<$<#==$)!!!rrceZdZdS)&CardApplicationECASD.AddlShellCommandsNrTrrrrrAvs rr) rrrr r8rrr rrr9r:s@rr<r<gs5v5&5555 *****:;;     J  <;     rr<cBeZdZdZfdZededdfdZxZS)CardProfileEuiccSGP32rcLtddS)NzIoT eUICC (SGP.32)r|rrrs rrzCardProfileEuiccSGP32.__init__}% 233333rrrNcd|_|tt|t t dSNr")cla_byte select_adfrryrrRr]clsrs r_try_match_cardz%CardProfileEuiccSGP32._try_match_cards?  y!!!**3 |LLLLLr rrrORDERr classmethodrrNr9r:s@rrCrCzsu E44444M/MdMMM[MMMMMrrCcBeZdZdZfdZededdfdZxZS)CardProfileEuiccSGP22cLtddS)NzConsumer eUICC (SGP.22)rErFrs rrzCardProfileEuiccSGP22.__init__s% 788888rrrNc|d|_|tt|}dSrI)rJrKrryr)rMrr-s rrNz%CardProfileEuiccSGP22._try_match_cards4  y!!!!))#..rrOr:s@rrSrSsk E99999///d///[/////rrScBeZdZdZfdZededdfdZxZS)CardProfileEuiccSGP02cLtddS)NzM2M eUICC (SGP.02)rErFrs rrzCardProfileEuiccSGP02.__init__rGrrrNcrd|_|t|ddS)Nr"r)rJrKr?get_datarLs rrNz%CardProfileEuiccSGP02._try_match_cards3  y!!! TrrOr:s@rrXrXsk E44444/d[rrX)rGr% constructrrrrrrr osmocom.utilsr osmocom.tlvosmocom.constructpySim.exceptionsr pySim.utilsr rpySim.commandsrpySim.ts_102_221rpySim.global_platformpySim BER_TLV_IErglobal_platformDataCollectionpossible_nestedrr)r0boolr4Adapterr6rnrzrr?AID_ISD_P_FILEAID_ISD_P_MODULErNrSFciTemplateNestedListrYr\rbrerhrprrrvrxr|rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r rrrrrrrr&r(r*r,r/r1r3r5r7r9r>r@rBrDrFrHrKrMrPrRrTrWrZr]r_rarcrhrjrlrsrurwCardApplicationSDryr<rCrSrXrrrrqs.;;;;;;;;;;;;8888888888 ))))))4444444444******,,,,,,)))))zt))))$4;;HEEE0 00000W000nUU1f--.. 9 8 88ZT     G]F^         *$u/D/Z0R/S0T    *****zt*********JD****     zv?OQ^>_    88888*$8888     *&:JL_9`    ZT     7G    *$:4     JDBVAW         zt=Q@]1I=Zc1EwP_ 1a    kkkkk:4kkkk     *&:N9O    """"" """"******$****/////JD////     :69FZ;NPU;W         zt=QPRo0<>R0T         ZT;-    HHHHH:4HHHH     *&.J^9_    *$eeeee:4eeee     gu5E         zv7H+6V          ~    KKKKKJDKKKK     8I;7W             @@@@@:4@@@@     zvw6F          ~    99999:49999KKKKK*$KKKK     *&,         :6;-    zt     :67H2E    *********     ZVUCSUb2c    *****JD*********jd****WWWWW WWWW""""":4"""""""""zt""""(((((:4((((     :4T`9IK_9a         jdU=V    EXEXEXEXEX%/AEXEXEXN     50B   & M M M M MO M M M / / / / /O / / /     O     r