package Ġex po . modules . updates . code signing Ċ Ċ import Ġandroidx . test . platform . app . Instrumentation Registry Ċ Ċ enum Ġclass ĠTest Certificate Type ( val Ġcert Name : ĠString ) Ġ{ ĊĠ ĠCH AIN _ INTER MEDI ATE (" chain Intermediate "), ĊĠ ĠCH AIN _ LEAF (" chain Leaf "), ĊĠ ĠCH AIN _ ROOT (" chain Root "), ĊĠ ĠINVALID _ SIGNATURE _ CHAIN _ LEAF (" invalid Signature Chain Leaf "), ĊĠ ĠNOT _ CODE _ SIGN ING _ EXT ENDED _ USAGE (" no Code Signing Extended Usage "), ĊĠ ĠNO _ KEY _ USAGE (" no Key Usage "), ĊĠ ĠS ING ATURE _ INVALID (" signature Invalid "), ĊĠ ĠVALID (" test "), ĊĠ ĠVALID ITY _ EXPI RED (" validity Expired "), ĊĠ ĠCH AIN _ NOT _ CA _ ROOT (" chain Not CAR oot "), ĊĠ ĠCH AIN _ NOT _ CA _ INTER MEDI ATE (" chain Not CA Intermediate "), ĊĠ ĠCH AIN _ NOT _ CA _ LEAF (" chain Not CAL eaf "), ĊĠ ĠCH AIN _ PATH _ LEN _ VI OL ATION _ ROOT (" chain Path Len Violation Root "), ĊĠ ĠCH AIN _ PATH _ LEN _ VI OL ATION _ INTER MEDI ATE (" chain Path Len Violation Intermediate "), ĊĠ ĠCH AIN _ PATH _ LEN _ VI OL ATION _ LEAF (" chain Path Len Violation Leaf "), Ċ } Ċ Ċ fun Ġget Test Certificate ( test Certificate Type : ĠTest Certificate Type ): ĠString Ġ{ ĊĠ Ġreturn ĠInstrument ation Registry . get Instrumentation (). context . assets . open ("${ Certificate Fixtures :: class . java . canonical Name }/${ test Certificate Type . cert Name }. pem "). read Bytes (). decode ToString () Ċ } Ċ Ċ object ĠCertificate Fixtures Ġ{ ĊĠ Ġconst Ġval Ġtest Classic Manifest Body Ġ= Ġ"{\" sdk Version \":\" 3 9 . 0 . 0 \",\" release Id \":\" 0 eef 8 2 1 4 - 4 8 3 3 - 4 0 8 9 - 9 dff - b 4 1 3 8 a 1 4 f 1 9 6 \",\" commit Time \":\" 2 0 2 0 - 1 1 - 1 1 T 0 0 : 1 7 : 5 4 . 7 9 7 Z \",\" bundle Url \":\" https :// url . to / bundle . js \" }" ĊĊĠ Ġconst Ġval Ġtest New Manifest Body Ġ= Ġ"{\" id \":\" 0 7 5 4 dad 0 - d 2 0 0 - d 6 3 4 - 1 1 3 c - ef 1 f 2 6 1 0 6 0 2 8 \",\" createdAt \":\" 2 0 2 1 - 1 1 - 2 3 T 0 0 : 5 7 : 1 4 . 4 3 7 Z \",\" runtime Version \":\" 1 \",\" assets \": [{ \" hash \":\" cb 6 5 f afb 5 ed 4 5 6 fc 3 ed 8 a 7 2 6 cf 4 0 8 7 d 3 7 b 8 7 5 1 8 4 eba 9 6 f 3 3 f 6 d 9 9 1 0 4 e 6 e 2 2 6 6 d \",\" key \":\" 4 8 9 ea 2 f 1 9 fa 8 5 0 b 6 5 6 5 3 ab 4 4 5 6 3 7 a 1 8 1 . jpg \",\" contentType \":\" image / jpeg \",\" url \":\" http :// 1 9 2 . 1 6 8 . 6 4 . 1 : 3 0 0 0 / api / assets ? asset = updates / 1 / assets / 4 8 9 ea 2 f 1 9 fa 8 5 0 b 6 5 6 5 3 ab 4 4 5 6 3 7 a 1 8 1 & runtime Version = 1 & platform = android \",\" file Extension \":\" . jpg \" }], \" launch Asset \":{\" hash \":\" 3 2 3 ddd 1 9 6 8 ee 7 6 d 4 dd bb 1 6 b 0 4 fb 2 c 3 f 1 b 6 d 1 ab 9 b 6 3 7 d 8 1 9 6 9 9 fec d 6 fa 0 ffb 1 a 8 \",\" key \":\" 6 9 6 a 7 0 cf 7 0 3 5 6 6 4 c 2 0 ea 8 6 f 6 7 dae 8 2 2 b . bundle \",\" contentType \":\" application / javascript \",\" url \":\" http :// 1 9 2 . 1 6 8 . 6 4 . 1 : 3 0 0 0 / api / assets ? asset = updates / 1 / bundles / android - 6 9 6 a 7 0 cf 7 0 3 5 6 6 4 c 2 0 ea 8 6 f 6 7 dae 8 2 2 b . js & runtime Version = 1 & platform = android \",\" file Extension \":\" . bundle \" }, \" extra \":{\" scope Key \":\" @ test / app \",\" eas \":{\" projectId \":\" 2 8 5 dc 9 ca - a 2 5 d - 4 f 6 0 - 9 3 be - 3 6 dc 3 1 2 2 6 6 d 7 \" }} }" ĊĠ Ġconst Ġval Ġtest New Manifest Body Signature Ġ= Ġ" sig =\" cp D it 5 v R 1 8 rz 2 nd Ux / SX 5 GO Z ty n ky 8 g 1 5 Gq RK na B qn 2 MN 2 a 3 jes Y UR c IoT gl 0 d + IQ c Kr Ni SH z pg 4 I ri T cN x 4 kv 5 Qw 4 q Bi iz DH B vy Lv ZU 1 O 9 d 9 4 w 0 i DU 1 k SA V 7 Oh P 4 fg WJ Z J Edm L Al TQ 2 il H 9 W lot Q FU 2 S ot C 0 4 y NB j R 6 5 N Li Ab B py s X 0 +/ Vp WP uu H mJ y S 1 H vi Ng q 0 Z tk n H 4 Dz jz DW PR i 2 Log z Pn Q KA mb M Fl FG pen ql 9 YI px b 4 H QP cs dp APP j ES Z eg K 4 ki q bz Q Ex 5 E 5 OY AM F Gl / pD 9 Dr Zh PD p F Hu 6 f 0 UF ng W ep Wq Ns YA 0 b F 9 Ba EP 2 0 To K // L Al O co E 0 ly U PE Y f V CM MA == \"" ĊĠ Ġconst Ġval Ġtest New Manifest Body Valid Chain Leaf Signature Ġ= Ġ" sig =\" XZ 5 i / h Q TX L 3 zq X Iv K ii Nf O Z Mn E 7 ne Wj Qo DT xi Pb gr L q xj 8 ax TG zn ws C 0 7 pv 2 hi CY ql CL St eb j Y + F 4 u YES g du uh Ex G 3 XE aj bs PAN Jn + vl 1 LW w 1 8 BR aq GF W rv gy A 4 + j qu W CT Rm Jn MQ o D 0 p Fy V 6 u Y 7 L 2 l 8 j V 8 + p Jb B 0 Q so A 3 xf n Ie TE l T CT k QM 6 0 E 3 f 0 h BY r GV 2 s 8 1 6 HV l 7 d Rz + 3 x O q UE 1 3 9 / I 5 xh dy t E ok k Z fk h Qc J 3 Pg j 1 N bg v A Un A ASS s G mk Ak B isy 8 Q EG 9 J 0 k zs 3 Kg 8 x 7 9 g 1 9 Ie 4 H BL X UB fg T 0 w H / 7 u 9 ng y 9 u Dy Z 2 E 4 3 LV aL Jp J bz tx Ai 8 FC W 0 Xu Qt T ied KK JH un w == \"" ĊĊĠ Ġconst Ġval Ġtest New Manifest Body Incorrect ProjectId Ġ= Ġ"{\" id \":\" 0 7 5 4 dad 0 - d 2 0 0 - d 6 3 4 - 1 1 3 c - ef 1 f 2 6 1 0 6 0 2 8 \",\" createdAt \":\" 2 0 2 1 - 1 1 - 2 3 T 0 0 : 5 7 : 1 4 . 4 3 7 Z \",\" runtime Version \":\" 1 \",\" assets \": [{ \" hash \":\" cb 6 5 f afb 5 ed 4 5 6 fc 3 ed 8 a 7 2 6 cf 4 0 8 7 d 3 7 b 8 7 5 1 8 4 eba 9 6 f 3 3 f 6 d 9 9 1 0 4 e 6 e 2 2 6 6 d \",\" key \":\" 4 8 9 ea 2 f 1 9 fa 8 5 0 b 6 5 6 5 3 ab 4 4 5 6 3 7 a 1 8 1 . jpg \",\" contentType \":\" image / jpeg \",\" url \":\" http :// 1 9 2 . 1 6 8 . 6 4 . 1 : 3 0 0 0 / api / assets ? asset = updates / 1 / assets / 4 8 9 ea 2 f 1 9 fa 8 5 0 b 6 5 6 5 3 ab 4 4 5 6 3 7 a 1 8 1 & runtime Version = 1 & platform = android \",\" file Extension \":\" . jpg \" }], \" launch Asset \":{\" hash \":\" 3 2 3 ddd 1 9 6 8 ee 7 6 d 4 dd bb 1 6 b 0 4 fb 2 c 3 f 1 b 6 d 1 ab 9 b 6 3 7 d 8 1 9 6 9 9 fec d 6 fa 0 ffb 1 a 8 \",\" key \":\" 6 9 6 a 7 0 cf 7 0 3 5 6 6 4 c 2 0 ea 8 6 f 6 7 dae 8 2 2 b . bundle \",\" contentType \":\" application / javascript \",\" url \":\" http :// 1 9 2 . 1 6 8 . 6 4 . 1 : 3 0 0 0 / api / assets ? asset = updates / 1 / bundles / android - 6 9 6 a 7 0 cf 7 0 3 5 6 6 4 c 2 0 ea 8 6 f 6 7 dae 8 2 2 b . js & runtime Version = 1 & platform = android \",\" file Extension \":\" . bundle \" }, \" extra \":{\" scope Key \":\" @ test / app \",\" eas \":{\" projectId \":\" 4 8 5 dc 9 ca - a 2 5 d - 4 f 6 0 - 9 3 be - 3 6 dc 3 1 2 2 6 6 d 8 \" }} }" ĊĠ Ġconst Ġval Ġtest New Manifest Body Valid Chain Leaf Signature Incorrect ProjectId Ġ= Ġ" sig =\" K 5 sq G 7 xz l psi VE Fi 7 fb Z 9 j Bb R J 0 dp V fg M 7 l 4 lz Y US x S xe X 5 Zq jy DQ cM luc gz B 3 ei WS 3 x gz AH cr 2 sf 5 wy Rj zz Y F 1 He Ve ju Gt C Cl c Z 8 5 R fu Xz F Ing E li 2 w 8 / Oh Wv 5 Vz OA y C 8 f J + Nx I UY d 9 8 1 p N WA i C 6 f X 1 ON 4 u 9 e 6 U To b SR iB + h Du 9 1 v KB MP ft X 1 t To BLE 5 3 fa V 8 bu 0 bm Kd CG 1 5 I + AY Io 0 ux 2 3 3 7 za X q kk W SL lf Lz 2 + Tw / v 3 q O 1 Y tp 2 s L 1 IP CH + Ed q emy 7 wY u UM Z Go MY 0 Lz Qf xe Ph 3 vn PC N 8 / R / r Sv E 5 D / 3 9 q Qo Na 3 M ca S 2 2 e A uj 9 3 C Fl hs 1 Pm j 1 wm 9 UT q yi V 1 XG aj 9 w == \"" Ċ } Ċ