tpm2_completion.bash 185 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093
  1. # bash completion for tpm2_activatecredential -*- shell-script -*-
  2. _tpm2_activatecredential()
  3. {
  4. local auth_methods=(str: hex: file: file:- session: pcr:)
  5. local hash_methods=(sha1 sha256 sha384 sha512)
  6. local format_methods=(tss plain)
  7. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  8. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  9. local key_attributes=(\| fixedtpm stclear fixedparent \
  10. sensitivedataorigin userwithauth adminwithpolicy noda \
  11. encrypteddupplication restricted decrypt sign)
  12. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  13. policydelete writelocked writeall writedefine write_stclear \
  14. globallock ppread ownerread authread policyread no_da orderly \
  15. clear_stclear readlocked written platformcreate read_stclear)
  16. local cur prev words cword split
  17. _init_completion -s || return
  18. case $prev in
  19. -h | --help)
  20. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  21. return;;
  22. -T | --tcti)
  23. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  24. return;;
  25. -c | --credentialedkey-context)
  26. _filedir
  27. return;;
  28. -C | --credentialkey-context)
  29. _filedir
  30. return;;
  31. -p | --credentialedkey-auth)
  32. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  33. return;;
  34. -P | --credentialkey-auth)
  35. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  36. return;;
  37. -i | --credential-blob)
  38. _filedir
  39. return;;
  40. -o | --certinfo-data)
  41. _filedir
  42. return;;
  43. esac
  44. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  45. -Z --enable-erata -T --tcti \
  46. -c -C -p -P -i -o --credentialedkey-context --credentialkey-context --credentialedkey-auth --credentialkey-auth --credential-blob --certinfo-data --cphash " \
  47. -- "$cur"))
  48. } &&
  49. complete -F _tpm2_activatecredential tpm2_activatecredential
  50. # ex: filetype=sh
  51. # bash completion for tpm2_certify -*- shell-script -*-
  52. _tpm2_certify()
  53. {
  54. local auth_methods=(str: hex: file: file:- session: pcr:)
  55. local hash_methods=(sha1 sha256 sha384 sha512)
  56. local format_methods=(tss plain)
  57. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  58. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  59. local key_attributes=(\| fixedtpm stclear fixedparent \
  60. sensitivedataorigin userwithauth adminwithpolicy noda \
  61. encrypteddupplication restricted decrypt sign)
  62. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  63. policydelete writelocked writeall writedefine write_stclear \
  64. globallock ppread ownerread authread policyread no_da orderly \
  65. clear_stclear readlocked written platformcreate read_stclear)
  66. local cur prev words cword split
  67. _init_completion -s || return
  68. case $prev in
  69. -h | --help)
  70. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  71. return;;
  72. -T | --tcti)
  73. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  74. return;;
  75. -c | --certifiedkey-context)
  76. _filedir
  77. return;;
  78. -C | --signingkey-context)
  79. _filedir
  80. return;;
  81. -p | --certifiedkey-auth)
  82. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  83. return;;
  84. -g | --hash-algorithm)
  85. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  86. return;;
  87. -P | --signingkey-auth)
  88. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  89. return;;
  90. -o | --attestation)
  91. _filedir
  92. return;;
  93. -s | --signature)
  94. _filedir
  95. return;;
  96. -f | --format)
  97. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  98. return;;
  99. esac
  100. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  101. -Z --enable-erata -T --tcti \
  102. -c -C -p -g -P -o -s -f --certifiedkey-context --signingkey-context --certifiedkey-auth --hash-algorithm --signingkey-auth --attestation --signature --format --cphash " \
  103. -- "$cur"))
  104. } &&
  105. complete -F _tpm2_certify tpm2_certify
  106. # ex: filetype=sh
  107. # bash completion for tpm2_certifyX509certutil -*- shell-script -*-
  108. _tpm2_certifyX509certutil()
  109. {
  110. local auth_methods=(str: hex: file: file:- session: pcr:)
  111. local hash_methods=(sha1 sha256 sha384 sha512)
  112. local format_methods=(tss plain)
  113. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  114. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  115. local key_attributes=(\| fixedtpm stclear fixedparent \
  116. sensitivedataorigin userwithauth adminwithpolicy noda \
  117. encrypteddupplication restricted decrypt sign)
  118. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  119. policydelete writelocked writeall writedefine write_stclear \
  120. globallock ppread ownerread authread policyread no_da orderly \
  121. clear_stclear readlocked written platformcreate read_stclear)
  122. local cur prev words cword split
  123. _init_completion -s || return
  124. case $prev in
  125. -h | --help)
  126. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  127. return;;
  128. -T | --tcti)
  129. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  130. return;;
  131. -o | --outcert)
  132. _filedir
  133. return;;
  134. -d | --days)
  135. _filedir
  136. return;;
  137. -i | --issuer)
  138. _filedir
  139. return;;
  140. -s | --subject)
  141. _filedir
  142. return;;
  143. esac
  144. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  145. -Z --enable-erata -T --tcti \
  146. -o -d -i -s --outcert --days --issuer --subject " \
  147. -- "$cur"))
  148. } &&
  149. complete -F _tpm2_certifyX509certutil tpm2_certifyX509certutil
  150. # ex: filetype=sh
  151. # bash completion for tpm2_certifycreation -*- shell-script -*-
  152. _tpm2_certifycreation()
  153. {
  154. local auth_methods=(str: hex: file: file:- session: pcr:)
  155. local hash_methods=(sha1 sha256 sha384 sha512)
  156. local format_methods=(tss plain)
  157. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  158. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  159. local key_attributes=(\| fixedtpm stclear fixedparent \
  160. sensitivedataorigin userwithauth adminwithpolicy noda \
  161. encrypteddupplication restricted decrypt sign)
  162. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  163. policydelete writelocked writeall writedefine write_stclear \
  164. globallock ppread ownerread authread policyread no_da orderly \
  165. clear_stclear readlocked written platformcreate read_stclear)
  166. local cur prev words cword split
  167. _init_completion -s || return
  168. case $prev in
  169. -h | --help)
  170. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  171. return;;
  172. -T | --tcti)
  173. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  174. return;;
  175. -C | --signingkey-context)
  176. _filedir
  177. return;;
  178. -P | --signingkey-auth)
  179. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  180. return;;
  181. -c | --certifiedkey-context)
  182. _filedir
  183. return;;
  184. -g | --hash-algorithm)
  185. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  186. return;;
  187. -s | --scheme)
  188. COMPREPLY=($(compgen -W "${signing_scheme[*]}" -- "$cur"))
  189. return;;
  190. -d | --creation-hash)
  191. _filedir
  192. return;;
  193. -t | --ticket)
  194. _filedir
  195. return;;
  196. -o | --signature)
  197. _filedir
  198. return;;
  199. -f | --format)
  200. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  201. return;;
  202. -q | --qualification)
  203. _filedir
  204. return;;
  205. esac
  206. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  207. -Z --enable-erata -T --tcti \
  208. -C -P -c -g -s -d -t -o -f -q --signingkey-context --signingkey-auth --certifiedkey-context --hash-algorithm --scheme --creation-hash --ticket --signature --format --qualification --cphash " \
  209. -- "$cur"))
  210. } &&
  211. complete -F _tpm2_certifycreation tpm2_certifycreation
  212. # ex: filetype=sh
  213. # bash completion for tpm2_changeauth -*- shell-script -*-
  214. _tpm2_changeauth()
  215. {
  216. local auth_methods=(str: hex: file: file:- session: pcr:)
  217. local hash_methods=(sha1 sha256 sha384 sha512)
  218. local format_methods=(tss plain)
  219. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  220. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  221. local key_attributes=(\| fixedtpm stclear fixedparent \
  222. sensitivedataorigin userwithauth adminwithpolicy noda \
  223. encrypteddupplication restricted decrypt sign)
  224. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  225. policydelete writelocked writeall writedefine write_stclear \
  226. globallock ppread ownerread authread policyread no_da orderly \
  227. clear_stclear readlocked written platformcreate read_stclear)
  228. local cur prev words cword split
  229. _init_completion -s || return
  230. case $prev in
  231. -h | --help)
  232. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  233. return;;
  234. -T | --tcti)
  235. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  236. return;;
  237. -c | --object-context)
  238. _filedir
  239. return;;
  240. -p | --object-auth)
  241. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  242. return;;
  243. -C | --parent-context)
  244. _filedir
  245. return;;
  246. -r | --private)
  247. _filedir
  248. return;;
  249. esac
  250. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  251. -Z --enable-erata -T --tcti \
  252. -c -p -C -r --object-context --object-auth --parent-context --private --cphash " \
  253. -- "$cur"))
  254. } &&
  255. complete -F _tpm2_changeauth tpm2_changeauth
  256. # ex: filetype=sh
  257. # bash completion for tpm2_changeeps -*- shell-script -*-
  258. _tpm2_changeeps()
  259. {
  260. local auth_methods=(str: hex: file: file:- session: pcr:)
  261. local hash_methods=(sha1 sha256 sha384 sha512)
  262. local format_methods=(tss plain)
  263. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  264. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  265. local key_attributes=(\| fixedtpm stclear fixedparent \
  266. sensitivedataorigin userwithauth adminwithpolicy noda \
  267. encrypteddupplication restricted decrypt sign)
  268. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  269. policydelete writelocked writeall writedefine write_stclear \
  270. globallock ppread ownerread authread policyread no_da orderly \
  271. clear_stclear readlocked written platformcreate read_stclear)
  272. local cur prev words cword split
  273. _init_completion -s || return
  274. case $prev in
  275. -h | --help)
  276. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  277. return;;
  278. -T | --tcti)
  279. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  280. return;;
  281. -p | --auth)
  282. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  283. return;;
  284. esac
  285. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  286. -Z --enable-erata -T --tcti \
  287. -p --auth " \
  288. -- "$cur"))
  289. } &&
  290. complete -F _tpm2_changeeps tpm2_changeeps
  291. # ex: filetype=sh
  292. # bash completion for tpm2_changepps -*- shell-script -*-
  293. _tpm2_changepps()
  294. {
  295. local auth_methods=(str: hex: file: file:- session: pcr:)
  296. local hash_methods=(sha1 sha256 sha384 sha512)
  297. local format_methods=(tss plain)
  298. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  299. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  300. local key_attributes=(\| fixedtpm stclear fixedparent \
  301. sensitivedataorigin userwithauth adminwithpolicy noda \
  302. encrypteddupplication restricted decrypt sign)
  303. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  304. policydelete writelocked writeall writedefine write_stclear \
  305. globallock ppread ownerread authread policyread no_da orderly \
  306. clear_stclear readlocked written platformcreate read_stclear)
  307. local cur prev words cword split
  308. _init_completion -s || return
  309. case $prev in
  310. -h | --help)
  311. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  312. return;;
  313. -T | --tcti)
  314. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  315. return;;
  316. -p | --auth)
  317. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  318. return;;
  319. esac
  320. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  321. -Z --enable-erata -T --tcti \
  322. -p --auth " \
  323. -- "$cur"))
  324. } &&
  325. complete -F _tpm2_changepps tpm2_changepps
  326. # ex: filetype=sh
  327. # bash completion for tpm2_checkquote -*- shell-script -*-
  328. _tpm2_checkquote()
  329. {
  330. local auth_methods=(str: hex: file: file:- session: pcr:)
  331. local hash_methods=(sha1 sha256 sha384 sha512)
  332. local format_methods=(tss plain)
  333. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  334. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  335. local key_attributes=(\| fixedtpm stclear fixedparent \
  336. sensitivedataorigin userwithauth adminwithpolicy noda \
  337. encrypteddupplication restricted decrypt sign)
  338. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  339. policydelete writelocked writeall writedefine write_stclear \
  340. globallock ppread ownerread authread policyread no_da orderly \
  341. clear_stclear readlocked written platformcreate read_stclear)
  342. local cur prev words cword split
  343. _init_completion -s || return
  344. case $prev in
  345. -h | --help)
  346. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  347. return;;
  348. -T | --tcti)
  349. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  350. return;;
  351. -u | --public)
  352. _filedir
  353. return;;
  354. -g | --hash-algorithm)
  355. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  356. return;;
  357. -m | --message)
  358. _filedir
  359. return;;
  360. -s | --signature)
  361. _filedir
  362. return;;
  363. -f | --pcr)
  364. _filedir
  365. return;;
  366. -l | --pcr-list)
  367. _filedir
  368. return;;
  369. -q | --qualification)
  370. _filedir
  371. return;;
  372. -F | --format)
  373. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  374. return;;
  375. esac
  376. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  377. -Z --enable-erata -T --tcti \
  378. -u -g -m -s -f -l -q -F --public --hash-algorithm --message --signature --pcr --pcr-list --qualification --format " \
  379. -- "$cur"))
  380. } &&
  381. complete -F _tpm2_checkquote tpm2_checkquote
  382. # ex: filetype=sh
  383. # bash completion for tpm2_clear -*- shell-script -*-
  384. _tpm2_clear()
  385. {
  386. local auth_methods=(str: hex: file: file:- session: pcr:)
  387. local hash_methods=(sha1 sha256 sha384 sha512)
  388. local format_methods=(tss plain)
  389. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  390. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  391. local key_attributes=(\| fixedtpm stclear fixedparent \
  392. sensitivedataorigin userwithauth adminwithpolicy noda \
  393. encrypteddupplication restricted decrypt sign)
  394. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  395. policydelete writelocked writeall writedefine write_stclear \
  396. globallock ppread ownerread authread policyread no_da orderly \
  397. clear_stclear readlocked written platformcreate read_stclear)
  398. local cur prev words cword split
  399. _init_completion -s || return
  400. case $prev in
  401. -h | --help)
  402. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  403. return;;
  404. -T | --tcti)
  405. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  406. return;;
  407. -c | --auth-hierarchy)
  408. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  409. return;;
  410. esac
  411. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  412. -Z --enable-erata -T --tcti \
  413. -c --auth-hierarchy --cphash " \
  414. -- "$cur"))
  415. } &&
  416. complete -F _tpm2_clear tpm2_clear
  417. # ex: filetype=sh
  418. # bash completion for tpm2_clearcontrol -*- shell-script -*-
  419. _tpm2_clearcontrol()
  420. {
  421. local auth_methods=(str: hex: file: file:- session: pcr:)
  422. local hash_methods=(sha1 sha256 sha384 sha512)
  423. local format_methods=(tss plain)
  424. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  425. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  426. local key_attributes=(\| fixedtpm stclear fixedparent \
  427. sensitivedataorigin userwithauth adminwithpolicy noda \
  428. encrypteddupplication restricted decrypt sign)
  429. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  430. policydelete writelocked writeall writedefine write_stclear \
  431. globallock ppread ownerread authread policyread no_da orderly \
  432. clear_stclear readlocked written platformcreate read_stclear)
  433. local cur prev words cword split
  434. _init_completion -s || return
  435. case $prev in
  436. -h | --help)
  437. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  438. return;;
  439. -T | --tcti)
  440. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  441. return;;
  442. -C | --hierarchy)
  443. _filedir
  444. return;;
  445. -P | --auth)
  446. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  447. return;;
  448. esac
  449. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  450. -Z --enable-erata -T --tcti \
  451. -C -P --hierarchy --auth --cphash " \
  452. -- "$cur"))
  453. } &&
  454. complete -F _tpm2_clearcontrol tpm2_clearcontrol
  455. # ex: filetype=sh
  456. # bash completion for tpm2_clockrateadjust -*- shell-script -*-
  457. _tpm2_clockrateadjust()
  458. {
  459. local auth_methods=(str: hex: file: file:- session: pcr:)
  460. local hash_methods=(sha1 sha256 sha384 sha512)
  461. local format_methods=(tss plain)
  462. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  463. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  464. local key_attributes=(\| fixedtpm stclear fixedparent \
  465. sensitivedataorigin userwithauth adminwithpolicy noda \
  466. encrypteddupplication restricted decrypt sign)
  467. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  468. policydelete writelocked writeall writedefine write_stclear \
  469. globallock ppread ownerread authread policyread no_da orderly \
  470. clear_stclear readlocked written platformcreate read_stclear)
  471. local cur prev words cword split
  472. _init_completion -s || return
  473. case $prev in
  474. -h | --help)
  475. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  476. return;;
  477. -T | --tcti)
  478. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  479. return;;
  480. -c | --hierarchy)
  481. _filedir
  482. return;;
  483. -p | --auth)
  484. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  485. return;;
  486. esac
  487. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  488. -Z --enable-erata -T --tcti \
  489. -c -p --hierarchy --auth --cphash " \
  490. -- "$cur"))
  491. } &&
  492. complete -F _tpm2_clockrateadjust tpm2_clockrateadjust
  493. # ex: filetype=sh
  494. # bash completion for tpm2_commit -*- shell-script -*-
  495. _tpm2_commit()
  496. {
  497. local auth_methods=(str: hex: file: file:- session: pcr:)
  498. local hash_methods=(sha1 sha256 sha384 sha512)
  499. local format_methods=(tss plain)
  500. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  501. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  502. local key_attributes=(\| fixedtpm stclear fixedparent \
  503. sensitivedataorigin userwithauth adminwithpolicy noda \
  504. encrypteddupplication restricted decrypt sign)
  505. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  506. policydelete writelocked writeall writedefine write_stclear \
  507. globallock ppread ownerread authread policyread no_da orderly \
  508. clear_stclear readlocked written platformcreate read_stclear)
  509. local cur prev words cword split
  510. _init_completion -s || return
  511. case $prev in
  512. -h | --help)
  513. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  514. return;;
  515. -T | --tcti)
  516. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  517. return;;
  518. -u | --public)
  519. _filedir
  520. return;;
  521. -t | --counter)
  522. _filedir
  523. return;;
  524. -p | --auth)
  525. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  526. return;;
  527. -c | --context)
  528. _filedir
  529. return;;
  530. esac
  531. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  532. -Z --enable-erata -T --tcti \
  533. -u -t -p -c --public --counter --auth --context --basepoint --eccpoint --eccpoint --eccpoint " \
  534. -- "$cur"))
  535. } &&
  536. complete -F _tpm2_commit tpm2_commit
  537. # ex: filetype=sh
  538. # bash completion for tpm2_create -*- shell-script -*-
  539. _tpm2_create()
  540. {
  541. local auth_methods=(str: hex: file: file:- session: pcr:)
  542. local hash_methods=(sha1 sha256 sha384 sha512)
  543. local format_methods=(tss plain)
  544. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  545. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  546. local key_attributes=(\| fixedtpm stclear fixedparent \
  547. sensitivedataorigin userwithauth adminwithpolicy noda \
  548. encrypteddupplication restricted decrypt sign)
  549. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  550. policydelete writelocked writeall writedefine write_stclear \
  551. globallock ppread ownerread authread policyread no_da orderly \
  552. clear_stclear readlocked written platformcreate read_stclear)
  553. local cur prev words cword split
  554. _init_completion -s || return
  555. case $prev in
  556. -h | --help)
  557. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  558. return;;
  559. -T | --tcti)
  560. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  561. return;;
  562. -C | --parent-context)
  563. _filedir
  564. return;;
  565. -P | --parent-auth)
  566. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  567. return;;
  568. -p | --key-auth)
  569. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  570. return;;
  571. -g | --hash-algorithm)
  572. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  573. return;;
  574. -G | --key-algorithm)
  575. COMPREPLY=($(compgen -W "${key_object[*]}" -- "$cur"))
  576. return;;
  577. -a | --attributes)
  578. COMPREPLY=($(compgen -W "${key_attributes[*]}" -- "$cur"))
  579. return;;
  580. -i | --sealing-input)
  581. _filedir
  582. return;;
  583. -L | --policy)
  584. _filedir
  585. return;;
  586. -u | --public)
  587. _filedir
  588. return;;
  589. -r | --private)
  590. _filedir
  591. return;;
  592. -c | --key-context)
  593. _filedir
  594. return;;
  595. -t | --creation-ticket)
  596. _filedir
  597. return;;
  598. -d | --creation-hash)
  599. _filedir
  600. return;;
  601. -q | --outside-info)
  602. _filedir
  603. return;;
  604. -l | --pcr-list)
  605. _filedir
  606. return;;
  607. esac
  608. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  609. -Z --enable-erata -T --tcti \
  610. -C -P -p -g -G -a -i -L -u -r -c -t -d -q -l --parent-context --parent-auth --key-auth --hash-algorithm --key-algorithm --attributes --sealing-input --policy --public --private --key-context --creation-ticket --creation-hash --outside-info --pcr-list --creation --template --cphash " \
  611. -- "$cur"))
  612. } &&
  613. complete -F _tpm2_create tpm2_create
  614. # ex: filetype=sh
  615. # bash completion for tpm2_createak -*- shell-script -*-
  616. _tpm2_createak()
  617. {
  618. local auth_methods=(str: hex: file: file:- session: pcr:)
  619. local hash_methods=(sha1 sha256 sha384 sha512)
  620. local format_methods=(tss plain)
  621. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  622. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  623. local key_attributes=(\| fixedtpm stclear fixedparent \
  624. sensitivedataorigin userwithauth adminwithpolicy noda \
  625. encrypteddupplication restricted decrypt sign)
  626. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  627. policydelete writelocked writeall writedefine write_stclear \
  628. globallock ppread ownerread authread policyread no_da orderly \
  629. clear_stclear readlocked written platformcreate read_stclear)
  630. local cur prev words cword split
  631. _init_completion -s || return
  632. case $prev in
  633. -h | --help)
  634. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  635. return;;
  636. -T | --tcti)
  637. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  638. return;;
  639. -P | --eh-auth)
  640. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  641. return;;
  642. -p | --ak-auth)
  643. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  644. return;;
  645. -C | --ek-context)
  646. _filedir
  647. return;;
  648. -c | --ak-context)
  649. _filedir
  650. return;;
  651. -G | --key-algorithm)
  652. COMPREPLY=($(compgen -W "${key_object[*]}" -- "$cur"))
  653. return;;
  654. -g | --hash-algorithm)
  655. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  656. return;;
  657. -s | --signing-algorithm)
  658. _filedir
  659. return;;
  660. -u | --public)
  661. _filedir
  662. return;;
  663. -n | --ak-name)
  664. _filedir
  665. return;;
  666. -r | --private)
  667. _filedir
  668. return;;
  669. -q | --ak-qualified-name)
  670. _filedir
  671. return;;
  672. esac
  673. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  674. -Z --enable-erata -T --tcti \
  675. -P -p -C -c -G -g -s -u -n -r -q --eh-auth --ak-auth --ek-context --ak-context --key-algorithm --hash-algorithm --signing-algorithm --public --ak-name --private --ak-qualified-name " \
  676. -- "$cur"))
  677. } &&
  678. complete -F _tpm2_createak tpm2_createak
  679. # ex: filetype=sh
  680. # bash completion for tpm2_createek -*- shell-script -*-
  681. _tpm2_createek()
  682. {
  683. local auth_methods=(str: hex: file: file:- session: pcr:)
  684. local hash_methods=(sha1 sha256 sha384 sha512)
  685. local format_methods=(tss plain)
  686. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  687. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  688. local key_attributes=(\| fixedtpm stclear fixedparent \
  689. sensitivedataorigin userwithauth adminwithpolicy noda \
  690. encrypteddupplication restricted decrypt sign)
  691. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  692. policydelete writelocked writeall writedefine write_stclear \
  693. globallock ppread ownerread authread policyread no_da orderly \
  694. clear_stclear readlocked written platformcreate read_stclear)
  695. local cur prev words cword split
  696. _init_completion -s || return
  697. case $prev in
  698. -h | --help)
  699. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  700. return;;
  701. -T | --tcti)
  702. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  703. return;;
  704. -P | --eh-auth)
  705. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  706. return;;
  707. -w | --owner-auth)
  708. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  709. return;;
  710. -c | --ek-context)
  711. _filedir
  712. return;;
  713. -G | --key-algorithm)
  714. COMPREPLY=($(compgen -W "${key_object[*]}" -- "$cur"))
  715. return;;
  716. -u | --public)
  717. _filedir
  718. return;;
  719. -t | --template)
  720. _filedir
  721. return;;
  722. esac
  723. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  724. -Z --enable-erata -T --tcti \
  725. -P -w -c -G -u -t --eh-auth --owner-auth --ek-context --key-algorithm --public --template " \
  726. -- "$cur"))
  727. } &&
  728. complete -F _tpm2_createek tpm2_createek
  729. # ex: filetype=sh
  730. # bash completion for tpm2_createpolicy -*- shell-script -*-
  731. _tpm2_createpolicy()
  732. {
  733. local auth_methods=(str: hex: file: file:- session: pcr:)
  734. local hash_methods=(sha1 sha256 sha384 sha512)
  735. local format_methods=(tss plain)
  736. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  737. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  738. local key_attributes=(\| fixedtpm stclear fixedparent \
  739. sensitivedataorigin userwithauth adminwithpolicy noda \
  740. encrypteddupplication restricted decrypt sign)
  741. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  742. policydelete writelocked writeall writedefine write_stclear \
  743. globallock ppread ownerread authread policyread no_da orderly \
  744. clear_stclear readlocked written platformcreate read_stclear)
  745. local cur prev words cword split
  746. _init_completion -s || return
  747. case $prev in
  748. -h | --help)
  749. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  750. return;;
  751. -T | --tcti)
  752. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  753. return;;
  754. -L | --policy)
  755. _filedir
  756. return;;
  757. -g | --policy-algorithm)
  758. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  759. return;;
  760. -l | --pcr-list)
  761. _filedir
  762. return;;
  763. -f | --pcr)
  764. _filedir
  765. return;;
  766. esac
  767. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  768. -Z --enable-erata -T --tcti \
  769. -L -g -l -f --policy --policy-algorithm --pcr-list --pcr --policy --policy " \
  770. -- "$cur"))
  771. } &&
  772. complete -F _tpm2_createpolicy tpm2_createpolicy
  773. # ex: filetype=sh
  774. # bash completion for tpm2_createprimary -*- shell-script -*-
  775. _tpm2_createprimary()
  776. {
  777. local auth_methods=(str: hex: file: file:- session: pcr:)
  778. local hash_methods=(sha1 sha256 sha384 sha512)
  779. local format_methods=(tss plain)
  780. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  781. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  782. local key_attributes=(\| fixedtpm stclear fixedparent \
  783. sensitivedataorigin userwithauth adminwithpolicy noda \
  784. encrypteddupplication restricted decrypt sign)
  785. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  786. policydelete writelocked writeall writedefine write_stclear \
  787. globallock ppread ownerread authread policyread no_da orderly \
  788. clear_stclear readlocked written platformcreate read_stclear)
  789. local cur prev words cword split
  790. _init_completion -s || return
  791. case $prev in
  792. -h | --help)
  793. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  794. return;;
  795. -T | --tcti)
  796. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  797. return;;
  798. -C | --hierarchy)
  799. _filedir
  800. return;;
  801. -P | --hierarchy-auth)
  802. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  803. return;;
  804. -p | --key-auth)
  805. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  806. return;;
  807. -g | --hash-algorithm)
  808. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  809. return;;
  810. -G | --key-algorithm)
  811. COMPREPLY=($(compgen -W "${key_object[*]}" -- "$cur"))
  812. return;;
  813. -c | --key-context)
  814. _filedir
  815. return;;
  816. -L | --policy)
  817. _filedir
  818. return;;
  819. -a | --attributes)
  820. COMPREPLY=($(compgen -W "${key_attributes[*]}" -- "$cur"))
  821. return;;
  822. -u | --unique-data)
  823. _filedir
  824. return;;
  825. -t | --creation-ticket)
  826. _filedir
  827. return;;
  828. -d | --creation-hash)
  829. _filedir
  830. return;;
  831. -q | --outside-info)
  832. _filedir
  833. return;;
  834. -l | --pcr-list)
  835. _filedir
  836. return;;
  837. esac
  838. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  839. -Z --enable-erata -T --tcti \
  840. -C -P -p -g -G -c -L -a -u -t -d -q -l --hierarchy --hierarchy-auth --key-auth --hash-algorithm --key-algorithm --key-context --policy --attributes --unique-data --creation-ticket --creation-hash --outside-info --pcr-list --creation --template --cphash " \
  841. -- "$cur"))
  842. } &&
  843. complete -F _tpm2_createprimary tpm2_createprimary
  844. # ex: filetype=sh
  845. # bash completion for tpm2_dictionarylockout -*- shell-script -*-
  846. _tpm2_dictionarylockout()
  847. {
  848. local auth_methods=(str: hex: file: file:- session: pcr:)
  849. local hash_methods=(sha1 sha256 sha384 sha512)
  850. local format_methods=(tss plain)
  851. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  852. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  853. local key_attributes=(\| fixedtpm stclear fixedparent \
  854. sensitivedataorigin userwithauth adminwithpolicy noda \
  855. encrypteddupplication restricted decrypt sign)
  856. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  857. policydelete writelocked writeall writedefine write_stclear \
  858. globallock ppread ownerread authread policyread no_da orderly \
  859. clear_stclear readlocked written platformcreate read_stclear)
  860. local cur prev words cword split
  861. _init_completion -s || return
  862. case $prev in
  863. -h | --help)
  864. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  865. return;;
  866. -T | --tcti)
  867. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  868. return;;
  869. -s | --setup-parameters)
  870. _filedir
  871. return;;
  872. -c | --clear-lockout)
  873. _filedir
  874. return;;
  875. -l | --lockout-recovery-time)
  876. _filedir
  877. return;;
  878. -t | --recovery-time)
  879. _filedir
  880. return;;
  881. -n | --max-tries)
  882. _filedir
  883. return;;
  884. -p | --auth)
  885. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  886. return;;
  887. esac
  888. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  889. -Z --enable-erata -T --tcti \
  890. -s -c -l -t -n -p --setup-parameters --clear-lockout --lockout-recovery-time --recovery-time --max-tries --auth --cphash " \
  891. -- "$cur"))
  892. } &&
  893. complete -F _tpm2_dictionarylockout tpm2_dictionarylockout
  894. # ex: filetype=sh
  895. # bash completion for tpm2_duplicate -*- shell-script -*-
  896. _tpm2_duplicate()
  897. {
  898. local auth_methods=(str: hex: file: file:- session: pcr:)
  899. local hash_methods=(sha1 sha256 sha384 sha512)
  900. local format_methods=(tss plain)
  901. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  902. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  903. local key_attributes=(\| fixedtpm stclear fixedparent \
  904. sensitivedataorigin userwithauth adminwithpolicy noda \
  905. encrypteddupplication restricted decrypt sign)
  906. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  907. policydelete writelocked writeall writedefine write_stclear \
  908. globallock ppread ownerread authread policyread no_da orderly \
  909. clear_stclear readlocked written platformcreate read_stclear)
  910. local cur prev words cword split
  911. _init_completion -s || return
  912. case $prev in
  913. -h | --help)
  914. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  915. return;;
  916. -T | --tcti)
  917. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  918. return;;
  919. -G | --wrapper-algorithm)
  920. COMPREPLY=($(compgen -W "${key_object[*]}" -- "$cur"))
  921. return;;
  922. -i | --encryptionkey-in)
  923. _filedir
  924. return;;
  925. -o | --encryptionkey-out)
  926. _filedir
  927. return;;
  928. -C | --parent-context)
  929. _filedir
  930. return;;
  931. -r | --private)
  932. _filedir
  933. return;;
  934. -s | --encrypted-seed)
  935. _filedir
  936. return;;
  937. -p | --auth)
  938. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  939. return;;
  940. -c | --key-context)
  941. _filedir
  942. return;;
  943. esac
  944. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  945. -Z --enable-erata -T --tcti \
  946. -G -i -o -C -r -s -p -c --wrapper-algorithm --encryptionkey-in --encryptionkey-out --parent-context --private --encrypted-seed --auth --key-context --cphash " \
  947. -- "$cur"))
  948. } &&
  949. complete -F _tpm2_duplicate tpm2_duplicate
  950. # ex: filetype=sh
  951. # bash completion for tpm2_ecdhkeygen -*- shell-script -*-
  952. _tpm2_ecdhkeygen()
  953. {
  954. local auth_methods=(str: hex: file: file:- session: pcr:)
  955. local hash_methods=(sha1 sha256 sha384 sha512)
  956. local format_methods=(tss plain)
  957. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  958. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  959. local key_attributes=(\| fixedtpm stclear fixedparent \
  960. sensitivedataorigin userwithauth adminwithpolicy noda \
  961. encrypteddupplication restricted decrypt sign)
  962. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  963. policydelete writelocked writeall writedefine write_stclear \
  964. globallock ppread ownerread authread policyread no_da orderly \
  965. clear_stclear readlocked written platformcreate read_stclear)
  966. local cur prev words cword split
  967. _init_completion -s || return
  968. case $prev in
  969. -h | --help)
  970. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  971. return;;
  972. -T | --tcti)
  973. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  974. return;;
  975. -c | --context)
  976. _filedir
  977. return;;
  978. -u | --public)
  979. _filedir
  980. return;;
  981. -o | --output)
  982. _filedir
  983. return;;
  984. esac
  985. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  986. -Z --enable-erata -T --tcti \
  987. -c -u -o --context --public --output " \
  988. -- "$cur"))
  989. } &&
  990. complete -F _tpm2_ecdhkeygen tpm2_ecdhkeygen
  991. # ex: filetype=sh
  992. # bash completion for tpm2_ecdhzgen -*- shell-script -*-
  993. _tpm2_ecdhzgen()
  994. {
  995. local auth_methods=(str: hex: file: file:- session: pcr:)
  996. local hash_methods=(sha1 sha256 sha384 sha512)
  997. local format_methods=(tss plain)
  998. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  999. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1000. local key_attributes=(\| fixedtpm stclear fixedparent \
  1001. sensitivedataorigin userwithauth adminwithpolicy noda \
  1002. encrypteddupplication restricted decrypt sign)
  1003. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1004. policydelete writelocked writeall writedefine write_stclear \
  1005. globallock ppread ownerread authread policyread no_da orderly \
  1006. clear_stclear readlocked written platformcreate read_stclear)
  1007. local cur prev words cword split
  1008. _init_completion -s || return
  1009. case $prev in
  1010. -h | --help)
  1011. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1012. return;;
  1013. -T | --tcti)
  1014. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1015. return;;
  1016. -c | --key-context)
  1017. _filedir
  1018. return;;
  1019. -p | --key-auth)
  1020. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1021. return;;
  1022. -u | --public)
  1023. _filedir
  1024. return;;
  1025. -o | --output)
  1026. _filedir
  1027. return;;
  1028. esac
  1029. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1030. -Z --enable-erata -T --tcti \
  1031. -c -p -u -o --key-context --key-auth --public --output " \
  1032. -- "$cur"))
  1033. } &&
  1034. complete -F _tpm2_ecdhzgen tpm2_ecdhzgen
  1035. # ex: filetype=sh
  1036. # bash completion for tpm2_ecephemeral -*- shell-script -*-
  1037. _tpm2_ecephemeral()
  1038. {
  1039. local auth_methods=(str: hex: file: file:- session: pcr:)
  1040. local hash_methods=(sha1 sha256 sha384 sha512)
  1041. local format_methods=(tss plain)
  1042. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1043. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1044. local key_attributes=(\| fixedtpm stclear fixedparent \
  1045. sensitivedataorigin userwithauth adminwithpolicy noda \
  1046. encrypteddupplication restricted decrypt sign)
  1047. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1048. policydelete writelocked writeall writedefine write_stclear \
  1049. globallock ppread ownerread authread policyread no_da orderly \
  1050. clear_stclear readlocked written platformcreate read_stclear)
  1051. local cur prev words cword split
  1052. _init_completion -s || return
  1053. case $prev in
  1054. -h | --help)
  1055. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1056. return;;
  1057. -T | --tcti)
  1058. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1059. return;;
  1060. -u | --public)
  1061. _filedir
  1062. return;;
  1063. -t | --counter)
  1064. _filedir
  1065. return;;
  1066. esac
  1067. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1068. -Z --enable-erata -T --tcti \
  1069. -u -t --public --counter " \
  1070. -- "$cur"))
  1071. } &&
  1072. complete -F _tpm2_ecephemeral tpm2_ecephemeral
  1073. # ex: filetype=sh
  1074. # bash completion for tpm2_encryptdecrypt -*- shell-script -*-
  1075. _tpm2_encryptdecrypt()
  1076. {
  1077. local auth_methods=(str: hex: file: file:- session: pcr:)
  1078. local hash_methods=(sha1 sha256 sha384 sha512)
  1079. local format_methods=(tss plain)
  1080. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1081. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1082. local key_attributes=(\| fixedtpm stclear fixedparent \
  1083. sensitivedataorigin userwithauth adminwithpolicy noda \
  1084. encrypteddupplication restricted decrypt sign)
  1085. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1086. policydelete writelocked writeall writedefine write_stclear \
  1087. globallock ppread ownerread authread policyread no_da orderly \
  1088. clear_stclear readlocked written platformcreate read_stclear)
  1089. local cur prev words cword split
  1090. _init_completion -s || return
  1091. case $prev in
  1092. -h | --help)
  1093. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1094. return;;
  1095. -T | --tcti)
  1096. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1097. return;;
  1098. -c | --key-context)
  1099. _filedir
  1100. return;;
  1101. -p | --auth)
  1102. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1103. return;;
  1104. -d | --decrypt)
  1105. _filedir
  1106. return;;
  1107. -e | --pad)
  1108. _filedir
  1109. return;;
  1110. -o | --output)
  1111. _filedir
  1112. return;;
  1113. -G | --mode)
  1114. COMPREPLY=($(compgen -W "${key_object[*]}" -- "$cur"))
  1115. return;;
  1116. -t | --iv)
  1117. _filedir
  1118. return;;
  1119. esac
  1120. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1121. -Z --enable-erata -T --tcti \
  1122. -c -p -d -e -o -G -t --key-context --auth --decrypt --pad --output --mode --iv --cphash " \
  1123. -- "$cur"))
  1124. } &&
  1125. complete -F _tpm2_encryptdecrypt tpm2_encryptdecrypt
  1126. # ex: filetype=sh
  1127. # bash completion for tpm2_eventlog -*- shell-script -*-
  1128. _tpm2_eventlog()
  1129. {
  1130. local auth_methods=(str: hex: file: file:- session: pcr:)
  1131. local hash_methods=(sha1 sha256 sha384 sha512)
  1132. local format_methods=(tss plain)
  1133. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1134. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1135. local key_attributes=(\| fixedtpm stclear fixedparent \
  1136. sensitivedataorigin userwithauth adminwithpolicy noda \
  1137. encrypteddupplication restricted decrypt sign)
  1138. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1139. policydelete writelocked writeall writedefine write_stclear \
  1140. globallock ppread ownerread authread policyread no_da orderly \
  1141. clear_stclear readlocked written platformcreate read_stclear)
  1142. local cur prev words cword split
  1143. _init_completion -s || return
  1144. case $prev in
  1145. -h | --help)
  1146. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1147. return;;
  1148. -T | --tcti)
  1149. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1150. return;;
  1151. esac
  1152. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1153. -Z --enable-erata -T --tcti \
  1154. " \
  1155. -- "$cur"))
  1156. } &&
  1157. complete -F _tpm2_eventlog tpm2_eventlog
  1158. # ex: filetype=sh
  1159. # bash completion for tpm2_evictcontrol -*- shell-script -*-
  1160. _tpm2_evictcontrol()
  1161. {
  1162. local auth_methods=(str: hex: file: file:- session: pcr:)
  1163. local hash_methods=(sha1 sha256 sha384 sha512)
  1164. local format_methods=(tss plain)
  1165. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1166. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1167. local key_attributes=(\| fixedtpm stclear fixedparent \
  1168. sensitivedataorigin userwithauth adminwithpolicy noda \
  1169. encrypteddupplication restricted decrypt sign)
  1170. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1171. policydelete writelocked writeall writedefine write_stclear \
  1172. globallock ppread ownerread authread policyread no_da orderly \
  1173. clear_stclear readlocked written platformcreate read_stclear)
  1174. local cur prev words cword split
  1175. _init_completion -s || return
  1176. case $prev in
  1177. -h | --help)
  1178. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1179. return;;
  1180. -T | --tcti)
  1181. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1182. return;;
  1183. -C | --hierarchy)
  1184. _filedir
  1185. return;;
  1186. -c | --object-context)
  1187. _filedir
  1188. return;;
  1189. -P | --auth)
  1190. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1191. return;;
  1192. -o | --output)
  1193. _filedir
  1194. return;;
  1195. esac
  1196. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1197. -Z --enable-erata -T --tcti \
  1198. -C -c -P -o --hierarchy --object-context --auth --output --cphash " \
  1199. -- "$cur"))
  1200. } &&
  1201. complete -F _tpm2_evictcontrol tpm2_evictcontrol
  1202. # ex: filetype=sh
  1203. # bash completion for tpm2_flushcontext -*- shell-script -*-
  1204. _tpm2_flushcontext()
  1205. {
  1206. local auth_methods=(str: hex: file: file:- session: pcr:)
  1207. local hash_methods=(sha1 sha256 sha384 sha512)
  1208. local format_methods=(tss plain)
  1209. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1210. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1211. local key_attributes=(\| fixedtpm stclear fixedparent \
  1212. sensitivedataorigin userwithauth adminwithpolicy noda \
  1213. encrypteddupplication restricted decrypt sign)
  1214. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1215. policydelete writelocked writeall writedefine write_stclear \
  1216. globallock ppread ownerread authread policyread no_da orderly \
  1217. clear_stclear readlocked written platformcreate read_stclear)
  1218. local cur prev words cword split
  1219. _init_completion -s || return
  1220. case $prev in
  1221. -h | --help)
  1222. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1223. return;;
  1224. -T | --tcti)
  1225. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1226. return;;
  1227. -t | --transient-object)
  1228. _filedir
  1229. return;;
  1230. -l | --loaded-session)
  1231. _filedir
  1232. return;;
  1233. -s | --saved-session)
  1234. _filedir
  1235. return;;
  1236. esac
  1237. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1238. -Z --enable-erata -T --tcti \
  1239. -t -l -s --transient-object --loaded-session --saved-session " \
  1240. -- "$cur"))
  1241. } &&
  1242. complete -F _tpm2_flushcontext tpm2_flushcontext
  1243. # ex: filetype=sh
  1244. # bash completion for tpm2_getcap -*- shell-script -*-
  1245. _tpm2_getcap()
  1246. {
  1247. local auth_methods=(str: hex: file: file:- session: pcr:)
  1248. local hash_methods=(sha1 sha256 sha384 sha512)
  1249. local format_methods=(tss plain)
  1250. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1251. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1252. local key_attributes=(\| fixedtpm stclear fixedparent \
  1253. sensitivedataorigin userwithauth adminwithpolicy noda \
  1254. encrypteddupplication restricted decrypt sign)
  1255. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1256. policydelete writelocked writeall writedefine write_stclear \
  1257. globallock ppread ownerread authread policyread no_da orderly \
  1258. clear_stclear readlocked written platformcreate read_stclear)
  1259. local cur prev words cword split
  1260. _init_completion -s || return
  1261. case $prev in
  1262. -h | --help)
  1263. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1264. return;;
  1265. -T | --tcti)
  1266. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1267. return;;
  1268. -l | --list)
  1269. _filedir
  1270. return;;
  1271. esac
  1272. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1273. -Z --enable-erata -T --tcti \
  1274. -l --list " \
  1275. -- "$cur"))
  1276. } &&
  1277. complete -F _tpm2_getcap tpm2_getcap
  1278. # ex: filetype=sh
  1279. # bash completion for tpm2_getcommandauditdigest -*- shell-script -*-
  1280. _tpm2_getcommandauditdigest()
  1281. {
  1282. local auth_methods=(str: hex: file: file:- session: pcr:)
  1283. local hash_methods=(sha1 sha256 sha384 sha512)
  1284. local format_methods=(tss plain)
  1285. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1286. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1287. local key_attributes=(\| fixedtpm stclear fixedparent \
  1288. sensitivedataorigin userwithauth adminwithpolicy noda \
  1289. encrypteddupplication restricted decrypt sign)
  1290. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1291. policydelete writelocked writeall writedefine write_stclear \
  1292. globallock ppread ownerread authread policyread no_da orderly \
  1293. clear_stclear readlocked written platformcreate read_stclear)
  1294. local cur prev words cword split
  1295. _init_completion -s || return
  1296. case $prev in
  1297. -h | --help)
  1298. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1299. return;;
  1300. -T | --tcti)
  1301. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1302. return;;
  1303. -P | --hierarchy-auth)
  1304. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1305. return;;
  1306. -c | --key-context)
  1307. _filedir
  1308. return;;
  1309. -p | --auth)
  1310. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1311. return;;
  1312. -q | --qualification)
  1313. _filedir
  1314. return;;
  1315. -s | --signature)
  1316. _filedir
  1317. return;;
  1318. -m | --message)
  1319. _filedir
  1320. return;;
  1321. -f | --format)
  1322. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  1323. return;;
  1324. -g | --hash-algorithm)
  1325. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  1326. return;;
  1327. esac
  1328. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1329. -Z --enable-erata -T --tcti \
  1330. -P -c -p -q -s -m -f -g --hierarchy-auth --key-context --auth --qualification --signature --message --format --hash-algorithm " \
  1331. -- "$cur"))
  1332. } &&
  1333. complete -F _tpm2_getcommandauditdigest tpm2_getcommandauditdigest
  1334. # ex: filetype=sh
  1335. # bash completion for tpm2_geteccparameters -*- shell-script -*-
  1336. _tpm2_geteccparameters()
  1337. {
  1338. local auth_methods=(str: hex: file: file:- session: pcr:)
  1339. local hash_methods=(sha1 sha256 sha384 sha512)
  1340. local format_methods=(tss plain)
  1341. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1342. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1343. local key_attributes=(\| fixedtpm stclear fixedparent \
  1344. sensitivedataorigin userwithauth adminwithpolicy noda \
  1345. encrypteddupplication restricted decrypt sign)
  1346. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1347. policydelete writelocked writeall writedefine write_stclear \
  1348. globallock ppread ownerread authread policyread no_da orderly \
  1349. clear_stclear readlocked written platformcreate read_stclear)
  1350. local cur prev words cword split
  1351. _init_completion -s || return
  1352. case $prev in
  1353. -h | --help)
  1354. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1355. return;;
  1356. -T | --tcti)
  1357. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1358. return;;
  1359. -o | --output)
  1360. _filedir
  1361. return;;
  1362. esac
  1363. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1364. -Z --enable-erata -T --tcti \
  1365. -o --output " \
  1366. -- "$cur"))
  1367. } &&
  1368. complete -F _tpm2_geteccparameters tpm2_geteccparameters
  1369. # ex: filetype=sh
  1370. # bash completion for tpm2_getekcertificate -*- shell-script -*-
  1371. _tpm2_getekcertificate()
  1372. {
  1373. local auth_methods=(str: hex: file: file:- session: pcr:)
  1374. local hash_methods=(sha1 sha256 sha384 sha512)
  1375. local format_methods=(tss plain)
  1376. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1377. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1378. local key_attributes=(\| fixedtpm stclear fixedparent \
  1379. sensitivedataorigin userwithauth adminwithpolicy noda \
  1380. encrypteddupplication restricted decrypt sign)
  1381. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1382. policydelete writelocked writeall writedefine write_stclear \
  1383. globallock ppread ownerread authread policyread no_da orderly \
  1384. clear_stclear readlocked written platformcreate read_stclear)
  1385. local cur prev words cword split
  1386. _init_completion -s || return
  1387. case $prev in
  1388. -h | --help)
  1389. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1390. return;;
  1391. -T | --tcti)
  1392. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1393. return;;
  1394. -o | --ek-certificate)
  1395. _filedir
  1396. return;;
  1397. -X | --allow-unverified)
  1398. _filedir
  1399. return;;
  1400. -u | --ek-public)
  1401. _filedir
  1402. return;;
  1403. -x | --offline)
  1404. _filedir
  1405. return;;
  1406. esac
  1407. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1408. -Z --enable-erata -T --tcti \
  1409. -o -X -u -x --ek-certificate --allow-unverified --ek-public --offline " \
  1410. -- "$cur"))
  1411. } &&
  1412. complete -F _tpm2_getekcertificate tpm2_getekcertificate
  1413. # ex: filetype=sh
  1414. # bash completion for tpm2_getrandom -*- shell-script -*-
  1415. _tpm2_getrandom()
  1416. {
  1417. local auth_methods=(str: hex: file: file:- session: pcr:)
  1418. local hash_methods=(sha1 sha256 sha384 sha512)
  1419. local format_methods=(tss plain)
  1420. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1421. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1422. local key_attributes=(\| fixedtpm stclear fixedparent \
  1423. sensitivedataorigin userwithauth adminwithpolicy noda \
  1424. encrypteddupplication restricted decrypt sign)
  1425. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1426. policydelete writelocked writeall writedefine write_stclear \
  1427. globallock ppread ownerread authread policyread no_da orderly \
  1428. clear_stclear readlocked written platformcreate read_stclear)
  1429. local cur prev words cword split
  1430. _init_completion -s || return
  1431. case $prev in
  1432. -h | --help)
  1433. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1434. return;;
  1435. -T | --tcti)
  1436. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1437. return;;
  1438. -o | --output)
  1439. _filedir
  1440. return;;
  1441. -f | --force)
  1442. _filedir
  1443. return;;
  1444. -S | --session)
  1445. _filedir
  1446. return;;
  1447. esac
  1448. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1449. -Z --enable-erata -T --tcti \
  1450. -o -f -S --output --force --session --hex --cphash --rphash " \
  1451. -- "$cur"))
  1452. } &&
  1453. complete -F _tpm2_getrandom tpm2_getrandom
  1454. # ex: filetype=sh
  1455. # bash completion for tpm2_getsessionauditdigest -*- shell-script -*-
  1456. _tpm2_getsessionauditdigest()
  1457. {
  1458. local auth_methods=(str: hex: file: file:- session: pcr:)
  1459. local hash_methods=(sha1 sha256 sha384 sha512)
  1460. local format_methods=(tss plain)
  1461. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1462. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1463. local key_attributes=(\| fixedtpm stclear fixedparent \
  1464. sensitivedataorigin userwithauth adminwithpolicy noda \
  1465. encrypteddupplication restricted decrypt sign)
  1466. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1467. policydelete writelocked writeall writedefine write_stclear \
  1468. globallock ppread ownerread authread policyread no_da orderly \
  1469. clear_stclear readlocked written platformcreate read_stclear)
  1470. local cur prev words cword split
  1471. _init_completion -s || return
  1472. case $prev in
  1473. -h | --help)
  1474. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1475. return;;
  1476. -T | --tcti)
  1477. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1478. return;;
  1479. -P | --hierarchy-auth)
  1480. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1481. return;;
  1482. -c | --key-context)
  1483. _filedir
  1484. return;;
  1485. -p | --auth)
  1486. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1487. return;;
  1488. -q | --qualification)
  1489. _filedir
  1490. return;;
  1491. -s | --signature)
  1492. _filedir
  1493. return;;
  1494. -m | --message)
  1495. _filedir
  1496. return;;
  1497. -f | --format)
  1498. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  1499. return;;
  1500. -g | --hash-algorithm)
  1501. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  1502. return;;
  1503. -S | --session)
  1504. _filedir
  1505. return;;
  1506. esac
  1507. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1508. -Z --enable-erata -T --tcti \
  1509. -P -c -p -q -s -m -f -g -S --hierarchy-auth --key-context --auth --qualification --signature --message --format --hash-algorithm --session " \
  1510. -- "$cur"))
  1511. } &&
  1512. complete -F _tpm2_getsessionauditdigest tpm2_getsessionauditdigest
  1513. # ex: filetype=sh
  1514. # bash completion for tpm2_gettestresult -*- shell-script -*-
  1515. _tpm2_gettestresult()
  1516. {
  1517. local auth_methods=(str: hex: file: file:- session: pcr:)
  1518. local hash_methods=(sha1 sha256 sha384 sha512)
  1519. local format_methods=(tss plain)
  1520. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1521. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1522. local key_attributes=(\| fixedtpm stclear fixedparent \
  1523. sensitivedataorigin userwithauth adminwithpolicy noda \
  1524. encrypteddupplication restricted decrypt sign)
  1525. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1526. policydelete writelocked writeall writedefine write_stclear \
  1527. globallock ppread ownerread authread policyread no_da orderly \
  1528. clear_stclear readlocked written platformcreate read_stclear)
  1529. local cur prev words cword split
  1530. _init_completion -s || return
  1531. case $prev in
  1532. -h | --help)
  1533. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1534. return;;
  1535. -T | --tcti)
  1536. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1537. return;;
  1538. esac
  1539. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1540. -Z --enable-erata -T --tcti \
  1541. " \
  1542. -- "$cur"))
  1543. } &&
  1544. complete -F _tpm2_gettestresult tpm2_gettestresult
  1545. # ex: filetype=sh
  1546. # bash completion for tpm2_gettime -*- shell-script -*-
  1547. _tpm2_gettime()
  1548. {
  1549. local auth_methods=(str: hex: file: file:- session: pcr:)
  1550. local hash_methods=(sha1 sha256 sha384 sha512)
  1551. local format_methods=(tss plain)
  1552. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1553. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1554. local key_attributes=(\| fixedtpm stclear fixedparent \
  1555. sensitivedataorigin userwithauth adminwithpolicy noda \
  1556. encrypteddupplication restricted decrypt sign)
  1557. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1558. policydelete writelocked writeall writedefine write_stclear \
  1559. globallock ppread ownerread authread policyread no_da orderly \
  1560. clear_stclear readlocked written platformcreate read_stclear)
  1561. local cur prev words cword split
  1562. _init_completion -s || return
  1563. case $prev in
  1564. -h | --help)
  1565. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1566. return;;
  1567. -T | --tcti)
  1568. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1569. return;;
  1570. -c | --key-context)
  1571. _filedir
  1572. return;;
  1573. -p | --auth)
  1574. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1575. return;;
  1576. -P | --endorse-auth)
  1577. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1578. return;;
  1579. -g | --hash-algorithm)
  1580. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  1581. return;;
  1582. -s | --scheme)
  1583. COMPREPLY=($(compgen -W "${signing_scheme[*]}" -- "$cur"))
  1584. return;;
  1585. -q | --qualification)
  1586. _filedir
  1587. return;;
  1588. -o | --signature)
  1589. _filedir
  1590. return;;
  1591. -f | --format)
  1592. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  1593. return;;
  1594. esac
  1595. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1596. -Z --enable-erata -T --tcti \
  1597. -c -p -P -g -s -q -o -f --key-context --auth --endorse-auth --hash-algorithm --scheme --qualification --signature --format --cphash " \
  1598. -- "$cur"))
  1599. } &&
  1600. complete -F _tpm2_gettime tpm2_gettime
  1601. # ex: filetype=sh
  1602. # bash completion for tpm2_hash -*- shell-script -*-
  1603. _tpm2_hash()
  1604. {
  1605. local auth_methods=(str: hex: file: file:- session: pcr:)
  1606. local hash_methods=(sha1 sha256 sha384 sha512)
  1607. local format_methods=(tss plain)
  1608. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1609. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1610. local key_attributes=(\| fixedtpm stclear fixedparent \
  1611. sensitivedataorigin userwithauth adminwithpolicy noda \
  1612. encrypteddupplication restricted decrypt sign)
  1613. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1614. policydelete writelocked writeall writedefine write_stclear \
  1615. globallock ppread ownerread authread policyread no_da orderly \
  1616. clear_stclear readlocked written platformcreate read_stclear)
  1617. local cur prev words cword split
  1618. _init_completion -s || return
  1619. case $prev in
  1620. -h | --help)
  1621. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1622. return;;
  1623. -T | --tcti)
  1624. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1625. return;;
  1626. -C | --hierarchy)
  1627. _filedir
  1628. return;;
  1629. -g | --hash-algorithm)
  1630. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  1631. return;;
  1632. -o | --output)
  1633. _filedir
  1634. return;;
  1635. -t | --ticket)
  1636. _filedir
  1637. return;;
  1638. esac
  1639. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1640. -Z --enable-erata -T --tcti \
  1641. -C -g -o -t --hierarchy --hash-algorithm --output --ticket --hex " \
  1642. -- "$cur"))
  1643. } &&
  1644. complete -F _tpm2_hash tpm2_hash
  1645. # ex: filetype=sh
  1646. # bash completion for tpm2_hierarchycontrol -*- shell-script -*-
  1647. _tpm2_hierarchycontrol()
  1648. {
  1649. local auth_methods=(str: hex: file: file:- session: pcr:)
  1650. local hash_methods=(sha1 sha256 sha384 sha512)
  1651. local format_methods=(tss plain)
  1652. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1653. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1654. local key_attributes=(\| fixedtpm stclear fixedparent \
  1655. sensitivedataorigin userwithauth adminwithpolicy noda \
  1656. encrypteddupplication restricted decrypt sign)
  1657. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1658. policydelete writelocked writeall writedefine write_stclear \
  1659. globallock ppread ownerread authread policyread no_da orderly \
  1660. clear_stclear readlocked written platformcreate read_stclear)
  1661. local cur prev words cword split
  1662. _init_completion -s || return
  1663. case $prev in
  1664. -h | --help)
  1665. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1666. return;;
  1667. -T | --tcti)
  1668. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1669. return;;
  1670. -C | --hierarchy)
  1671. _filedir
  1672. return;;
  1673. -P | --hierarchy-auth)
  1674. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1675. return;;
  1676. esac
  1677. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1678. -Z --enable-erata -T --tcti \
  1679. -C -P --hierarchy --hierarchy-auth --cphash " \
  1680. -- "$cur"))
  1681. } &&
  1682. complete -F _tpm2_hierarchycontrol tpm2_hierarchycontrol
  1683. # ex: filetype=sh
  1684. # bash completion for tpm2_hmac -*- shell-script -*-
  1685. _tpm2_hmac()
  1686. {
  1687. local auth_methods=(str: hex: file: file:- session: pcr:)
  1688. local hash_methods=(sha1 sha256 sha384 sha512)
  1689. local format_methods=(tss plain)
  1690. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1691. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1692. local key_attributes=(\| fixedtpm stclear fixedparent \
  1693. sensitivedataorigin userwithauth adminwithpolicy noda \
  1694. encrypteddupplication restricted decrypt sign)
  1695. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1696. policydelete writelocked writeall writedefine write_stclear \
  1697. globallock ppread ownerread authread policyread no_da orderly \
  1698. clear_stclear readlocked written platformcreate read_stclear)
  1699. local cur prev words cword split
  1700. _init_completion -s || return
  1701. case $prev in
  1702. -h | --help)
  1703. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1704. return;;
  1705. -T | --tcti)
  1706. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1707. return;;
  1708. -c | --key-context)
  1709. _filedir
  1710. return;;
  1711. -p | --auth)
  1712. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1713. return;;
  1714. -g | --hash-algorithm)
  1715. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  1716. return;;
  1717. -o | --output)
  1718. _filedir
  1719. return;;
  1720. -t | --ticket)
  1721. _filedir
  1722. return;;
  1723. esac
  1724. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1725. -Z --enable-erata -T --tcti \
  1726. -c -p -g -o -t --key-context --auth --hash-algorithm --output --ticket --hex --cphash " \
  1727. -- "$cur"))
  1728. } &&
  1729. complete -F _tpm2_hmac tpm2_hmac
  1730. # ex: filetype=sh
  1731. # bash completion for tpm2_import -*- shell-script -*-
  1732. _tpm2_import()
  1733. {
  1734. local auth_methods=(str: hex: file: file:- session: pcr:)
  1735. local hash_methods=(sha1 sha256 sha384 sha512)
  1736. local format_methods=(tss plain)
  1737. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1738. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1739. local key_attributes=(\| fixedtpm stclear fixedparent \
  1740. sensitivedataorigin userwithauth adminwithpolicy noda \
  1741. encrypteddupplication restricted decrypt sign)
  1742. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1743. policydelete writelocked writeall writedefine write_stclear \
  1744. globallock ppread ownerread authread policyread no_da orderly \
  1745. clear_stclear readlocked written platformcreate read_stclear)
  1746. local cur prev words cword split
  1747. _init_completion -s || return
  1748. case $prev in
  1749. -h | --help)
  1750. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1751. return;;
  1752. -T | --tcti)
  1753. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1754. return;;
  1755. -G | --key-algorithm)
  1756. COMPREPLY=($(compgen -W "${key_object[*]}" -- "$cur"))
  1757. return;;
  1758. -g | --hash-algorithm)
  1759. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  1760. return;;
  1761. -i | --input)
  1762. _filedir
  1763. return;;
  1764. -C | --parent-context)
  1765. _filedir
  1766. return;;
  1767. -U | --parent-public)
  1768. _filedir
  1769. return;;
  1770. -k | --encryption-key)
  1771. _filedir
  1772. return;;
  1773. -r | --private)
  1774. _filedir
  1775. return;;
  1776. -u | --public)
  1777. _filedir
  1778. return;;
  1779. -a | --attributes)
  1780. COMPREPLY=($(compgen -W "${key_attributes[*]}" -- "$cur"))
  1781. return;;
  1782. -P | --parent-auth)
  1783. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1784. return;;
  1785. -p | --key-auth)
  1786. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1787. return;;
  1788. -L | --policy)
  1789. _filedir
  1790. return;;
  1791. -s | --seed)
  1792. _filedir
  1793. return;;
  1794. esac
  1795. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1796. -Z --enable-erata -T --tcti \
  1797. -G -g -i -C -U -k -r -u -a -P -p -L -s --key-algorithm --hash-algorithm --input --parent-context --parent-public --encryption-key --private --public --attributes --parent-auth --key-auth --policy --seed --passin --cphash " \
  1798. -- "$cur"))
  1799. } &&
  1800. complete -F _tpm2_import tpm2_import
  1801. # ex: filetype=sh
  1802. # bash completion for tpm2_incrementalselftest -*- shell-script -*-
  1803. _tpm2_incrementalselftest()
  1804. {
  1805. local auth_methods=(str: hex: file: file:- session: pcr:)
  1806. local hash_methods=(sha1 sha256 sha384 sha512)
  1807. local format_methods=(tss plain)
  1808. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1809. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1810. local key_attributes=(\| fixedtpm stclear fixedparent \
  1811. sensitivedataorigin userwithauth adminwithpolicy noda \
  1812. encrypteddupplication restricted decrypt sign)
  1813. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1814. policydelete writelocked writeall writedefine write_stclear \
  1815. globallock ppread ownerread authread policyread no_da orderly \
  1816. clear_stclear readlocked written platformcreate read_stclear)
  1817. local cur prev words cword split
  1818. _init_completion -s || return
  1819. case $prev in
  1820. -h | --help)
  1821. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1822. return;;
  1823. -T | --tcti)
  1824. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1825. return;;
  1826. esac
  1827. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1828. -Z --enable-erata -T --tcti \
  1829. " \
  1830. -- "$cur"))
  1831. } &&
  1832. complete -F _tpm2_incrementalselftest tpm2_incrementalselftest
  1833. # ex: filetype=sh
  1834. # bash completion for tpm2_load -*- shell-script -*-
  1835. _tpm2_load()
  1836. {
  1837. local auth_methods=(str: hex: file: file:- session: pcr:)
  1838. local hash_methods=(sha1 sha256 sha384 sha512)
  1839. local format_methods=(tss plain)
  1840. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1841. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1842. local key_attributes=(\| fixedtpm stclear fixedparent \
  1843. sensitivedataorigin userwithauth adminwithpolicy noda \
  1844. encrypteddupplication restricted decrypt sign)
  1845. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1846. policydelete writelocked writeall writedefine write_stclear \
  1847. globallock ppread ownerread authread policyread no_da orderly \
  1848. clear_stclear readlocked written platformcreate read_stclear)
  1849. local cur prev words cword split
  1850. _init_completion -s || return
  1851. case $prev in
  1852. -h | --help)
  1853. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1854. return;;
  1855. -T | --tcti)
  1856. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1857. return;;
  1858. -C | --parent-context)
  1859. _filedir
  1860. return;;
  1861. -P | --auth)
  1862. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1863. return;;
  1864. -u | --public)
  1865. _filedir
  1866. return;;
  1867. -r | --private)
  1868. _filedir
  1869. return;;
  1870. -n | --name)
  1871. _filedir
  1872. return;;
  1873. -c | --key-context)
  1874. _filedir
  1875. return;;
  1876. esac
  1877. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1878. -Z --enable-erata -T --tcti \
  1879. -C -P -u -r -n -c --parent-context --auth --public --private --name --key-context --cphash " \
  1880. -- "$cur"))
  1881. } &&
  1882. complete -F _tpm2_load tpm2_load
  1883. # ex: filetype=sh
  1884. # bash completion for tpm2_loadexternal -*- shell-script -*-
  1885. _tpm2_loadexternal()
  1886. {
  1887. local auth_methods=(str: hex: file: file:- session: pcr:)
  1888. local hash_methods=(sha1 sha256 sha384 sha512)
  1889. local format_methods=(tss plain)
  1890. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1891. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1892. local key_attributes=(\| fixedtpm stclear fixedparent \
  1893. sensitivedataorigin userwithauth adminwithpolicy noda \
  1894. encrypteddupplication restricted decrypt sign)
  1895. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1896. policydelete writelocked writeall writedefine write_stclear \
  1897. globallock ppread ownerread authread policyread no_da orderly \
  1898. clear_stclear readlocked written platformcreate read_stclear)
  1899. local cur prev words cword split
  1900. _init_completion -s || return
  1901. case $prev in
  1902. -h | --help)
  1903. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1904. return;;
  1905. -T | --tcti)
  1906. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1907. return;;
  1908. -C | --hierarchy)
  1909. _filedir
  1910. return;;
  1911. -G | --key-algorithm)
  1912. COMPREPLY=($(compgen -W "${key_object[*]}" -- "$cur"))
  1913. return;;
  1914. -u | --public)
  1915. _filedir
  1916. return;;
  1917. -r | --private)
  1918. _filedir
  1919. return;;
  1920. -p | --auth)
  1921. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  1922. return;;
  1923. -L | --policy)
  1924. _filedir
  1925. return;;
  1926. -g | --hash-algorithm)
  1927. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  1928. return;;
  1929. -a | --attributes)
  1930. COMPREPLY=($(compgen -W "${key_attributes[*]}" -- "$cur"))
  1931. return;;
  1932. -c | --key-context)
  1933. _filedir
  1934. return;;
  1935. -n | --name)
  1936. _filedir
  1937. return;;
  1938. esac
  1939. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1940. -Z --enable-erata -T --tcti \
  1941. -C -G -u -r -p -L -g -a -c -n --hierarchy --key-algorithm --public --private --auth --policy --hash-algorithm --attributes --key-context --name --passin " \
  1942. -- "$cur"))
  1943. } &&
  1944. complete -F _tpm2_loadexternal tpm2_loadexternal
  1945. # ex: filetype=sh
  1946. # bash completion for tpm2_makecredential -*- shell-script -*-
  1947. _tpm2_makecredential()
  1948. {
  1949. local auth_methods=(str: hex: file: file:- session: pcr:)
  1950. local hash_methods=(sha1 sha256 sha384 sha512)
  1951. local format_methods=(tss plain)
  1952. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  1953. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  1954. local key_attributes=(\| fixedtpm stclear fixedparent \
  1955. sensitivedataorigin userwithauth adminwithpolicy noda \
  1956. encrypteddupplication restricted decrypt sign)
  1957. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  1958. policydelete writelocked writeall writedefine write_stclear \
  1959. globallock ppread ownerread authread policyread no_da orderly \
  1960. clear_stclear readlocked written platformcreate read_stclear)
  1961. local cur prev words cword split
  1962. _init_completion -s || return
  1963. case $prev in
  1964. -h | --help)
  1965. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  1966. return;;
  1967. -T | --tcti)
  1968. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  1969. return;;
  1970. -e | --encryption-key)
  1971. _filedir
  1972. return;;
  1973. -u | --public)
  1974. _filedir
  1975. return;;
  1976. -G | --key-algorithm)
  1977. COMPREPLY=($(compgen -W "${key_object[*]}" -- "$cur"))
  1978. return;;
  1979. -s | --secret)
  1980. _filedir
  1981. return;;
  1982. -n | --name)
  1983. _filedir
  1984. return;;
  1985. -o | --credential-blob)
  1986. _filedir
  1987. return;;
  1988. esac
  1989. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  1990. -Z --enable-erata -T --tcti \
  1991. -e -u -G -s -n -o --encryption-key --public --key-algorithm --secret --name --credential-blob " \
  1992. -- "$cur"))
  1993. } &&
  1994. complete -F _tpm2_makecredential tpm2_makecredential
  1995. # ex: filetype=sh
  1996. # bash completion for tpm2_nvcertify -*- shell-script -*-
  1997. _tpm2_nvcertify()
  1998. {
  1999. local auth_methods=(str: hex: file: file:- session: pcr:)
  2000. local hash_methods=(sha1 sha256 sha384 sha512)
  2001. local format_methods=(tss plain)
  2002. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2003. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2004. local key_attributes=(\| fixedtpm stclear fixedparent \
  2005. sensitivedataorigin userwithauth adminwithpolicy noda \
  2006. encrypteddupplication restricted decrypt sign)
  2007. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2008. policydelete writelocked writeall writedefine write_stclear \
  2009. globallock ppread ownerread authread policyread no_da orderly \
  2010. clear_stclear readlocked written platformcreate read_stclear)
  2011. local cur prev words cword split
  2012. _init_completion -s || return
  2013. case $prev in
  2014. -h | --help)
  2015. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2016. return;;
  2017. -T | --tcti)
  2018. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2019. return;;
  2020. -C | --signingkey-context)
  2021. _filedir
  2022. return;;
  2023. -P | --signingkey-auth)
  2024. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2025. return;;
  2026. -c | --nvauthobj-context)
  2027. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2028. return;;
  2029. -p | --nvauthobj-auth)
  2030. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2031. return;;
  2032. -g | --hash-algorithm)
  2033. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  2034. return;;
  2035. -s | --scheme)
  2036. COMPREPLY=($(compgen -W "${signing_scheme[*]}" -- "$cur"))
  2037. return;;
  2038. -f | --format)
  2039. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  2040. return;;
  2041. -o | --signature)
  2042. _filedir
  2043. return;;
  2044. -q | --qualification)
  2045. _filedir
  2046. return;;
  2047. esac
  2048. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2049. -Z --enable-erata -T --tcti \
  2050. -C -P -c -p -g -s -f -o -q --signingkey-context --signingkey-auth --nvauthobj-context --nvauthobj-auth --hash-algorithm --scheme --format --signature --qualification --size --offset --cphash " \
  2051. -- "$cur"))
  2052. } &&
  2053. complete -F _tpm2_nvcertify tpm2_nvcertify
  2054. # ex: filetype=sh
  2055. # bash completion for tpm2_nvdefine -*- shell-script -*-
  2056. _tpm2_nvdefine()
  2057. {
  2058. local auth_methods=(str: hex: file: file:- session: pcr:)
  2059. local hash_methods=(sha1 sha256 sha384 sha512)
  2060. local format_methods=(tss plain)
  2061. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2062. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2063. local key_attributes=(\| fixedtpm stclear fixedparent \
  2064. sensitivedataorigin userwithauth adminwithpolicy noda \
  2065. encrypteddupplication restricted decrypt sign)
  2066. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2067. policydelete writelocked writeall writedefine write_stclear \
  2068. globallock ppread ownerread authread policyread no_da orderly \
  2069. clear_stclear readlocked written platformcreate read_stclear)
  2070. local cur prev words cword split
  2071. _init_completion -s || return
  2072. case $prev in
  2073. -h | --help)
  2074. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2075. return;;
  2076. -T | --tcti)
  2077. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2078. return;;
  2079. -C | --hierarchy)
  2080. _filedir
  2081. return;;
  2082. -s | --size)
  2083. _filedir
  2084. return;;
  2085. -a | --attributes)
  2086. COMPREPLY=($(compgen -W "${nv_attributes[*]}" -- "$cur"))
  2087. return;;
  2088. -P | --hierarchy-auth)
  2089. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2090. return;;
  2091. -p | --index-auth)
  2092. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2093. return;;
  2094. -L | --policy)
  2095. _filedir
  2096. return;;
  2097. -g | --hash-algorithm)
  2098. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  2099. return;;
  2100. esac
  2101. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2102. -Z --enable-erata -T --tcti \
  2103. -C -s -a -P -p -L --hierarchy --size --attributes --hierarchy-auth --index-auth --policy --hash-algorithm --cphash " \
  2104. -- "$cur"))
  2105. } &&
  2106. complete -F _tpm2_nvdefine tpm2_nvdefine
  2107. # ex: filetype=sh
  2108. # bash completion for tpm2_nvextend -*- shell-script -*-
  2109. _tpm2_nvextend()
  2110. {
  2111. local auth_methods=(str: hex: file: file:- session: pcr:)
  2112. local hash_methods=(sha1 sha256 sha384 sha512)
  2113. local format_methods=(tss plain)
  2114. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2115. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2116. local key_attributes=(\| fixedtpm stclear fixedparent \
  2117. sensitivedataorigin userwithauth adminwithpolicy noda \
  2118. encrypteddupplication restricted decrypt sign)
  2119. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2120. policydelete writelocked writeall writedefine write_stclear \
  2121. globallock ppread ownerread authread policyread no_da orderly \
  2122. clear_stclear readlocked written platformcreate read_stclear)
  2123. local cur prev words cword split
  2124. _init_completion -s || return
  2125. case $prev in
  2126. -h | --help)
  2127. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2128. return;;
  2129. -T | --tcti)
  2130. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2131. return;;
  2132. -C | --hierarchy)
  2133. _filedir
  2134. return;;
  2135. -P | --auth)
  2136. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2137. return;;
  2138. -i | --input)
  2139. _filedir
  2140. return;;
  2141. esac
  2142. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2143. -Z --enable-erata -T --tcti \
  2144. -C -P -i --hierarchy --auth --input --cphash " \
  2145. -- "$cur"))
  2146. } &&
  2147. complete -F _tpm2_nvextend tpm2_nvextend
  2148. # ex: filetype=sh
  2149. # bash completion for tpm2_nvincrement -*- shell-script -*-
  2150. _tpm2_nvincrement()
  2151. {
  2152. local auth_methods=(str: hex: file: file:- session: pcr:)
  2153. local hash_methods=(sha1 sha256 sha384 sha512)
  2154. local format_methods=(tss plain)
  2155. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2156. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2157. local key_attributes=(\| fixedtpm stclear fixedparent \
  2158. sensitivedataorigin userwithauth adminwithpolicy noda \
  2159. encrypteddupplication restricted decrypt sign)
  2160. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2161. policydelete writelocked writeall writedefine write_stclear \
  2162. globallock ppread ownerread authread policyread no_da orderly \
  2163. clear_stclear readlocked written platformcreate read_stclear)
  2164. local cur prev words cword split
  2165. _init_completion -s || return
  2166. case $prev in
  2167. -h | --help)
  2168. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2169. return;;
  2170. -T | --tcti)
  2171. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2172. return;;
  2173. -C | --hierarchy)
  2174. _filedir
  2175. return;;
  2176. -P | --auth)
  2177. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2178. return;;
  2179. esac
  2180. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2181. -Z --enable-erata -T --tcti \
  2182. -C -P --hierarchy --auth --cphash " \
  2183. -- "$cur"))
  2184. } &&
  2185. complete -F _tpm2_nvincrement tpm2_nvincrement
  2186. # ex: filetype=sh
  2187. # bash completion for tpm2_nvread -*- shell-script -*-
  2188. _tpm2_nvread()
  2189. {
  2190. local auth_methods=(str: hex: file: file:- session: pcr:)
  2191. local hash_methods=(sha1 sha256 sha384 sha512)
  2192. local format_methods=(tss plain)
  2193. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2194. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2195. local key_attributes=(\| fixedtpm stclear fixedparent \
  2196. sensitivedataorigin userwithauth adminwithpolicy noda \
  2197. encrypteddupplication restricted decrypt sign)
  2198. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2199. policydelete writelocked writeall writedefine write_stclear \
  2200. globallock ppread ownerread authread policyread no_da orderly \
  2201. clear_stclear readlocked written platformcreate read_stclear)
  2202. local cur prev words cword split
  2203. _init_completion -s || return
  2204. case $prev in
  2205. -h | --help)
  2206. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2207. return;;
  2208. -T | --tcti)
  2209. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2210. return;;
  2211. -C | --hierarchy)
  2212. _filedir
  2213. return;;
  2214. -o | --output)
  2215. _filedir
  2216. return;;
  2217. -P | --auth)
  2218. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2219. return;;
  2220. -s | --size)
  2221. _filedir
  2222. return;;
  2223. esac
  2224. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2225. -Z --enable-erata -T --tcti \
  2226. -C -o -P -s --hierarchy --output --auth --size --offset --cphash " \
  2227. -- "$cur"))
  2228. } &&
  2229. complete -F _tpm2_nvread tpm2_nvread
  2230. # ex: filetype=sh
  2231. # bash completion for tpm2_nvreadlock -*- shell-script -*-
  2232. _tpm2_nvreadlock()
  2233. {
  2234. local auth_methods=(str: hex: file: file:- session: pcr:)
  2235. local hash_methods=(sha1 sha256 sha384 sha512)
  2236. local format_methods=(tss plain)
  2237. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2238. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2239. local key_attributes=(\| fixedtpm stclear fixedparent \
  2240. sensitivedataorigin userwithauth adminwithpolicy noda \
  2241. encrypteddupplication restricted decrypt sign)
  2242. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2243. policydelete writelocked writeall writedefine write_stclear \
  2244. globallock ppread ownerread authread policyread no_da orderly \
  2245. clear_stclear readlocked written platformcreate read_stclear)
  2246. local cur prev words cword split
  2247. _init_completion -s || return
  2248. case $prev in
  2249. -h | --help)
  2250. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2251. return;;
  2252. -T | --tcti)
  2253. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2254. return;;
  2255. -C | --hierarchy)
  2256. _filedir
  2257. return;;
  2258. -P | --auth)
  2259. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2260. return;;
  2261. esac
  2262. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2263. -Z --enable-erata -T --tcti \
  2264. -C -P --hierarchy --auth --cphash " \
  2265. -- "$cur"))
  2266. } &&
  2267. complete -F _tpm2_nvreadlock tpm2_nvreadlock
  2268. # ex: filetype=sh
  2269. # bash completion for tpm2_nvreadpublic -*- shell-script -*-
  2270. _tpm2_nvreadpublic()
  2271. {
  2272. local auth_methods=(str: hex: file: file:- session: pcr:)
  2273. local hash_methods=(sha1 sha256 sha384 sha512)
  2274. local format_methods=(tss plain)
  2275. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2276. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2277. local key_attributes=(\| fixedtpm stclear fixedparent \
  2278. sensitivedataorigin userwithauth adminwithpolicy noda \
  2279. encrypteddupplication restricted decrypt sign)
  2280. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2281. policydelete writelocked writeall writedefine write_stclear \
  2282. globallock ppread ownerread authread policyread no_da orderly \
  2283. clear_stclear readlocked written platformcreate read_stclear)
  2284. local cur prev words cword split
  2285. _init_completion -s || return
  2286. case $prev in
  2287. -h | --help)
  2288. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2289. return;;
  2290. -T | --tcti)
  2291. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2292. return;;
  2293. esac
  2294. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2295. -Z --enable-erata -T --tcti \
  2296. " \
  2297. -- "$cur"))
  2298. } &&
  2299. complete -F _tpm2_nvreadpublic tpm2_nvreadpublic
  2300. # ex: filetype=sh
  2301. # bash completion for tpm2_nvsetbits -*- shell-script -*-
  2302. _tpm2_nvsetbits()
  2303. {
  2304. local auth_methods=(str: hex: file: file:- session: pcr:)
  2305. local hash_methods=(sha1 sha256 sha384 sha512)
  2306. local format_methods=(tss plain)
  2307. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2308. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2309. local key_attributes=(\| fixedtpm stclear fixedparent \
  2310. sensitivedataorigin userwithauth adminwithpolicy noda \
  2311. encrypteddupplication restricted decrypt sign)
  2312. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2313. policydelete writelocked writeall writedefine write_stclear \
  2314. globallock ppread ownerread authread policyread no_da orderly \
  2315. clear_stclear readlocked written platformcreate read_stclear)
  2316. local cur prev words cword split
  2317. _init_completion -s || return
  2318. case $prev in
  2319. -h | --help)
  2320. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2321. return;;
  2322. -T | --tcti)
  2323. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2324. return;;
  2325. -C | --hierarchy)
  2326. _filedir
  2327. return;;
  2328. -P | --auth)
  2329. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2330. return;;
  2331. -i | --bits)
  2332. _filedir
  2333. return;;
  2334. esac
  2335. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2336. -Z --enable-erata -T --tcti \
  2337. -C -P -i --hierarchy --auth --bits --cphash " \
  2338. -- "$cur"))
  2339. } &&
  2340. complete -F _tpm2_nvsetbits tpm2_nvsetbits
  2341. # ex: filetype=sh
  2342. # bash completion for tpm2_nvundefine -*- shell-script -*-
  2343. _tpm2_nvundefine()
  2344. {
  2345. local auth_methods=(str: hex: file: file:- session: pcr:)
  2346. local hash_methods=(sha1 sha256 sha384 sha512)
  2347. local format_methods=(tss plain)
  2348. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2349. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2350. local key_attributes=(\| fixedtpm stclear fixedparent \
  2351. sensitivedataorigin userwithauth adminwithpolicy noda \
  2352. encrypteddupplication restricted decrypt sign)
  2353. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2354. policydelete writelocked writeall writedefine write_stclear \
  2355. globallock ppread ownerread authread policyread no_da orderly \
  2356. clear_stclear readlocked written platformcreate read_stclear)
  2357. local cur prev words cword split
  2358. _init_completion -s || return
  2359. case $prev in
  2360. -h | --help)
  2361. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2362. return;;
  2363. -T | --tcti)
  2364. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2365. return;;
  2366. -C | --hierarchy)
  2367. _filedir
  2368. return;;
  2369. -P | --auth)
  2370. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2371. return;;
  2372. -S | --session)
  2373. _filedir
  2374. return;;
  2375. esac
  2376. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2377. -Z --enable-erata -T --tcti \
  2378. -C -P -S --hierarchy --auth --session --cphash " \
  2379. -- "$cur"))
  2380. } &&
  2381. complete -F _tpm2_nvundefine tpm2_nvundefine
  2382. # ex: filetype=sh
  2383. # bash completion for tpm2_nvwrite -*- shell-script -*-
  2384. _tpm2_nvwrite()
  2385. {
  2386. local auth_methods=(str: hex: file: file:- session: pcr:)
  2387. local hash_methods=(sha1 sha256 sha384 sha512)
  2388. local format_methods=(tss plain)
  2389. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2390. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2391. local key_attributes=(\| fixedtpm stclear fixedparent \
  2392. sensitivedataorigin userwithauth adminwithpolicy noda \
  2393. encrypteddupplication restricted decrypt sign)
  2394. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2395. policydelete writelocked writeall writedefine write_stclear \
  2396. globallock ppread ownerread authread policyread no_da orderly \
  2397. clear_stclear readlocked written platformcreate read_stclear)
  2398. local cur prev words cword split
  2399. _init_completion -s || return
  2400. case $prev in
  2401. -h | --help)
  2402. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2403. return;;
  2404. -T | --tcti)
  2405. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2406. return;;
  2407. -i | --input)
  2408. _filedir
  2409. return;;
  2410. -C | --hierarchy)
  2411. _filedir
  2412. return;;
  2413. -P | --auth)
  2414. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2415. return;;
  2416. esac
  2417. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2418. -Z --enable-erata -T --tcti \
  2419. -i -C -P --input --hierarchy --auth --offset --cphash " \
  2420. -- "$cur"))
  2421. } &&
  2422. complete -F _tpm2_nvwrite tpm2_nvwrite
  2423. # ex: filetype=sh
  2424. # bash completion for tpm2_nvwritelock -*- shell-script -*-
  2425. _tpm2_nvwritelock()
  2426. {
  2427. local auth_methods=(str: hex: file: file:- session: pcr:)
  2428. local hash_methods=(sha1 sha256 sha384 sha512)
  2429. local format_methods=(tss plain)
  2430. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2431. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2432. local key_attributes=(\| fixedtpm stclear fixedparent \
  2433. sensitivedataorigin userwithauth adminwithpolicy noda \
  2434. encrypteddupplication restricted decrypt sign)
  2435. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2436. policydelete writelocked writeall writedefine write_stclear \
  2437. globallock ppread ownerread authread policyread no_da orderly \
  2438. clear_stclear readlocked written platformcreate read_stclear)
  2439. local cur prev words cword split
  2440. _init_completion -s || return
  2441. case $prev in
  2442. -h | --help)
  2443. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2444. return;;
  2445. -T | --tcti)
  2446. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2447. return;;
  2448. -C | --hierarchy)
  2449. _filedir
  2450. return;;
  2451. -P | --auth)
  2452. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2453. return;;
  2454. esac
  2455. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2456. -Z --enable-erata -T --tcti \
  2457. -C -P --hierarchy --auth --global --cphash " \
  2458. -- "$cur"))
  2459. } &&
  2460. complete -F _tpm2_nvwritelock tpm2_nvwritelock
  2461. # ex: filetype=sh
  2462. # bash completion for tpm2_pcrallocate -*- shell-script -*-
  2463. _tpm2_pcrallocate()
  2464. {
  2465. local auth_methods=(str: hex: file: file:- session: pcr:)
  2466. local hash_methods=(sha1 sha256 sha384 sha512)
  2467. local format_methods=(tss plain)
  2468. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2469. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2470. local key_attributes=(\| fixedtpm stclear fixedparent \
  2471. sensitivedataorigin userwithauth adminwithpolicy noda \
  2472. encrypteddupplication restricted decrypt sign)
  2473. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2474. policydelete writelocked writeall writedefine write_stclear \
  2475. globallock ppread ownerread authread policyread no_da orderly \
  2476. clear_stclear readlocked written platformcreate read_stclear)
  2477. local cur prev words cword split
  2478. _init_completion -s || return
  2479. case $prev in
  2480. -h | --help)
  2481. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2482. return;;
  2483. -T | --tcti)
  2484. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2485. return;;
  2486. -P | --auth)
  2487. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2488. return;;
  2489. esac
  2490. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2491. -Z --enable-erata -T --tcti \
  2492. -P --auth " \
  2493. -- "$cur"))
  2494. } &&
  2495. complete -F _tpm2_pcrallocate tpm2_pcrallocate
  2496. # ex: filetype=sh
  2497. # bash completion for tpm2_pcrevent -*- shell-script -*-
  2498. _tpm2_pcrevent()
  2499. {
  2500. local auth_methods=(str: hex: file: file:- session: pcr:)
  2501. local hash_methods=(sha1 sha256 sha384 sha512)
  2502. local format_methods=(tss plain)
  2503. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2504. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2505. local key_attributes=(\| fixedtpm stclear fixedparent \
  2506. sensitivedataorigin userwithauth adminwithpolicy noda \
  2507. encrypteddupplication restricted decrypt sign)
  2508. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2509. policydelete writelocked writeall writedefine write_stclear \
  2510. globallock ppread ownerread authread policyread no_da orderly \
  2511. clear_stclear readlocked written platformcreate read_stclear)
  2512. local cur prev words cword split
  2513. _init_completion -s || return
  2514. case $prev in
  2515. -h | --help)
  2516. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2517. return;;
  2518. -T | --tcti)
  2519. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2520. return;;
  2521. -P | --auth)
  2522. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2523. return;;
  2524. esac
  2525. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2526. -Z --enable-erata -T --tcti \
  2527. -P --auth " \
  2528. -- "$cur"))
  2529. } &&
  2530. complete -F _tpm2_pcrevent tpm2_pcrevent
  2531. # ex: filetype=sh
  2532. # bash completion for tpm2_pcrextend -*- shell-script -*-
  2533. _tpm2_pcrextend()
  2534. {
  2535. local auth_methods=(str: hex: file: file:- session: pcr:)
  2536. local hash_methods=(sha1 sha256 sha384 sha512)
  2537. local format_methods=(tss plain)
  2538. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2539. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2540. local key_attributes=(\| fixedtpm stclear fixedparent \
  2541. sensitivedataorigin userwithauth adminwithpolicy noda \
  2542. encrypteddupplication restricted decrypt sign)
  2543. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2544. policydelete writelocked writeall writedefine write_stclear \
  2545. globallock ppread ownerread authread policyread no_da orderly \
  2546. clear_stclear readlocked written platformcreate read_stclear)
  2547. local cur prev words cword split
  2548. _init_completion -s || return
  2549. case $prev in
  2550. -h | --help)
  2551. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2552. return;;
  2553. -T | --tcti)
  2554. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2555. return;;
  2556. esac
  2557. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2558. -Z --enable-erata -T --tcti \
  2559. " \
  2560. -- "$cur"))
  2561. } &&
  2562. complete -F _tpm2_pcrextend tpm2_pcrextend
  2563. # ex: filetype=sh
  2564. # bash completion for tpm2_pcrread -*- shell-script -*-
  2565. _tpm2_pcrread()
  2566. {
  2567. local auth_methods=(str: hex: file: file:- session: pcr:)
  2568. local hash_methods=(sha1 sha256 sha384 sha512)
  2569. local format_methods=(tss plain)
  2570. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2571. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2572. local key_attributes=(\| fixedtpm stclear fixedparent \
  2573. sensitivedataorigin userwithauth adminwithpolicy noda \
  2574. encrypteddupplication restricted decrypt sign)
  2575. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2576. policydelete writelocked writeall writedefine write_stclear \
  2577. globallock ppread ownerread authread policyread no_da orderly \
  2578. clear_stclear readlocked written platformcreate read_stclear)
  2579. local cur prev words cword split
  2580. _init_completion -s || return
  2581. case $prev in
  2582. -h | --help)
  2583. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2584. return;;
  2585. -T | --tcti)
  2586. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2587. return;;
  2588. -o | --output)
  2589. _filedir
  2590. return;;
  2591. esac
  2592. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2593. -Z --enable-erata -T --tcti \
  2594. -o --output " \
  2595. -- "$cur"))
  2596. } &&
  2597. complete -F _tpm2_pcrread tpm2_pcrread
  2598. # ex: filetype=sh
  2599. # bash completion for tpm2_pcrreset -*- shell-script -*-
  2600. _tpm2_pcrreset()
  2601. {
  2602. local auth_methods=(str: hex: file: file:- session: pcr:)
  2603. local hash_methods=(sha1 sha256 sha384 sha512)
  2604. local format_methods=(tss plain)
  2605. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2606. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2607. local key_attributes=(\| fixedtpm stclear fixedparent \
  2608. sensitivedataorigin userwithauth adminwithpolicy noda \
  2609. encrypteddupplication restricted decrypt sign)
  2610. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2611. policydelete writelocked writeall writedefine write_stclear \
  2612. globallock ppread ownerread authread policyread no_da orderly \
  2613. clear_stclear readlocked written platformcreate read_stclear)
  2614. local cur prev words cword split
  2615. _init_completion -s || return
  2616. case $prev in
  2617. -h | --help)
  2618. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2619. return;;
  2620. -T | --tcti)
  2621. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2622. return;;
  2623. esac
  2624. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2625. -Z --enable-erata -T --tcti \
  2626. " \
  2627. -- "$cur"))
  2628. } &&
  2629. complete -F _tpm2_pcrreset tpm2_pcrreset
  2630. # ex: filetype=sh
  2631. # bash completion for tpm2_policyauthorize -*- shell-script -*-
  2632. _tpm2_policyauthorize()
  2633. {
  2634. local auth_methods=(str: hex: file: file:- session: pcr:)
  2635. local hash_methods=(sha1 sha256 sha384 sha512)
  2636. local format_methods=(tss plain)
  2637. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2638. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2639. local key_attributes=(\| fixedtpm stclear fixedparent \
  2640. sensitivedataorigin userwithauth adminwithpolicy noda \
  2641. encrypteddupplication restricted decrypt sign)
  2642. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2643. policydelete writelocked writeall writedefine write_stclear \
  2644. globallock ppread ownerread authread policyread no_da orderly \
  2645. clear_stclear readlocked written platformcreate read_stclear)
  2646. local cur prev words cword split
  2647. _init_completion -s || return
  2648. case $prev in
  2649. -h | --help)
  2650. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2651. return;;
  2652. -T | --tcti)
  2653. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2654. return;;
  2655. -L | --policy)
  2656. _filedir
  2657. return;;
  2658. -S | --session)
  2659. _filedir
  2660. return;;
  2661. -i | --input)
  2662. _filedir
  2663. return;;
  2664. -q | --qualification)
  2665. _filedir
  2666. return;;
  2667. -n | --name)
  2668. _filedir
  2669. return;;
  2670. -t | --ticket)
  2671. _filedir
  2672. return;;
  2673. esac
  2674. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2675. -Z --enable-erata -T --tcti \
  2676. -L -S -i -q -n -t --policy --session --input --qualification --name --ticket " \
  2677. -- "$cur"))
  2678. } &&
  2679. complete -F _tpm2_policyauthorize tpm2_policyauthorize
  2680. # ex: filetype=sh
  2681. # bash completion for tpm2_policyauthorizenv -*- shell-script -*-
  2682. _tpm2_policyauthorizenv()
  2683. {
  2684. local auth_methods=(str: hex: file: file:- session: pcr:)
  2685. local hash_methods=(sha1 sha256 sha384 sha512)
  2686. local format_methods=(tss plain)
  2687. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2688. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2689. local key_attributes=(\| fixedtpm stclear fixedparent \
  2690. sensitivedataorigin userwithauth adminwithpolicy noda \
  2691. encrypteddupplication restricted decrypt sign)
  2692. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2693. policydelete writelocked writeall writedefine write_stclear \
  2694. globallock ppread ownerread authread policyread no_da orderly \
  2695. clear_stclear readlocked written platformcreate read_stclear)
  2696. local cur prev words cword split
  2697. _init_completion -s || return
  2698. case $prev in
  2699. -h | --help)
  2700. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2701. return;;
  2702. -T | --tcti)
  2703. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2704. return;;
  2705. -C | --hierarchy)
  2706. _filedir
  2707. return;;
  2708. -P | --auth)
  2709. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  2710. return;;
  2711. -L | --policy)
  2712. _filedir
  2713. return;;
  2714. -S | --session)
  2715. _filedir
  2716. return;;
  2717. esac
  2718. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2719. -Z --enable-erata -T --tcti \
  2720. -C -P -L -S --hierarchy --auth --policy --session --cphash " \
  2721. -- "$cur"))
  2722. } &&
  2723. complete -F _tpm2_policyauthorizenv tpm2_policyauthorizenv
  2724. # ex: filetype=sh
  2725. # bash completion for tpm2_policyauthvalue -*- shell-script -*-
  2726. _tpm2_policyauthvalue()
  2727. {
  2728. local auth_methods=(str: hex: file: file:- session: pcr:)
  2729. local hash_methods=(sha1 sha256 sha384 sha512)
  2730. local format_methods=(tss plain)
  2731. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2732. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2733. local key_attributes=(\| fixedtpm stclear fixedparent \
  2734. sensitivedataorigin userwithauth adminwithpolicy noda \
  2735. encrypteddupplication restricted decrypt sign)
  2736. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2737. policydelete writelocked writeall writedefine write_stclear \
  2738. globallock ppread ownerread authread policyread no_da orderly \
  2739. clear_stclear readlocked written platformcreate read_stclear)
  2740. local cur prev words cword split
  2741. _init_completion -s || return
  2742. case $prev in
  2743. -h | --help)
  2744. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2745. return;;
  2746. -T | --tcti)
  2747. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2748. return;;
  2749. -L | --policy)
  2750. _filedir
  2751. return;;
  2752. -S | --session)
  2753. _filedir
  2754. return;;
  2755. esac
  2756. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2757. -Z --enable-erata -T --tcti \
  2758. -L -S --policy --session " \
  2759. -- "$cur"))
  2760. } &&
  2761. complete -F _tpm2_policyauthvalue tpm2_policyauthvalue
  2762. # ex: filetype=sh
  2763. # bash completion for tpm2_policycommandcode -*- shell-script -*-
  2764. _tpm2_policycommandcode()
  2765. {
  2766. local auth_methods=(str: hex: file: file:- session: pcr:)
  2767. local hash_methods=(sha1 sha256 sha384 sha512)
  2768. local format_methods=(tss plain)
  2769. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2770. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2771. local key_attributes=(\| fixedtpm stclear fixedparent \
  2772. sensitivedataorigin userwithauth adminwithpolicy noda \
  2773. encrypteddupplication restricted decrypt sign)
  2774. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2775. policydelete writelocked writeall writedefine write_stclear \
  2776. globallock ppread ownerread authread policyread no_da orderly \
  2777. clear_stclear readlocked written platformcreate read_stclear)
  2778. local cur prev words cword split
  2779. _init_completion -s || return
  2780. case $prev in
  2781. -h | --help)
  2782. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2783. return;;
  2784. -T | --tcti)
  2785. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2786. return;;
  2787. -S | --session)
  2788. _filedir
  2789. return;;
  2790. -L | --policy)
  2791. _filedir
  2792. return;;
  2793. esac
  2794. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2795. -Z --enable-erata -T --tcti \
  2796. -S -L --session --policy " \
  2797. -- "$cur"))
  2798. } &&
  2799. complete -F _tpm2_policycommandcode tpm2_policycommandcode
  2800. # ex: filetype=sh
  2801. # bash completion for tpm2_policycountertimer -*- shell-script -*-
  2802. _tpm2_policycountertimer()
  2803. {
  2804. local auth_methods=(str: hex: file: file:- session: pcr:)
  2805. local hash_methods=(sha1 sha256 sha384 sha512)
  2806. local format_methods=(tss plain)
  2807. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2808. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2809. local key_attributes=(\| fixedtpm stclear fixedparent \
  2810. sensitivedataorigin userwithauth adminwithpolicy noda \
  2811. encrypteddupplication restricted decrypt sign)
  2812. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2813. policydelete writelocked writeall writedefine write_stclear \
  2814. globallock ppread ownerread authread policyread no_da orderly \
  2815. clear_stclear readlocked written platformcreate read_stclear)
  2816. local cur prev words cword split
  2817. _init_completion -s || return
  2818. case $prev in
  2819. -h | --help)
  2820. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2821. return;;
  2822. -T | --tcti)
  2823. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2824. return;;
  2825. -L | --policy)
  2826. _filedir
  2827. return;;
  2828. -S | --session)
  2829. _filedir
  2830. return;;
  2831. esac
  2832. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2833. -Z --enable-erata -T --tcti \
  2834. -L -S --policy --session " \
  2835. -- "$cur"))
  2836. } &&
  2837. complete -F _tpm2_policycountertimer tpm2_policycountertimer
  2838. # ex: filetype=sh
  2839. # bash completion for tpm2_policycphash -*- shell-script -*-
  2840. _tpm2_policycphash()
  2841. {
  2842. local auth_methods=(str: hex: file: file:- session: pcr:)
  2843. local hash_methods=(sha1 sha256 sha384 sha512)
  2844. local format_methods=(tss plain)
  2845. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2846. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2847. local key_attributes=(\| fixedtpm stclear fixedparent \
  2848. sensitivedataorigin userwithauth adminwithpolicy noda \
  2849. encrypteddupplication restricted decrypt sign)
  2850. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2851. policydelete writelocked writeall writedefine write_stclear \
  2852. globallock ppread ownerread authread policyread no_da orderly \
  2853. clear_stclear readlocked written platformcreate read_stclear)
  2854. local cur prev words cword split
  2855. _init_completion -s || return
  2856. case $prev in
  2857. -h | --help)
  2858. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2859. return;;
  2860. -T | --tcti)
  2861. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2862. return;;
  2863. -L | --policy)
  2864. _filedir
  2865. return;;
  2866. -S | --session)
  2867. _filedir
  2868. return;;
  2869. esac
  2870. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2871. -Z --enable-erata -T --tcti \
  2872. -L -S --policy --session --cphash " \
  2873. -- "$cur"))
  2874. } &&
  2875. complete -F _tpm2_policycphash tpm2_policycphash
  2876. # ex: filetype=sh
  2877. # bash completion for tpm2_policyduplicationselect -*- shell-script -*-
  2878. _tpm2_policyduplicationselect()
  2879. {
  2880. local auth_methods=(str: hex: file: file:- session: pcr:)
  2881. local hash_methods=(sha1 sha256 sha384 sha512)
  2882. local format_methods=(tss plain)
  2883. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2884. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2885. local key_attributes=(\| fixedtpm stclear fixedparent \
  2886. sensitivedataorigin userwithauth adminwithpolicy noda \
  2887. encrypteddupplication restricted decrypt sign)
  2888. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2889. policydelete writelocked writeall writedefine write_stclear \
  2890. globallock ppread ownerread authread policyread no_da orderly \
  2891. clear_stclear readlocked written platformcreate read_stclear)
  2892. local cur prev words cword split
  2893. _init_completion -s || return
  2894. case $prev in
  2895. -h | --help)
  2896. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2897. return;;
  2898. -T | --tcti)
  2899. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2900. return;;
  2901. -S | --session)
  2902. _filedir
  2903. return;;
  2904. -n | --object-name)
  2905. _filedir
  2906. return;;
  2907. -N | --parent-name)
  2908. _filedir
  2909. return;;
  2910. -L | --policy)
  2911. _filedir
  2912. return;;
  2913. esac
  2914. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2915. -Z --enable-erata -T --tcti \
  2916. -S -n -N -L --session --object-name --parent-name --policy --include " \
  2917. -- "$cur"))
  2918. } &&
  2919. complete -F _tpm2_policyduplicationselect tpm2_policyduplicationselect
  2920. # ex: filetype=sh
  2921. # bash completion for tpm2_policylocality -*- shell-script -*-
  2922. _tpm2_policylocality()
  2923. {
  2924. local auth_methods=(str: hex: file: file:- session: pcr:)
  2925. local hash_methods=(sha1 sha256 sha384 sha512)
  2926. local format_methods=(tss plain)
  2927. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2928. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2929. local key_attributes=(\| fixedtpm stclear fixedparent \
  2930. sensitivedataorigin userwithauth adminwithpolicy noda \
  2931. encrypteddupplication restricted decrypt sign)
  2932. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2933. policydelete writelocked writeall writedefine write_stclear \
  2934. globallock ppread ownerread authread policyread no_da orderly \
  2935. clear_stclear readlocked written platformcreate read_stclear)
  2936. local cur prev words cword split
  2937. _init_completion -s || return
  2938. case $prev in
  2939. -h | --help)
  2940. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2941. return;;
  2942. -T | --tcti)
  2943. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2944. return;;
  2945. -S | --session)
  2946. _filedir
  2947. return;;
  2948. -L | --policy)
  2949. _filedir
  2950. return;;
  2951. esac
  2952. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2953. -Z --enable-erata -T --tcti \
  2954. -S -L --session --policy " \
  2955. -- "$cur"))
  2956. } &&
  2957. complete -F _tpm2_policylocality tpm2_policylocality
  2958. # ex: filetype=sh
  2959. # bash completion for tpm2_policynamehash -*- shell-script -*-
  2960. _tpm2_policynamehash()
  2961. {
  2962. local auth_methods=(str: hex: file: file:- session: pcr:)
  2963. local hash_methods=(sha1 sha256 sha384 sha512)
  2964. local format_methods=(tss plain)
  2965. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  2966. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  2967. local key_attributes=(\| fixedtpm stclear fixedparent \
  2968. sensitivedataorigin userwithauth adminwithpolicy noda \
  2969. encrypteddupplication restricted decrypt sign)
  2970. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  2971. policydelete writelocked writeall writedefine write_stclear \
  2972. globallock ppread ownerread authread policyread no_da orderly \
  2973. clear_stclear readlocked written platformcreate read_stclear)
  2974. local cur prev words cword split
  2975. _init_completion -s || return
  2976. case $prev in
  2977. -h | --help)
  2978. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  2979. return;;
  2980. -T | --tcti)
  2981. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  2982. return;;
  2983. -L | --policy)
  2984. _filedir
  2985. return;;
  2986. -S | --session)
  2987. _filedir
  2988. return;;
  2989. -n | --name)
  2990. _filedir
  2991. return;;
  2992. esac
  2993. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  2994. -Z --enable-erata -T --tcti \
  2995. -L -S -n --policy --session --name " \
  2996. -- "$cur"))
  2997. } &&
  2998. complete -F _tpm2_policynamehash tpm2_policynamehash
  2999. # ex: filetype=sh
  3000. # bash completion for tpm2_policynv -*- shell-script -*-
  3001. _tpm2_policynv()
  3002. {
  3003. local auth_methods=(str: hex: file: file:- session: pcr:)
  3004. local hash_methods=(sha1 sha256 sha384 sha512)
  3005. local format_methods=(tss plain)
  3006. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3007. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3008. local key_attributes=(\| fixedtpm stclear fixedparent \
  3009. sensitivedataorigin userwithauth adminwithpolicy noda \
  3010. encrypteddupplication restricted decrypt sign)
  3011. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3012. policydelete writelocked writeall writedefine write_stclear \
  3013. globallock ppread ownerread authread policyread no_da orderly \
  3014. clear_stclear readlocked written platformcreate read_stclear)
  3015. local cur prev words cword split
  3016. _init_completion -s || return
  3017. case $prev in
  3018. -h | --help)
  3019. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3020. return;;
  3021. -T | --tcti)
  3022. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3023. return;;
  3024. -C | --hierarchy)
  3025. _filedir
  3026. return;;
  3027. -P | --auth)
  3028. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  3029. return;;
  3030. -L | --policy)
  3031. _filedir
  3032. return;;
  3033. -S | --session)
  3034. _filedir
  3035. return;;
  3036. -i | --input)
  3037. _filedir
  3038. return;;
  3039. esac
  3040. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3041. -Z --enable-erata -T --tcti \
  3042. -C -P -L -S -i --hierarchy --auth --policy --session --input --offset --cphash " \
  3043. -- "$cur"))
  3044. } &&
  3045. complete -F _tpm2_policynv tpm2_policynv
  3046. # ex: filetype=sh
  3047. # bash completion for tpm2_policynvwritten -*- shell-script -*-
  3048. _tpm2_policynvwritten()
  3049. {
  3050. local auth_methods=(str: hex: file: file:- session: pcr:)
  3051. local hash_methods=(sha1 sha256 sha384 sha512)
  3052. local format_methods=(tss plain)
  3053. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3054. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3055. local key_attributes=(\| fixedtpm stclear fixedparent \
  3056. sensitivedataorigin userwithauth adminwithpolicy noda \
  3057. encrypteddupplication restricted decrypt sign)
  3058. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3059. policydelete writelocked writeall writedefine write_stclear \
  3060. globallock ppread ownerread authread policyread no_da orderly \
  3061. clear_stclear readlocked written platformcreate read_stclear)
  3062. local cur prev words cword split
  3063. _init_completion -s || return
  3064. case $prev in
  3065. -h | --help)
  3066. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3067. return;;
  3068. -T | --tcti)
  3069. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3070. return;;
  3071. -S | --session)
  3072. _filedir
  3073. return;;
  3074. -L | --policy)
  3075. _filedir
  3076. return;;
  3077. esac
  3078. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3079. -Z --enable-erata -T --tcti \
  3080. -S -L --session --policy " \
  3081. -- "$cur"))
  3082. } &&
  3083. complete -F _tpm2_policynvwritten tpm2_policynvwritten
  3084. # ex: filetype=sh
  3085. # bash completion for tpm2_policyor -*- shell-script -*-
  3086. _tpm2_policyor()
  3087. {
  3088. local auth_methods=(str: hex: file: file:- session: pcr:)
  3089. local hash_methods=(sha1 sha256 sha384 sha512)
  3090. local format_methods=(tss plain)
  3091. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3092. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3093. local key_attributes=(\| fixedtpm stclear fixedparent \
  3094. sensitivedataorigin userwithauth adminwithpolicy noda \
  3095. encrypteddupplication restricted decrypt sign)
  3096. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3097. policydelete writelocked writeall writedefine write_stclear \
  3098. globallock ppread ownerread authread policyread no_da orderly \
  3099. clear_stclear readlocked written platformcreate read_stclear)
  3100. local cur prev words cword split
  3101. _init_completion -s || return
  3102. case $prev in
  3103. -h | --help)
  3104. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3105. return;;
  3106. -T | --tcti)
  3107. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3108. return;;
  3109. -L | --policy)
  3110. _filedir
  3111. return;;
  3112. -S | --session)
  3113. _filedir
  3114. return;;
  3115. -l | --policy-list)
  3116. _filedir
  3117. return;;
  3118. esac
  3119. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3120. -Z --enable-erata -T --tcti \
  3121. -L -S -l --policy --session --policy-list " \
  3122. -- "$cur"))
  3123. } &&
  3124. complete -F _tpm2_policyor tpm2_policyor
  3125. # ex: filetype=sh
  3126. # bash completion for tpm2_policypassword -*- shell-script -*-
  3127. _tpm2_policypassword()
  3128. {
  3129. local auth_methods=(str: hex: file: file:- session: pcr:)
  3130. local hash_methods=(sha1 sha256 sha384 sha512)
  3131. local format_methods=(tss plain)
  3132. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3133. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3134. local key_attributes=(\| fixedtpm stclear fixedparent \
  3135. sensitivedataorigin userwithauth adminwithpolicy noda \
  3136. encrypteddupplication restricted decrypt sign)
  3137. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3138. policydelete writelocked writeall writedefine write_stclear \
  3139. globallock ppread ownerread authread policyread no_da orderly \
  3140. clear_stclear readlocked written platformcreate read_stclear)
  3141. local cur prev words cword split
  3142. _init_completion -s || return
  3143. case $prev in
  3144. -h | --help)
  3145. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3146. return;;
  3147. -T | --tcti)
  3148. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3149. return;;
  3150. -L | --policy)
  3151. _filedir
  3152. return;;
  3153. -S | --session)
  3154. _filedir
  3155. return;;
  3156. esac
  3157. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3158. -Z --enable-erata -T --tcti \
  3159. -L -S --policy --session " \
  3160. -- "$cur"))
  3161. } &&
  3162. complete -F _tpm2_policypassword tpm2_policypassword
  3163. # ex: filetype=sh
  3164. # bash completion for tpm2_policypcr -*- shell-script -*-
  3165. _tpm2_policypcr()
  3166. {
  3167. local auth_methods=(str: hex: file: file:- session: pcr:)
  3168. local hash_methods=(sha1 sha256 sha384 sha512)
  3169. local format_methods=(tss plain)
  3170. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3171. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3172. local key_attributes=(\| fixedtpm stclear fixedparent \
  3173. sensitivedataorigin userwithauth adminwithpolicy noda \
  3174. encrypteddupplication restricted decrypt sign)
  3175. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3176. policydelete writelocked writeall writedefine write_stclear \
  3177. globallock ppread ownerread authread policyread no_da orderly \
  3178. clear_stclear readlocked written platformcreate read_stclear)
  3179. local cur prev words cword split
  3180. _init_completion -s || return
  3181. case $prev in
  3182. -h | --help)
  3183. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3184. return;;
  3185. -T | --tcti)
  3186. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3187. return;;
  3188. -L | --policy)
  3189. _filedir
  3190. return;;
  3191. -f | --pcr)
  3192. _filedir
  3193. return;;
  3194. -l | --pcr-list)
  3195. _filedir
  3196. return;;
  3197. -S | --session)
  3198. _filedir
  3199. return;;
  3200. esac
  3201. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3202. -Z --enable-erata -T --tcti \
  3203. -L -f -l -S --policy --pcr --pcr-list --session " \
  3204. -- "$cur"))
  3205. } &&
  3206. complete -F _tpm2_policypcr tpm2_policypcr
  3207. # ex: filetype=sh
  3208. # bash completion for tpm2_policyrestart -*- shell-script -*-
  3209. _tpm2_policyrestart()
  3210. {
  3211. local auth_methods=(str: hex: file: file:- session: pcr:)
  3212. local hash_methods=(sha1 sha256 sha384 sha512)
  3213. local format_methods=(tss plain)
  3214. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3215. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3216. local key_attributes=(\| fixedtpm stclear fixedparent \
  3217. sensitivedataorigin userwithauth adminwithpolicy noda \
  3218. encrypteddupplication restricted decrypt sign)
  3219. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3220. policydelete writelocked writeall writedefine write_stclear \
  3221. globallock ppread ownerread authread policyread no_da orderly \
  3222. clear_stclear readlocked written platformcreate read_stclear)
  3223. local cur prev words cword split
  3224. _init_completion -s || return
  3225. case $prev in
  3226. -h | --help)
  3227. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3228. return;;
  3229. -T | --tcti)
  3230. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3231. return;;
  3232. -S | --session)
  3233. _filedir
  3234. return;;
  3235. esac
  3236. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3237. -Z --enable-erata -T --tcti \
  3238. -S --session " \
  3239. -- "$cur"))
  3240. } &&
  3241. complete -F _tpm2_policyrestart tpm2_policyrestart
  3242. # ex: filetype=sh
  3243. # bash completion for tpm2_policysecret -*- shell-script -*-
  3244. _tpm2_policysecret()
  3245. {
  3246. local auth_methods=(str: hex: file: file:- session: pcr:)
  3247. local hash_methods=(sha1 sha256 sha384 sha512)
  3248. local format_methods=(tss plain)
  3249. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3250. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3251. local key_attributes=(\| fixedtpm stclear fixedparent \
  3252. sensitivedataorigin userwithauth adminwithpolicy noda \
  3253. encrypteddupplication restricted decrypt sign)
  3254. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3255. policydelete writelocked writeall writedefine write_stclear \
  3256. globallock ppread ownerread authread policyread no_da orderly \
  3257. clear_stclear readlocked written platformcreate read_stclear)
  3258. local cur prev words cword split
  3259. _init_completion -s || return
  3260. case $prev in
  3261. -h | --help)
  3262. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3263. return;;
  3264. -T | --tcti)
  3265. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3266. return;;
  3267. -c | --object-context)
  3268. _filedir
  3269. return;;
  3270. -S | --session)
  3271. _filedir
  3272. return;;
  3273. -L | --policy)
  3274. _filedir
  3275. return;;
  3276. -t | --expiration)
  3277. _filedir
  3278. return;;
  3279. -x | --nonce-tpm)
  3280. _filedir
  3281. return;;
  3282. -q | --qualification)
  3283. _filedir
  3284. return;;
  3285. esac
  3286. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3287. -Z --enable-erata -T --tcti \
  3288. -c -S -L -t -x -q --object-context --session --policy --expiration --nonce-tpm --qualification --ticket --timeout --cphash " \
  3289. -- "$cur"))
  3290. } &&
  3291. complete -F _tpm2_policysecret tpm2_policysecret
  3292. # ex: filetype=sh
  3293. # bash completion for tpm2_policysigned -*- shell-script -*-
  3294. _tpm2_policysigned()
  3295. {
  3296. local auth_methods=(str: hex: file: file:- session: pcr:)
  3297. local hash_methods=(sha1 sha256 sha384 sha512)
  3298. local format_methods=(tss plain)
  3299. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3300. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3301. local key_attributes=(\| fixedtpm stclear fixedparent \
  3302. sensitivedataorigin userwithauth adminwithpolicy noda \
  3303. encrypteddupplication restricted decrypt sign)
  3304. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3305. policydelete writelocked writeall writedefine write_stclear \
  3306. globallock ppread ownerread authread policyread no_da orderly \
  3307. clear_stclear readlocked written platformcreate read_stclear)
  3308. local cur prev words cword split
  3309. _init_completion -s || return
  3310. case $prev in
  3311. -h | --help)
  3312. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3313. return;;
  3314. -T | --tcti)
  3315. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3316. return;;
  3317. -L | --policy)
  3318. _filedir
  3319. return;;
  3320. -S | --session)
  3321. _filedir
  3322. return;;
  3323. -c | --key-context)
  3324. _filedir
  3325. return;;
  3326. -g | --hash-algorithm)
  3327. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  3328. return;;
  3329. -s | --signature)
  3330. _filedir
  3331. return;;
  3332. -f | --format)
  3333. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  3334. return;;
  3335. -t | --expiration)
  3336. _filedir
  3337. return;;
  3338. -q | --qualification)
  3339. _filedir
  3340. return;;
  3341. -x | --nonce-tpm)
  3342. _filedir
  3343. return;;
  3344. esac
  3345. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3346. -Z --enable-erata -T --tcti \
  3347. -L -S -c -g -s -f -t -q -x --policy --session --key-context --hash-algorithm --signature --format --expiration --qualification --nonce-tpm --ticket --timeout " \
  3348. -- "$cur"))
  3349. } &&
  3350. complete -F _tpm2_policysigned tpm2_policysigned
  3351. # ex: filetype=sh
  3352. # bash completion for tpm2_policytemplate -*- shell-script -*-
  3353. _tpm2_policytemplate()
  3354. {
  3355. local auth_methods=(str: hex: file: file:- session: pcr:)
  3356. local hash_methods=(sha1 sha256 sha384 sha512)
  3357. local format_methods=(tss plain)
  3358. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3359. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3360. local key_attributes=(\| fixedtpm stclear fixedparent \
  3361. sensitivedataorigin userwithauth adminwithpolicy noda \
  3362. encrypteddupplication restricted decrypt sign)
  3363. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3364. policydelete writelocked writeall writedefine write_stclear \
  3365. globallock ppread ownerread authread policyread no_da orderly \
  3366. clear_stclear readlocked written platformcreate read_stclear)
  3367. local cur prev words cword split
  3368. _init_completion -s || return
  3369. case $prev in
  3370. -h | --help)
  3371. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3372. return;;
  3373. -T | --tcti)
  3374. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3375. return;;
  3376. -L | --policy)
  3377. _filedir
  3378. return;;
  3379. -S | --session)
  3380. _filedir
  3381. return;;
  3382. esac
  3383. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3384. -Z --enable-erata -T --tcti \
  3385. -L -S --policy --session " \
  3386. -- "$cur"))
  3387. } &&
  3388. complete -F _tpm2_policytemplate tpm2_policytemplate
  3389. # ex: filetype=sh
  3390. # bash completion for tpm2_policyticket -*- shell-script -*-
  3391. _tpm2_policyticket()
  3392. {
  3393. local auth_methods=(str: hex: file: file:- session: pcr:)
  3394. local hash_methods=(sha1 sha256 sha384 sha512)
  3395. local format_methods=(tss plain)
  3396. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3397. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3398. local key_attributes=(\| fixedtpm stclear fixedparent \
  3399. sensitivedataorigin userwithauth adminwithpolicy noda \
  3400. encrypteddupplication restricted decrypt sign)
  3401. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3402. policydelete writelocked writeall writedefine write_stclear \
  3403. globallock ppread ownerread authread policyread no_da orderly \
  3404. clear_stclear readlocked written platformcreate read_stclear)
  3405. local cur prev words cword split
  3406. _init_completion -s || return
  3407. case $prev in
  3408. -h | --help)
  3409. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3410. return;;
  3411. -T | --tcti)
  3412. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3413. return;;
  3414. -L | --policy)
  3415. _filedir
  3416. return;;
  3417. -S | --session)
  3418. _filedir
  3419. return;;
  3420. -n | --name)
  3421. _filedir
  3422. return;;
  3423. -q | --qualification)
  3424. _filedir
  3425. return;;
  3426. esac
  3427. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3428. -Z --enable-erata -T --tcti \
  3429. -L -S -n -q --policy --session --name --qualification --ticket --timeout " \
  3430. -- "$cur"))
  3431. } &&
  3432. complete -F _tpm2_policyticket tpm2_policyticket
  3433. # ex: filetype=sh
  3434. # bash completion for tpm2_print -*- shell-script -*-
  3435. _tpm2_print()
  3436. {
  3437. local auth_methods=(str: hex: file: file:- session: pcr:)
  3438. local hash_methods=(sha1 sha256 sha384 sha512)
  3439. local format_methods=(tss plain)
  3440. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3441. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3442. local key_attributes=(\| fixedtpm stclear fixedparent \
  3443. sensitivedataorigin userwithauth adminwithpolicy noda \
  3444. encrypteddupplication restricted decrypt sign)
  3445. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3446. policydelete writelocked writeall writedefine write_stclear \
  3447. globallock ppread ownerread authread policyread no_da orderly \
  3448. clear_stclear readlocked written platformcreate read_stclear)
  3449. local cur prev words cword split
  3450. _init_completion -s || return
  3451. case $prev in
  3452. -h | --help)
  3453. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3454. return;;
  3455. -T | --tcti)
  3456. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3457. return;;
  3458. -t | --type)
  3459. _filedir
  3460. return;;
  3461. esac
  3462. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3463. -Z --enable-erata -T --tcti \
  3464. -t --type " \
  3465. -- "$cur"))
  3466. } &&
  3467. complete -F _tpm2_print tpm2_print
  3468. # ex: filetype=sh
  3469. # bash completion for tpm2_quote -*- shell-script -*-
  3470. _tpm2_quote()
  3471. {
  3472. local auth_methods=(str: hex: file: file:- session: pcr:)
  3473. local hash_methods=(sha1 sha256 sha384 sha512)
  3474. local format_methods=(tss plain)
  3475. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3476. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3477. local key_attributes=(\| fixedtpm stclear fixedparent \
  3478. sensitivedataorigin userwithauth adminwithpolicy noda \
  3479. encrypteddupplication restricted decrypt sign)
  3480. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3481. policydelete writelocked writeall writedefine write_stclear \
  3482. globallock ppread ownerread authread policyread no_da orderly \
  3483. clear_stclear readlocked written platformcreate read_stclear)
  3484. local cur prev words cword split
  3485. _init_completion -s || return
  3486. case $prev in
  3487. -h | --help)
  3488. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3489. return;;
  3490. -T | --tcti)
  3491. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3492. return;;
  3493. -c | --key-context)
  3494. _filedir
  3495. return;;
  3496. -p | --auth)
  3497. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  3498. return;;
  3499. -l | --pcr-list)
  3500. _filedir
  3501. return;;
  3502. -m | --message)
  3503. _filedir
  3504. return;;
  3505. -s | --signature)
  3506. _filedir
  3507. return;;
  3508. -f | --format)
  3509. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  3510. return;;
  3511. -o | --pcr)
  3512. _filedir
  3513. return;;
  3514. -q | --qualification)
  3515. _filedir
  3516. return;;
  3517. -g | --hash-algorithm)
  3518. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  3519. return;;
  3520. esac
  3521. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3522. -Z --enable-erata -T --tcti \
  3523. -c -p -l -m -s -f -o -q -g --key-context --auth --pcr-list --message --signature --format --pcr --qualification --hash-algorithm --cphash " \
  3524. -- "$cur"))
  3525. } &&
  3526. complete -F _tpm2_quote tpm2_quote
  3527. # ex: filetype=sh
  3528. # bash completion for tpm2_rc_decode -*- shell-script -*-
  3529. _tpm2_rc_decode()
  3530. {
  3531. local auth_methods=(str: hex: file: file:- session: pcr:)
  3532. local hash_methods=(sha1 sha256 sha384 sha512)
  3533. local format_methods=(tss plain)
  3534. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3535. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3536. local key_attributes=(\| fixedtpm stclear fixedparent \
  3537. sensitivedataorigin userwithauth adminwithpolicy noda \
  3538. encrypteddupplication restricted decrypt sign)
  3539. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3540. policydelete writelocked writeall writedefine write_stclear \
  3541. globallock ppread ownerread authread policyread no_da orderly \
  3542. clear_stclear readlocked written platformcreate read_stclear)
  3543. local cur prev words cword split
  3544. _init_completion -s || return
  3545. case $prev in
  3546. -h | --help)
  3547. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3548. return;;
  3549. -T | --tcti)
  3550. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3551. return;;
  3552. esac
  3553. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3554. -Z --enable-erata -T --tcti \
  3555. " \
  3556. -- "$cur"))
  3557. } &&
  3558. complete -F _tpm2_rc_decode tpm2_rc_decode
  3559. # ex: filetype=sh
  3560. # bash completion for tpm2_readclock -*- shell-script -*-
  3561. _tpm2_readclock()
  3562. {
  3563. local auth_methods=(str: hex: file: file:- session: pcr:)
  3564. local hash_methods=(sha1 sha256 sha384 sha512)
  3565. local format_methods=(tss plain)
  3566. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3567. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3568. local key_attributes=(\| fixedtpm stclear fixedparent \
  3569. sensitivedataorigin userwithauth adminwithpolicy noda \
  3570. encrypteddupplication restricted decrypt sign)
  3571. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3572. policydelete writelocked writeall writedefine write_stclear \
  3573. globallock ppread ownerread authread policyread no_da orderly \
  3574. clear_stclear readlocked written platformcreate read_stclear)
  3575. local cur prev words cword split
  3576. _init_completion -s || return
  3577. case $prev in
  3578. -h | --help)
  3579. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3580. return;;
  3581. -T | --tcti)
  3582. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3583. return;;
  3584. esac
  3585. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3586. -Z --enable-erata -T --tcti \
  3587. " \
  3588. -- "$cur"))
  3589. } &&
  3590. complete -F _tpm2_readclock tpm2_readclock
  3591. # ex: filetype=sh
  3592. # bash completion for tpm2_readpublic -*- shell-script -*-
  3593. _tpm2_readpublic()
  3594. {
  3595. local auth_methods=(str: hex: file: file:- session: pcr:)
  3596. local hash_methods=(sha1 sha256 sha384 sha512)
  3597. local format_methods=(tss plain)
  3598. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3599. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3600. local key_attributes=(\| fixedtpm stclear fixedparent \
  3601. sensitivedataorigin userwithauth adminwithpolicy noda \
  3602. encrypteddupplication restricted decrypt sign)
  3603. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3604. policydelete writelocked writeall writedefine write_stclear \
  3605. globallock ppread ownerread authread policyread no_da orderly \
  3606. clear_stclear readlocked written platformcreate read_stclear)
  3607. local cur prev words cword split
  3608. _init_completion -s || return
  3609. case $prev in
  3610. -h | --help)
  3611. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3612. return;;
  3613. -T | --tcti)
  3614. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3615. return;;
  3616. -c | --object-context)
  3617. _filedir
  3618. return;;
  3619. -n | --name)
  3620. _filedir
  3621. return;;
  3622. -o | --output)
  3623. _filedir
  3624. return;;
  3625. -t | --serialized-handle)
  3626. _filedir
  3627. return;;
  3628. -q | --qualified-name)
  3629. _filedir
  3630. return;;
  3631. esac
  3632. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3633. -Z --enable-erata -T --tcti \
  3634. -c -n -o -t -q --object-context --name --output --serialized-handle --qualified-name " \
  3635. -- "$cur"))
  3636. } &&
  3637. complete -F _tpm2_readpublic tpm2_readpublic
  3638. # ex: filetype=sh
  3639. # bash completion for tpm2_rsadecrypt -*- shell-script -*-
  3640. _tpm2_rsadecrypt()
  3641. {
  3642. local auth_methods=(str: hex: file: file:- session: pcr:)
  3643. local hash_methods=(sha1 sha256 sha384 sha512)
  3644. local format_methods=(tss plain)
  3645. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3646. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3647. local key_attributes=(\| fixedtpm stclear fixedparent \
  3648. sensitivedataorigin userwithauth adminwithpolicy noda \
  3649. encrypteddupplication restricted decrypt sign)
  3650. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3651. policydelete writelocked writeall writedefine write_stclear \
  3652. globallock ppread ownerread authread policyread no_da orderly \
  3653. clear_stclear readlocked written platformcreate read_stclear)
  3654. local cur prev words cword split
  3655. _init_completion -s || return
  3656. case $prev in
  3657. -h | --help)
  3658. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3659. return;;
  3660. -T | --tcti)
  3661. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3662. return;;
  3663. -c | --key-context)
  3664. _filedir
  3665. return;;
  3666. -p | --auth)
  3667. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  3668. return;;
  3669. -o | --output)
  3670. _filedir
  3671. return;;
  3672. -s | --scheme)
  3673. COMPREPLY=($(compgen -W "${signing_scheme[*]}" -- "$cur"))
  3674. return;;
  3675. -l | --label)
  3676. _filedir
  3677. return;;
  3678. esac
  3679. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3680. -Z --enable-erata -T --tcti \
  3681. -c -p -o -s -l --key-context --auth --output --scheme --label --cphash " \
  3682. -- "$cur"))
  3683. } &&
  3684. complete -F _tpm2_rsadecrypt tpm2_rsadecrypt
  3685. # ex: filetype=sh
  3686. # bash completion for tpm2_rsaencrypt -*- shell-script -*-
  3687. _tpm2_rsaencrypt()
  3688. {
  3689. local auth_methods=(str: hex: file: file:- session: pcr:)
  3690. local hash_methods=(sha1 sha256 sha384 sha512)
  3691. local format_methods=(tss plain)
  3692. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3693. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3694. local key_attributes=(\| fixedtpm stclear fixedparent \
  3695. sensitivedataorigin userwithauth adminwithpolicy noda \
  3696. encrypteddupplication restricted decrypt sign)
  3697. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3698. policydelete writelocked writeall writedefine write_stclear \
  3699. globallock ppread ownerread authread policyread no_da orderly \
  3700. clear_stclear readlocked written platformcreate read_stclear)
  3701. local cur prev words cword split
  3702. _init_completion -s || return
  3703. case $prev in
  3704. -h | --help)
  3705. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3706. return;;
  3707. -T | --tcti)
  3708. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3709. return;;
  3710. -c | --key-context)
  3711. _filedir
  3712. return;;
  3713. -o | --output)
  3714. _filedir
  3715. return;;
  3716. -s | --scheme)
  3717. COMPREPLY=($(compgen -W "${signing_scheme[*]}" -- "$cur"))
  3718. return;;
  3719. -l | --label)
  3720. _filedir
  3721. return;;
  3722. esac
  3723. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3724. -Z --enable-erata -T --tcti \
  3725. -c -o -s -l --key-context --output --scheme --label " \
  3726. -- "$cur"))
  3727. } &&
  3728. complete -F _tpm2_rsaencrypt tpm2_rsaencrypt
  3729. # ex: filetype=sh
  3730. # bash completion for tpm2_selftest -*- shell-script -*-
  3731. _tpm2_selftest()
  3732. {
  3733. local auth_methods=(str: hex: file: file:- session: pcr:)
  3734. local hash_methods=(sha1 sha256 sha384 sha512)
  3735. local format_methods=(tss plain)
  3736. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3737. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3738. local key_attributes=(\| fixedtpm stclear fixedparent \
  3739. sensitivedataorigin userwithauth adminwithpolicy noda \
  3740. encrypteddupplication restricted decrypt sign)
  3741. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3742. policydelete writelocked writeall writedefine write_stclear \
  3743. globallock ppread ownerread authread policyread no_da orderly \
  3744. clear_stclear readlocked written platformcreate read_stclear)
  3745. local cur prev words cword split
  3746. _init_completion -s || return
  3747. case $prev in
  3748. -h | --help)
  3749. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3750. return;;
  3751. -T | --tcti)
  3752. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3753. return;;
  3754. -f | --fulltest)
  3755. _filedir
  3756. return;;
  3757. esac
  3758. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3759. -Z --enable-erata -T --tcti \
  3760. -f --fulltest " \
  3761. -- "$cur"))
  3762. } &&
  3763. complete -F _tpm2_selftest tpm2_selftest
  3764. # ex: filetype=sh
  3765. # bash completion for tpm2_send -*- shell-script -*-
  3766. _tpm2_send()
  3767. {
  3768. local auth_methods=(str: hex: file: file:- session: pcr:)
  3769. local hash_methods=(sha1 sha256 sha384 sha512)
  3770. local format_methods=(tss plain)
  3771. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3772. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3773. local key_attributes=(\| fixedtpm stclear fixedparent \
  3774. sensitivedataorigin userwithauth adminwithpolicy noda \
  3775. encrypteddupplication restricted decrypt sign)
  3776. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3777. policydelete writelocked writeall writedefine write_stclear \
  3778. globallock ppread ownerread authread policyread no_da orderly \
  3779. clear_stclear readlocked written platformcreate read_stclear)
  3780. local cur prev words cword split
  3781. _init_completion -s || return
  3782. case $prev in
  3783. -h | --help)
  3784. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3785. return;;
  3786. -T | --tcti)
  3787. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3788. return;;
  3789. -o | --output)
  3790. _filedir
  3791. return;;
  3792. esac
  3793. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3794. -Z --enable-erata -T --tcti \
  3795. -o --output " \
  3796. -- "$cur"))
  3797. } &&
  3798. complete -F _tpm2_send tpm2_send
  3799. # ex: filetype=sh
  3800. # bash completion for tpm2_setclock -*- shell-script -*-
  3801. _tpm2_setclock()
  3802. {
  3803. local auth_methods=(str: hex: file: file:- session: pcr:)
  3804. local hash_methods=(sha1 sha256 sha384 sha512)
  3805. local format_methods=(tss plain)
  3806. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3807. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3808. local key_attributes=(\| fixedtpm stclear fixedparent \
  3809. sensitivedataorigin userwithauth adminwithpolicy noda \
  3810. encrypteddupplication restricted decrypt sign)
  3811. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3812. policydelete writelocked writeall writedefine write_stclear \
  3813. globallock ppread ownerread authread policyread no_da orderly \
  3814. clear_stclear readlocked written platformcreate read_stclear)
  3815. local cur prev words cword split
  3816. _init_completion -s || return
  3817. case $prev in
  3818. -h | --help)
  3819. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3820. return;;
  3821. -T | --tcti)
  3822. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3823. return;;
  3824. -c | --hierarchy)
  3825. _filedir
  3826. return;;
  3827. -p | --auth)
  3828. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  3829. return;;
  3830. esac
  3831. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3832. -Z --enable-erata -T --tcti \
  3833. -c -p --hierarchy --auth --cphash " \
  3834. -- "$cur"))
  3835. } &&
  3836. complete -F _tpm2_setclock tpm2_setclock
  3837. # ex: filetype=sh
  3838. # bash completion for tpm2_setcommandauditstatus -*- shell-script -*-
  3839. _tpm2_setcommandauditstatus()
  3840. {
  3841. local auth_methods=(str: hex: file: file:- session: pcr:)
  3842. local hash_methods=(sha1 sha256 sha384 sha512)
  3843. local format_methods=(tss plain)
  3844. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3845. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3846. local key_attributes=(\| fixedtpm stclear fixedparent \
  3847. sensitivedataorigin userwithauth adminwithpolicy noda \
  3848. encrypteddupplication restricted decrypt sign)
  3849. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3850. policydelete writelocked writeall writedefine write_stclear \
  3851. globallock ppread ownerread authread policyread no_da orderly \
  3852. clear_stclear readlocked written platformcreate read_stclear)
  3853. local cur prev words cword split
  3854. _init_completion -s || return
  3855. case $prev in
  3856. -h | --help)
  3857. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3858. return;;
  3859. -T | --tcti)
  3860. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3861. return;;
  3862. -C | --hierarchy)
  3863. _filedir
  3864. return;;
  3865. -P | --hierarchy-auth)
  3866. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  3867. return;;
  3868. -c | --clear-list)
  3869. _filedir
  3870. return;;
  3871. -g | --hash-algorithm)
  3872. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  3873. return;;
  3874. esac
  3875. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3876. -Z --enable-erata -T --tcti \
  3877. -C -P -c -g --hierarchy --hierarchy-auth --clear-list --hash-algorithm " \
  3878. -- "$cur"))
  3879. } &&
  3880. complete -F _tpm2_setcommandauditstatus tpm2_setcommandauditstatus
  3881. # ex: filetype=sh
  3882. # bash completion for tpm2_setprimarypolicy -*- shell-script -*-
  3883. _tpm2_setprimarypolicy()
  3884. {
  3885. local auth_methods=(str: hex: file: file:- session: pcr:)
  3886. local hash_methods=(sha1 sha256 sha384 sha512)
  3887. local format_methods=(tss plain)
  3888. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3889. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3890. local key_attributes=(\| fixedtpm stclear fixedparent \
  3891. sensitivedataorigin userwithauth adminwithpolicy noda \
  3892. encrypteddupplication restricted decrypt sign)
  3893. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3894. policydelete writelocked writeall writedefine write_stclear \
  3895. globallock ppread ownerread authread policyread no_da orderly \
  3896. clear_stclear readlocked written platformcreate read_stclear)
  3897. local cur prev words cword split
  3898. _init_completion -s || return
  3899. case $prev in
  3900. -h | --help)
  3901. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3902. return;;
  3903. -T | --tcti)
  3904. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3905. return;;
  3906. -C | --hierarchy)
  3907. _filedir
  3908. return;;
  3909. -P | --auth)
  3910. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  3911. return;;
  3912. -L | --policy)
  3913. _filedir
  3914. return;;
  3915. -g | --hash-algorithm)
  3916. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  3917. return;;
  3918. esac
  3919. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3920. -Z --enable-erata -T --tcti \
  3921. -C -P -L -g --hierarchy --auth --policy --hash-algorithm --cphash " \
  3922. -- "$cur"))
  3923. } &&
  3924. complete -F _tpm2_setprimarypolicy tpm2_setprimarypolicy
  3925. # ex: filetype=sh
  3926. # bash completion for tpm2_shutdown -*- shell-script -*-
  3927. _tpm2_shutdown()
  3928. {
  3929. local auth_methods=(str: hex: file: file:- session: pcr:)
  3930. local hash_methods=(sha1 sha256 sha384 sha512)
  3931. local format_methods=(tss plain)
  3932. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3933. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3934. local key_attributes=(\| fixedtpm stclear fixedparent \
  3935. sensitivedataorigin userwithauth adminwithpolicy noda \
  3936. encrypteddupplication restricted decrypt sign)
  3937. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3938. policydelete writelocked writeall writedefine write_stclear \
  3939. globallock ppread ownerread authread policyread no_da orderly \
  3940. clear_stclear readlocked written platformcreate read_stclear)
  3941. local cur prev words cword split
  3942. _init_completion -s || return
  3943. case $prev in
  3944. -h | --help)
  3945. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3946. return;;
  3947. -T | --tcti)
  3948. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3949. return;;
  3950. -c | --clear)
  3951. _filedir
  3952. return;;
  3953. esac
  3954. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  3955. -Z --enable-erata -T --tcti \
  3956. -c --clear " \
  3957. -- "$cur"))
  3958. } &&
  3959. complete -F _tpm2_shutdown tpm2_shutdown
  3960. # ex: filetype=sh
  3961. # bash completion for tpm2_sign -*- shell-script -*-
  3962. _tpm2_sign()
  3963. {
  3964. local auth_methods=(str: hex: file: file:- session: pcr:)
  3965. local hash_methods=(sha1 sha256 sha384 sha512)
  3966. local format_methods=(tss plain)
  3967. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  3968. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  3969. local key_attributes=(\| fixedtpm stclear fixedparent \
  3970. sensitivedataorigin userwithauth adminwithpolicy noda \
  3971. encrypteddupplication restricted decrypt sign)
  3972. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  3973. policydelete writelocked writeall writedefine write_stclear \
  3974. globallock ppread ownerread authread policyread no_da orderly \
  3975. clear_stclear readlocked written platformcreate read_stclear)
  3976. local cur prev words cword split
  3977. _init_completion -s || return
  3978. case $prev in
  3979. -h | --help)
  3980. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  3981. return;;
  3982. -T | --tcti)
  3983. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  3984. return;;
  3985. -c | --key-context)
  3986. _filedir
  3987. return;;
  3988. -p | --auth)
  3989. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  3990. return;;
  3991. -g | --hash-algorithm)
  3992. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  3993. return;;
  3994. -s | --scheme)
  3995. COMPREPLY=($(compgen -W "${signing_scheme[*]}" -- "$cur"))
  3996. return;;
  3997. -d | --digest)
  3998. _filedir
  3999. return;;
  4000. -t | --ticket)
  4001. _filedir
  4002. return;;
  4003. -o | --signature)
  4004. _filedir
  4005. return;;
  4006. -f | --format)
  4007. COMPREPLY=($(compgen -W "${format_methods[*]}" -- "$cur"))
  4008. return;;
  4009. esac
  4010. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  4011. -Z --enable-erata -T --tcti \
  4012. -c -p -g -s -d -t -o -f --key-context --auth --hash-algorithm --scheme --digest --ticket --signature --format --cphash " \
  4013. -- "$cur"))
  4014. } &&
  4015. complete -F _tpm2_sign tpm2_sign
  4016. # ex: filetype=sh
  4017. # bash completion for tpm2_startauthsession -*- shell-script -*-
  4018. _tpm2_startauthsession()
  4019. {
  4020. local auth_methods=(str: hex: file: file:- session: pcr:)
  4021. local hash_methods=(sha1 sha256 sha384 sha512)
  4022. local format_methods=(tss plain)
  4023. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  4024. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  4025. local key_attributes=(\| fixedtpm stclear fixedparent \
  4026. sensitivedataorigin userwithauth adminwithpolicy noda \
  4027. encrypteddupplication restricted decrypt sign)
  4028. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  4029. policydelete writelocked writeall writedefine write_stclear \
  4030. globallock ppread ownerread authread policyread no_da orderly \
  4031. clear_stclear readlocked written platformcreate read_stclear)
  4032. local cur prev words cword split
  4033. _init_completion -s || return
  4034. case $prev in
  4035. -h | --help)
  4036. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  4037. return;;
  4038. -T | --tcti)
  4039. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  4040. return;;
  4041. -g | --hash-algorithm)
  4042. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  4043. return;;
  4044. -c | --key-context)
  4045. _filedir
  4046. return;;
  4047. -S | --session)
  4048. _filedir
  4049. return;;
  4050. esac
  4051. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  4052. -Z --enable-erata -T --tcti \
  4053. -g -c -S --hash-algorithm --key-context --session --policy --audit " \
  4054. -- "$cur"))
  4055. } &&
  4056. complete -F _tpm2_startauthsession tpm2_startauthsession
  4057. # ex: filetype=sh
  4058. # bash completion for tpm2_startup -*- shell-script -*-
  4059. _tpm2_startup()
  4060. {
  4061. local auth_methods=(str: hex: file: file:- session: pcr:)
  4062. local hash_methods=(sha1 sha256 sha384 sha512)
  4063. local format_methods=(tss plain)
  4064. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  4065. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  4066. local key_attributes=(\| fixedtpm stclear fixedparent \
  4067. sensitivedataorigin userwithauth adminwithpolicy noda \
  4068. encrypteddupplication restricted decrypt sign)
  4069. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  4070. policydelete writelocked writeall writedefine write_stclear \
  4071. globallock ppread ownerread authread policyread no_da orderly \
  4072. clear_stclear readlocked written platformcreate read_stclear)
  4073. local cur prev words cword split
  4074. _init_completion -s || return
  4075. case $prev in
  4076. -h | --help)
  4077. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  4078. return;;
  4079. -T | --tcti)
  4080. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  4081. return;;
  4082. -c | --clear)
  4083. _filedir
  4084. return;;
  4085. esac
  4086. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  4087. -Z --enable-erata -T --tcti \
  4088. -c --clear " \
  4089. -- "$cur"))
  4090. } &&
  4091. complete -F _tpm2_startup tpm2_startup
  4092. # ex: filetype=sh
  4093. # bash completion for tpm2_stirrandom -*- shell-script -*-
  4094. _tpm2_stirrandom()
  4095. {
  4096. local auth_methods=(str: hex: file: file:- session: pcr:)
  4097. local hash_methods=(sha1 sha256 sha384 sha512)
  4098. local format_methods=(tss plain)
  4099. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  4100. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  4101. local key_attributes=(\| fixedtpm stclear fixedparent \
  4102. sensitivedataorigin userwithauth adminwithpolicy noda \
  4103. encrypteddupplication restricted decrypt sign)
  4104. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  4105. policydelete writelocked writeall writedefine write_stclear \
  4106. globallock ppread ownerread authread policyread no_da orderly \
  4107. clear_stclear readlocked written platformcreate read_stclear)
  4108. local cur prev words cword split
  4109. _init_completion -s || return
  4110. case $prev in
  4111. -h | --help)
  4112. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  4113. return;;
  4114. -T | --tcti)
  4115. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  4116. return;;
  4117. esac
  4118. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  4119. -Z --enable-erata -T --tcti \
  4120. " \
  4121. -- "$cur"))
  4122. } &&
  4123. complete -F _tpm2_stirrandom tpm2_stirrandom
  4124. # ex: filetype=sh
  4125. # bash completion for tpm2_testparms -*- shell-script -*-
  4126. _tpm2_testparms()
  4127. {
  4128. local auth_methods=(str: hex: file: file:- session: pcr:)
  4129. local hash_methods=(sha1 sha256 sha384 sha512)
  4130. local format_methods=(tss plain)
  4131. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  4132. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  4133. local key_attributes=(\| fixedtpm stclear fixedparent \
  4134. sensitivedataorigin userwithauth adminwithpolicy noda \
  4135. encrypteddupplication restricted decrypt sign)
  4136. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  4137. policydelete writelocked writeall writedefine write_stclear \
  4138. globallock ppread ownerread authread policyread no_da orderly \
  4139. clear_stclear readlocked written platformcreate read_stclear)
  4140. local cur prev words cword split
  4141. _init_completion -s || return
  4142. case $prev in
  4143. -h | --help)
  4144. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  4145. return;;
  4146. -T | --tcti)
  4147. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  4148. return;;
  4149. esac
  4150. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  4151. -Z --enable-erata -T --tcti \
  4152. " \
  4153. -- "$cur"))
  4154. } &&
  4155. complete -F _tpm2_testparms tpm2_testparms
  4156. # ex: filetype=sh
  4157. # bash completion for tpm2_unseal -*- shell-script -*-
  4158. _tpm2_unseal()
  4159. {
  4160. local auth_methods=(str: hex: file: file:- session: pcr:)
  4161. local hash_methods=(sha1 sha256 sha384 sha512)
  4162. local format_methods=(tss plain)
  4163. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  4164. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  4165. local key_attributes=(\| fixedtpm stclear fixedparent \
  4166. sensitivedataorigin userwithauth adminwithpolicy noda \
  4167. encrypteddupplication restricted decrypt sign)
  4168. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  4169. policydelete writelocked writeall writedefine write_stclear \
  4170. globallock ppread ownerread authread policyread no_da orderly \
  4171. clear_stclear readlocked written platformcreate read_stclear)
  4172. local cur prev words cword split
  4173. _init_completion -s || return
  4174. case $prev in
  4175. -h | --help)
  4176. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  4177. return;;
  4178. -T | --tcti)
  4179. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  4180. return;;
  4181. -c | --object-context)
  4182. _filedir
  4183. return;;
  4184. -p | --auth)
  4185. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  4186. return;;
  4187. -o | --output)
  4188. _filedir
  4189. return;;
  4190. esac
  4191. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  4192. -Z --enable-erata -T --tcti \
  4193. -c -p -o --object-context --auth --output --cphash " \
  4194. -- "$cur"))
  4195. } &&
  4196. complete -F _tpm2_unseal tpm2_unseal
  4197. # ex: filetype=sh
  4198. # bash completion for tpm2_verifysignature -*- shell-script -*-
  4199. _tpm2_verifysignature()
  4200. {
  4201. local auth_methods=(str: hex: file: file:- session: pcr:)
  4202. local hash_methods=(sha1 sha256 sha384 sha512)
  4203. local format_methods=(tss plain)
  4204. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  4205. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  4206. local key_attributes=(\| fixedtpm stclear fixedparent \
  4207. sensitivedataorigin userwithauth adminwithpolicy noda \
  4208. encrypteddupplication restricted decrypt sign)
  4209. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  4210. policydelete writelocked writeall writedefine write_stclear \
  4211. globallock ppread ownerread authread policyread no_da orderly \
  4212. clear_stclear readlocked written platformcreate read_stclear)
  4213. local cur prev words cword split
  4214. _init_completion -s || return
  4215. case $prev in
  4216. -h | --help)
  4217. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  4218. return;;
  4219. -T | --tcti)
  4220. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  4221. return;;
  4222. -c | --key-context)
  4223. _filedir
  4224. return;;
  4225. -g | --hash-algorithm)
  4226. COMPREPLY=($(compgen -W "${hash_methods[*]}" -- "$cur"))
  4227. return;;
  4228. -m | --message)
  4229. _filedir
  4230. return;;
  4231. -d | --digest)
  4232. _filedir
  4233. return;;
  4234. -s | --signature)
  4235. _filedir
  4236. return;;
  4237. -f | --scheme)
  4238. COMPREPLY=($(compgen -W "${signing_scheme[*]}" -- "$cur"))
  4239. return;;
  4240. -t | --ticket)
  4241. _filedir
  4242. return;;
  4243. esac
  4244. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  4245. -Z --enable-erata -T --tcti \
  4246. -c -g -m -d -s -f -t --key-context --hash-algorithm --message --digest --signature --scheme --ticket --format " \
  4247. -- "$cur"))
  4248. } &&
  4249. complete -F _tpm2_verifysignature tpm2_verifysignature
  4250. # ex: filetype=sh
  4251. # bash completion for tpm2_zgen2phase -*- shell-script -*-
  4252. _tpm2_zgen2phase()
  4253. {
  4254. local auth_methods=(str: hex: file: file:- session: pcr:)
  4255. local hash_methods=(sha1 sha256 sha384 sha512)
  4256. local format_methods=(tss plain)
  4257. local signing_scheme=(rsassa rsapss ecdsa ecdaa sm2 ecshnorr hmac)
  4258. local key_object=(rsa ecc aes camellia hmac xor keyedhash)
  4259. local key_attributes=(\| fixedtpm stclear fixedparent \
  4260. sensitivedataorigin userwithauth adminwithpolicy noda \
  4261. encrypteddupplication restricted decrypt sign)
  4262. local nv_attributes=(\| ppwrite ownerwrite authwrite policywrite \
  4263. policydelete writelocked writeall writedefine write_stclear \
  4264. globallock ppread ownerread authread policyread no_da orderly \
  4265. clear_stclear readlocked written platformcreate read_stclear)
  4266. local cur prev words cword split
  4267. _init_completion -s || return
  4268. case $prev in
  4269. -h | --help)
  4270. COMPREPLY=( $(compgen -W "man no-man" -- "$cur") )
  4271. return;;
  4272. -T | --tcti)
  4273. COMPREPLY=( $(compgen -W "tabrmd mssim device none" -- "$cur") )
  4274. return;;
  4275. -c | --key-context)
  4276. _filedir
  4277. return;;
  4278. -p | --key-auth)
  4279. COMPREPLY=($(compgen -W "${auth_methods[*]}" -- "$cur"))
  4280. return;;
  4281. -s | --scheme)
  4282. COMPREPLY=($(compgen -W "${signing_scheme[*]}" -- "$cur"))
  4283. return;;
  4284. -t | --counter)
  4285. _filedir
  4286. return;;
  4287. esac
  4288. COMPREPLY=($(compgen -W "-h --help -v --version -V --verbose -Q --quiet \
  4289. -Z --enable-erata -T --tcti \
  4290. -c -p -s -t --key-context --key-auth --scheme --counter --static --ephemeral --output --output " \
  4291. -- "$cur"))
  4292. } &&
  4293. complete -F _tpm2_zgen2phase tpm2_zgen2phase
  4294. # ex: filetype=sh
  4295. _tpm2() {
  4296. local cur prev words cword split
  4297. _init_completion -s || return
  4298. if ((cword == 1)); then
  4299. COMPREPLY=($(compgen -W "activatecredential certify certifyX509certutil certifycreation changeauth changeeps changepps checkquote clear clearcontrol clockrateadjust commit create createak createek createpolicy createprimary dictionarylockout duplicate ecdhkeygen ecdhzgen ecephemeral encryptdecrypt eventlog evictcontrol flushcontext getcap getcommandauditdigest geteccparameters getekcertificate getrandom getsessionauditdigest gettestresult gettime hash hierarchycontrol hmac import incrementalselftest load loadexternal makecredential nvcertify nvdefine nvextend nvincrement nvread nvreadlock nvreadpublic nvsetbits nvundefine nvwrite nvwritelock pcrallocate pcrevent pcrextend pcrread pcrreset policyauthorize policyauthorizenv policyauthvalue policycommandcode policycountertimer policycphash policyduplicationselect policylocality policynamehash policynv policynvwritten policyor policypassword policypcr policyrestart policysecret policysigned policytemplate policyticket print quote rc_decode readclock readpublic rsadecrypt rsaencrypt selftest send setclock setcommandauditstatus setprimarypolicy shutdown sign startauthsession startup stirrandom testparms unseal verifysignature zgen2phase " -- "$cur"))
  4300. else
  4301. tpmcommand=_tpm2_$prev
  4302. type $tpmcommand &>/dev/null && $tpmcommand
  4303. if [ $? == 1 ];then
  4304. COMPREPLY=($(compgen -W ${words[1]} -- "$cur"))
  4305. fi
  4306. fi
  4307. } &&
  4308. complete -F _tpm2 tpm2