(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tid) op: Equal rhs: {(DQ ('ssh-keygen known_hosts'))} spids: [7] ) ] spids: [7] ) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.) (Lit_Other '*')}) (ForEach iter_name: x iter_words: [{(host-a)} {(host-b)} {(host-c)} {(host-d)} {(host-e)} {(host-f)} {(host-a2)} {(host-b2)}] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [ (C {(${ VSub_Name SSHKEYGEN)} {(-qt)} {(ed25519)} {(-f)} {($ VSub_Name '$OBJ') (/kh.) ($ VSub_Name '$x')} {(-C)} {(DQ ($ VSub_Name '$x'))} {(-N)} {(DQ )} ) (C {(fatal)} {(DQ ('ssh-keygen failed'))}) ] op_id: Op_DPipe ) (SimpleCommand words: [{(echo)} {(DQ ('# ') ($ VSub_Name '$x'))}] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.hosts)} spids: [98] ) ] ) (Subshell child: (CommandList children: [ (Case to_match: {(DQ ($ VSub_Name '$x'))} arms: [ (case_arm pat_list: [{(host-a)} {(host-b)}] action: [(C {(printf)} {(DQ ($ VSub_Name '$x') (' '))})] spids: [116 119 128 16777215] ) (case_arm pat_list: [{(host-c)}] action: [(C {(printf)} {(DQ ('@cert-authority ') ($ VSub_Name '$x') (' '))})] spids: [131 132 142 16777215] ) (case_arm pat_list: [{(host-d)}] action: [(C {(printf)} {(DQ ('@revoked ') ($ VSub_Name '$x') (' '))})] spids: [145 146 156 16777215] ) (case_arm pat_list: [{(host-e)}] action: [(C {(printf)} {(DQ ('host-e* '))})] spids: [159 160 168 16777215] ) (case_arm pat_list: [{(host-f)}] action: [(C {(printf)} {(DQ ('host-f,host-g,host-h '))})] spids: [171 172 180 16777215] ) (case_arm pat_list: [{(host-a2)}] action: [(C {(printf)} {(DQ ('host-a '))})] spids: [183 184 192 16777215] ) (case_arm pat_list: [{(host-b2)}] action: [(C {(printf)} {(DQ ('host-b '))})] spids: [195 196 204 16777215] ) ] spids: [107 113 207] ) (C {(cat)} {($ VSub_Name '$OBJ') (/kh.) (${ VSub_Name x) (.pub)}) (SimpleCommand words: [{(echo)} {(DQ )}] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.hosts)} spids: [229] ) ] ) ] ) redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.hosts)} spids: [237] ) ] spids: [104 235] ) ] spids: [48 242] ) spids: [30 46] ) (SimpleCommand words: [{(cat)} {($ VSub_Name '$OBJ') (/kh.hosts)}] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.invalid)} spids: [259] ) ] ) (SimpleCommand words: [{(echo)} {(DQ ('host-i '))}] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.invalid)} spids: [270] ) ] ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.invalid)} {($ VSub_Name '$OBJ') (/kh.invalid.orig)}) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.hosts)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)}) (FuncDef name: expect_key body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_host) op: Equal rhs: {($ VSub_Number '$1')} spids: [300] ) ] spids: [300] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_hosts) op: Equal rhs: {($ VSub_Number '$2')} spids: [304] ) ] spids: [304] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_key) op: Equal rhs: {($ VSub_Number '$3')} spids: [308] ) ] spids: [308] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_line) op: Equal rhs: {($ VSub_Number '$4')} spids: [312] ) ] spids: [312] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_mark) op: Equal rhs: {($ VSub_Number '$5')} spids: [316] ) ] spids: [316] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:_marker) op:Equal rhs:{(DQ )} spids:[320])] spids: [320] ) (AndOr children: [ (C {(test)} {(DQ (x) ($ VSub_Name '$_mark'))} {(Lit_Other '=')} {(DQ (xCA))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_marker) op: Equal rhs: {(DQ ('@cert-authority '))} spids: [340] ) ] spids: [340] ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(test)} {(DQ (x) ($ VSub_Name '$_mark'))} {(Lit_Other '=')} {(DQ (xREVOKED))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_marker) op: Equal rhs: {(DQ ('@revoked '))} spids: [361] ) ] spids: [361] ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(test)} {(DQ (x) ($ VSub_Name '$_line'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (x))}) (SimpleCommand words: [ {(echo)} { (DQ ('# Host ') ($ VSub_Name '$_host') (' found: line ') ($ VSub_Name '$_line') (' ') ($ VSub_Name '$_mark') ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.expect)} spids: [395] ) ] ) ] op_id: Op_DAmp ) (SimpleCommand words: [{(printf)} {(DQ (${ VSub_Name _marker) ($ VSub_Name '$_hosts') (' '))}] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.expect)} spids: [411] ) ] ) (AndOr children: [ (SimpleCommand words: [{(cat)} {($ VSub_Name '$OBJ') (/kh.) (${ VSub_Name _key) (.pub)}] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.expect)} spids: [426] ) ] ) (C {(fatal)} {(DQ (${ VSub_Name _key) ('.pub missing'))}) ] op_id: Op_DPipe ) ] spids: [297] ) spids: [293 296] ) (FuncDef name: check_find body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_host) op: Equal rhs: {($ VSub_Number '$1')} spids: [453] ) ] spids: [453] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_name) op: Equal rhs: {($ VSub_Number '$2')} spids: [457] ) ] spids: [457] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_keygenopt) op: Equal rhs: {($ VSub_Number '$3')} spids: [461] ) ] spids: [461] ) (SimpleCommand words: [ {(${ VSub_Name SSHKEYGEN)} {($ VSub_Name '$_keygenopt')} {(-f)} {($ VSub_Name '$OBJ') (/kh.invalid)} {(-F)} {($ VSub_Name '$_host')} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.result)} spids: [480] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(diff)} {(-w)} {($ VSub_Name '$OBJ') (/kh.expect)} {($ VSub_Name '$OBJ') (/kh.result)} ) ] negated: True ) terminator: <Op_Semi ';'> ) ] action: [(C {(fail)} {(DQ ("didn't find ") ($ VSub_Name '$_name'))})] spids: [16777215 502] ) ] spids: [16777215 513] ) ] spids: [450] ) spids: [446 449] ) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-a)} {(host-a)} {(host-a)} {(2)}) (C {(expect_key)} {(host-a)} {(host-a)} {(host-a2)} {(20)}) (C {(check_find)} {(host-a)} {(DQ ('simple find'))}) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-c)} {(host-c)} {(host-c)} {(8)} {(CA)}) (C {(check_find)} {(host-c)} {(DQ ('find CA key'))}) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-d)} {(host-d)} {(host-d)} {(11)} {(REVOKED)}) (C {(check_find)} {(host-d)} {(DQ ('find revoked key'))}) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-e.somedomain)} {(DQ ('host-e*'))} {(host-e)} {(14)}) (C {(check_find)} {(host-e.somedomain)} {(DQ ('find wildcard key'))}) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-h)} {(DQ ('host-f,host-g,host-h '))} {(host-f)} {(17)}) (C {(check_find)} {(host-h)} {(DQ ('find multiple hosts'))}) (FuncDef name: check_hashed_find body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_host) op: Equal rhs: {($ VSub_Number '$1')} spids: [688] ) ] spids: [688] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_name) op: Equal rhs: {($ VSub_Number '$2')} spids: [692] ) ] spids: [692] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_file) op: Equal rhs: {($ VSub_Number '$3')} spids: [696] ) ] spids: [696] ) (AndOr children: [ (C {(test)} {(DQ (x) ($ VSub_Name '$_file'))} {(Lit_Other '=')} {(DQ (x))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_file) op: Equal rhs: {($ VSub_Name '$OBJ') (/kh.invalid)} spids: [715] ) ] spids: [715] ) ] op_id: Op_DAmp ) (Pipeline children: [ (C {(${ VSub_Name SSHKEYGEN)} {(-f)} {($ VSub_Name '$_file')} {(-HF)} {($ VSub_Name '$_host')} ) (C {(grep)} {(SQ <'|1|'>)}) (SimpleCommand words: [{(sed)} {(DQ ('s/^[^ ]*/') ($ VSub_Name '$_host') (/))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.result)} spids: [752] ) ] ) ] negated: False ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(diff)} {(-w)} {($ VSub_Name '$OBJ') (/kh.expect)} {($ VSub_Name '$OBJ') (/kh.result)} ) ] negated: True ) terminator: <Op_Semi ';'> ) ] action: [(C {(fail)} {(DQ ("didn't find ") ($ VSub_Name '$_name'))})] spids: [16777215 774] ) ] spids: [16777215 785] ) ] spids: [685] ) spids: [681 684] ) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-a)} {(host-a)} {(host-a)}) (C {(expect_key)} {(host-a)} {(host-a)} {(host-a2)}) (C {(check_hashed_find)} {(host-a)} {(DQ ('find simple and hash'))}) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-c)} {(host-c)} {(host-c)} {(DQ )} {(CA)}) (C {(check_find)} {(host-c)} {(DQ ('find simple and hash'))} {(-H)}) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-d)} {(host-d)} {(host-d)} {(DQ )} {(REVOKED)}) (C {(check_find)} {(host-d)} {(DQ ('find simple and hash'))} {(-H)}) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-e)} {(DQ ('host-e*'))} {(host-e)} {(DQ )}) (C {(check_find)} {(host-e)} {(DQ ('find wildcard key'))} {(-H)}) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-f)} {(DQ ('host-h '))} {(host-f)}) (C {(expect_key)} {(host-g)} {(DQ ('host-h '))} {(host-f)}) (C {(expect_key)} {(host-h)} {(DQ ('host-h '))} {(host-f)}) (C {(check_hashed_find)} {(host-h)} {(DQ ('find multiple hosts'))}) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.invalid.orig)} {($ VSub_Name '$OBJ') (/kh.invalid)}) (SimpleCommand words: [{(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.invalid)} {(-R)} {(host-a)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1012])] ) (AndOr children: [ (C {(diff)} {($ VSub_Name '$OBJ') (/kh.invalid)} {($ VSub_Name '$OBJ') (/kh.invalid.orig)}) (C {(fail)} {(DQ ('remove on invalid succeeded'))}) ] op_id: Op_DPipe ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)} {($ VSub_Name '$OBJ') (/kh.hosts)}) (SimpleCommand words: [{(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.hosts)} {(-R)} {(host-a)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1056])] ) (SimpleCommand words: [{(grep)} {(-v)} {(DQ ('^host-a '))} {($ VSub_Name '$OBJ') (/kh.hosts.orig)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.expect)} spids: [1070] ) ] ) (AndOr children: [ (C {(diff)} {($ VSub_Name '$OBJ') (/kh.hosts)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(fail)} {(DQ ('remove simple'))}) ] op_id: Op_DPipe ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)} {($ VSub_Name '$OBJ') (/kh.hosts)}) (SimpleCommand words: [{(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.hosts)} {(-R)} {(host-c)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1116])] ) (AndOr children: [ (C {(diff)} {($ VSub_Name '$OBJ') (/kh.hosts)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)}) (C {(fail)} {(DQ ('remove CA'))}) ] op_id: Op_DPipe ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)} {($ VSub_Name '$OBJ') (/kh.hosts)}) (SimpleCommand words: [{(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.hosts)} {(-R)} {(host-d)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1163])] ) (AndOr children: [ (C {(diff)} {($ VSub_Name '$OBJ') (/kh.hosts)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)}) (C {(fail)} {(DQ ('remove revoked'))}) ] op_id: Op_DPipe ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)} {($ VSub_Name '$OBJ') (/kh.hosts)}) (SimpleCommand words: [ {(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.hosts)} {(-R)} {(host-e.blahblah)} ] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1210])] ) (SimpleCommand words: [{(grep)} {(-v)} {(DQ ('^host-e[*] '))} {($ VSub_Name '$OBJ') (/kh.hosts.orig)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.expect)} spids: [1224] ) ] ) (AndOr children: [ (C {(diff)} {($ VSub_Name '$OBJ') (/kh.hosts)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(fail)} {(DQ ('remove wildcard'))}) ] op_id: Op_DPipe ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)} {($ VSub_Name '$OBJ') (/kh.hosts)}) (SimpleCommand words: [{(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.hosts)} {(-R)} {(host-h)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1270])] ) (SimpleCommand words: [{(grep)} {(-v)} {(DQ ('^host-f,'))} {($ VSub_Name '$OBJ') (/kh.hosts.orig)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/kh.expect)} spids: [1284] ) ] ) (AndOr children: [ (C {(diff)} {($ VSub_Name '$OBJ') (/kh.hosts)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(fail)} {(DQ ('remove wildcard'))}) ] op_id: Op_DPipe ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.invalid.orig)} {($ VSub_Name '$OBJ') (/kh.invalid)}) (AndOr children: [ (SimpleCommand words: [{(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.invalid)} {(-H)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1328])] ) (C {(fail)} {(DQ ('hash invalid succeeded'))}) ] op_id: Op_DAmp ) (AndOr children: [ (C {(diff)} {($ VSub_Name '$OBJ') (/kh.invalid)} {($ VSub_Name '$OBJ') (/kh.invalid.orig)}) (C {(fail)} {(DQ ('invalid file modified'))}) ] op_id: Op_DPipe ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)} {($ VSub_Name '$OBJ') (/kh.hosts)}) (AndOr children: [ (SimpleCommand words: [{(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.hosts)} {(-H)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1378])] ) (C {(fail)} {(DQ ('hash failed'))}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(diff)} {($ VSub_Name '$OBJ') (/kh.hosts.old)} {($ VSub_Name '$OBJ') (/kh.hosts.orig)}) (C {(fail)} {(DQ ('backup differs'))}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(grep)} {(DQ ('^host-[abfgh]'))} {($ VSub_Name '$OBJ') (/kh.hosts)}) (C {(fail)} {(DQ ('original hostnames persist'))}) ] op_id: Op_DAmp ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.hosts)} {($ VSub_Name '$OBJ') (/kh.hashed.orig)}) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-a)} {(host-a)} {(host-a)}) (C {(expect_key)} {(host-a)} {(host-a)} {(host-a2)}) (C {(check_hashed_find)} {(host-a)} {(DQ ('find simple in hashed'))} {($ VSub_Name '$OBJ') (/kh.hosts)} ) (C {(rm)} {(-f)} {($ VSub_Name '$OBJ') (/kh.expect)}) (C {(expect_key)} {(host-h)} {(host-h)} {(host-f)}) (C {(check_hashed_find)} {(host-h)} {(DQ ('find simple in hashed'))} {($ VSub_Name '$OBJ') (/kh.hosts)} ) (C {(cp)} {($ VSub_Name '$OBJ') (/kh.hashed.orig)} {($ VSub_Name '$OBJ') (/kh.hashed)}) (SimpleCommand words: [{(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.hashed)} {(-R)} {(host-a)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1524])] ) (AndOr children: [ (C {(${ VSub_Name SSHKEYGEN)} {(-qf)} {($ VSub_Name '$OBJ') (/kh.hashed)} {(-F)} {(host-a)}) (C {(fail)} {(DQ ('found key after hashed remove'))}) ] op_id: Op_DAmp ) ] )