s3_lib.c 127 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914
  1. /*
  2. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
  3. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
  4. * Copyright 2005 Nokia. All rights reserved.
  5. *
  6. * Licensed under the Apache License 2.0 (the "License"). You may not use
  7. * this file except in compliance with the License. You can obtain a copy
  8. * in the file LICENSE in the source distribution or at
  9. * https://www.openssl.org/source/license.html
  10. */
  11. #include <stdio.h>
  12. #include <openssl/objects.h>
  13. #include "internal/nelem.h"
  14. #include "ssl_local.h"
  15. #include <openssl/md5.h>
  16. #include <openssl/dh.h>
  17. #include <openssl/rand.h>
  18. #include <openssl/trace.h>
  19. #include "internal/cryptlib.h"
  20. #define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  21. #define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  22. #define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  23. /* TLSv1.3 downgrade protection sentinel values */
  24. const unsigned char tls11downgrade[] = {
  25. 0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44, 0x00
  26. };
  27. const unsigned char tls12downgrade[] = {
  28. 0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44, 0x01
  29. };
  30. /* The list of available TLSv1.3 ciphers */
  31. static SSL_CIPHER tls13_ciphers[] = {
  32. {
  33. 1,
  34. TLS1_3_RFC_AES_128_GCM_SHA256,
  35. TLS1_3_RFC_AES_128_GCM_SHA256,
  36. TLS1_3_CK_AES_128_GCM_SHA256,
  37. SSL_kANY,
  38. SSL_aANY,
  39. SSL_AES128GCM,
  40. SSL_AEAD,
  41. TLS1_3_VERSION, TLS1_3_VERSION,
  42. 0, 0,
  43. SSL_HIGH,
  44. SSL_HANDSHAKE_MAC_SHA256,
  45. 128,
  46. 128,
  47. }, {
  48. 1,
  49. TLS1_3_RFC_AES_256_GCM_SHA384,
  50. TLS1_3_RFC_AES_256_GCM_SHA384,
  51. TLS1_3_CK_AES_256_GCM_SHA384,
  52. SSL_kANY,
  53. SSL_aANY,
  54. SSL_AES256GCM,
  55. SSL_AEAD,
  56. TLS1_3_VERSION, TLS1_3_VERSION,
  57. 0, 0,
  58. SSL_HIGH,
  59. SSL_HANDSHAKE_MAC_SHA384,
  60. 256,
  61. 256,
  62. },
  63. #if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
  64. {
  65. 1,
  66. TLS1_3_RFC_CHACHA20_POLY1305_SHA256,
  67. TLS1_3_RFC_CHACHA20_POLY1305_SHA256,
  68. TLS1_3_CK_CHACHA20_POLY1305_SHA256,
  69. SSL_kANY,
  70. SSL_aANY,
  71. SSL_CHACHA20POLY1305,
  72. SSL_AEAD,
  73. TLS1_3_VERSION, TLS1_3_VERSION,
  74. 0, 0,
  75. SSL_HIGH,
  76. SSL_HANDSHAKE_MAC_SHA256,
  77. 256,
  78. 256,
  79. },
  80. #endif
  81. {
  82. 1,
  83. TLS1_3_RFC_AES_128_CCM_SHA256,
  84. TLS1_3_RFC_AES_128_CCM_SHA256,
  85. TLS1_3_CK_AES_128_CCM_SHA256,
  86. SSL_kANY,
  87. SSL_aANY,
  88. SSL_AES128CCM,
  89. SSL_AEAD,
  90. TLS1_3_VERSION, TLS1_3_VERSION,
  91. 0, 0,
  92. SSL_NOT_DEFAULT | SSL_HIGH,
  93. SSL_HANDSHAKE_MAC_SHA256,
  94. 128,
  95. 128,
  96. }, {
  97. 1,
  98. TLS1_3_RFC_AES_128_CCM_8_SHA256,
  99. TLS1_3_RFC_AES_128_CCM_8_SHA256,
  100. TLS1_3_CK_AES_128_CCM_8_SHA256,
  101. SSL_kANY,
  102. SSL_aANY,
  103. SSL_AES128CCM8,
  104. SSL_AEAD,
  105. TLS1_3_VERSION, TLS1_3_VERSION,
  106. 0, 0,
  107. SSL_NOT_DEFAULT | SSL_HIGH,
  108. SSL_HANDSHAKE_MAC_SHA256,
  109. 128,
  110. 128,
  111. }
  112. };
  113. /*
  114. * The list of available ciphers, mostly organized into the following
  115. * groups:
  116. * Always there
  117. * EC
  118. * PSK
  119. * SRP (within that: RSA EC PSK)
  120. * Cipher families: Chacha/poly, Camellia, Gost, IDEA, SEED
  121. * Weak ciphers
  122. */
  123. static SSL_CIPHER ssl3_ciphers[] = {
  124. {
  125. 1,
  126. SSL3_TXT_RSA_NULL_MD5,
  127. SSL3_RFC_RSA_NULL_MD5,
  128. SSL3_CK_RSA_NULL_MD5,
  129. SSL_kRSA,
  130. SSL_aRSA,
  131. SSL_eNULL,
  132. SSL_MD5,
  133. SSL3_VERSION, TLS1_2_VERSION,
  134. DTLS1_BAD_VER, DTLS1_2_VERSION,
  135. SSL_STRONG_NONE,
  136. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  137. 0,
  138. 0,
  139. },
  140. {
  141. 1,
  142. SSL3_TXT_RSA_NULL_SHA,
  143. SSL3_RFC_RSA_NULL_SHA,
  144. SSL3_CK_RSA_NULL_SHA,
  145. SSL_kRSA,
  146. SSL_aRSA,
  147. SSL_eNULL,
  148. SSL_SHA1,
  149. SSL3_VERSION, TLS1_2_VERSION,
  150. DTLS1_BAD_VER, DTLS1_2_VERSION,
  151. SSL_STRONG_NONE | SSL_FIPS,
  152. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  153. 0,
  154. 0,
  155. },
  156. #ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  157. {
  158. 1,
  159. SSL3_TXT_RSA_DES_192_CBC3_SHA,
  160. SSL3_RFC_RSA_DES_192_CBC3_SHA,
  161. SSL3_CK_RSA_DES_192_CBC3_SHA,
  162. SSL_kRSA,
  163. SSL_aRSA,
  164. SSL_3DES,
  165. SSL_SHA1,
  166. SSL3_VERSION, TLS1_2_VERSION,
  167. DTLS1_BAD_VER, DTLS1_2_VERSION,
  168. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  169. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  170. 112,
  171. 168,
  172. },
  173. {
  174. 1,
  175. SSL3_TXT_DHE_DSS_DES_192_CBC3_SHA,
  176. SSL3_RFC_DHE_DSS_DES_192_CBC3_SHA,
  177. SSL3_CK_DHE_DSS_DES_192_CBC3_SHA,
  178. SSL_kDHE,
  179. SSL_aDSS,
  180. SSL_3DES,
  181. SSL_SHA1,
  182. SSL3_VERSION, TLS1_2_VERSION,
  183. DTLS1_BAD_VER, DTLS1_2_VERSION,
  184. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  185. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  186. 112,
  187. 168,
  188. },
  189. {
  190. 1,
  191. SSL3_TXT_DHE_RSA_DES_192_CBC3_SHA,
  192. SSL3_RFC_DHE_RSA_DES_192_CBC3_SHA,
  193. SSL3_CK_DHE_RSA_DES_192_CBC3_SHA,
  194. SSL_kDHE,
  195. SSL_aRSA,
  196. SSL_3DES,
  197. SSL_SHA1,
  198. SSL3_VERSION, TLS1_2_VERSION,
  199. DTLS1_BAD_VER, DTLS1_2_VERSION,
  200. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  201. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  202. 112,
  203. 168,
  204. },
  205. {
  206. 1,
  207. SSL3_TXT_ADH_DES_192_CBC_SHA,
  208. SSL3_RFC_ADH_DES_192_CBC_SHA,
  209. SSL3_CK_ADH_DES_192_CBC_SHA,
  210. SSL_kDHE,
  211. SSL_aNULL,
  212. SSL_3DES,
  213. SSL_SHA1,
  214. SSL3_VERSION, TLS1_2_VERSION,
  215. DTLS1_BAD_VER, DTLS1_2_VERSION,
  216. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  217. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  218. 112,
  219. 168,
  220. },
  221. #endif
  222. {
  223. 1,
  224. TLS1_TXT_RSA_WITH_AES_128_SHA,
  225. TLS1_RFC_RSA_WITH_AES_128_SHA,
  226. TLS1_CK_RSA_WITH_AES_128_SHA,
  227. SSL_kRSA,
  228. SSL_aRSA,
  229. SSL_AES128,
  230. SSL_SHA1,
  231. SSL3_VERSION, TLS1_2_VERSION,
  232. DTLS1_BAD_VER, DTLS1_2_VERSION,
  233. SSL_HIGH | SSL_FIPS,
  234. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  235. 128,
  236. 128,
  237. },
  238. {
  239. 1,
  240. TLS1_TXT_DHE_DSS_WITH_AES_128_SHA,
  241. TLS1_RFC_DHE_DSS_WITH_AES_128_SHA,
  242. TLS1_CK_DHE_DSS_WITH_AES_128_SHA,
  243. SSL_kDHE,
  244. SSL_aDSS,
  245. SSL_AES128,
  246. SSL_SHA1,
  247. SSL3_VERSION, TLS1_2_VERSION,
  248. DTLS1_BAD_VER, DTLS1_2_VERSION,
  249. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  250. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  251. 128,
  252. 128,
  253. },
  254. {
  255. 1,
  256. TLS1_TXT_DHE_RSA_WITH_AES_128_SHA,
  257. TLS1_RFC_DHE_RSA_WITH_AES_128_SHA,
  258. TLS1_CK_DHE_RSA_WITH_AES_128_SHA,
  259. SSL_kDHE,
  260. SSL_aRSA,
  261. SSL_AES128,
  262. SSL_SHA1,
  263. SSL3_VERSION, TLS1_2_VERSION,
  264. DTLS1_BAD_VER, DTLS1_2_VERSION,
  265. SSL_HIGH | SSL_FIPS,
  266. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  267. 128,
  268. 128,
  269. },
  270. {
  271. 1,
  272. TLS1_TXT_ADH_WITH_AES_128_SHA,
  273. TLS1_RFC_ADH_WITH_AES_128_SHA,
  274. TLS1_CK_ADH_WITH_AES_128_SHA,
  275. SSL_kDHE,
  276. SSL_aNULL,
  277. SSL_AES128,
  278. SSL_SHA1,
  279. SSL3_VERSION, TLS1_2_VERSION,
  280. DTLS1_BAD_VER, DTLS1_2_VERSION,
  281. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  282. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  283. 128,
  284. 128,
  285. },
  286. {
  287. 1,
  288. TLS1_TXT_RSA_WITH_AES_256_SHA,
  289. TLS1_RFC_RSA_WITH_AES_256_SHA,
  290. TLS1_CK_RSA_WITH_AES_256_SHA,
  291. SSL_kRSA,
  292. SSL_aRSA,
  293. SSL_AES256,
  294. SSL_SHA1,
  295. SSL3_VERSION, TLS1_2_VERSION,
  296. DTLS1_BAD_VER, DTLS1_2_VERSION,
  297. SSL_HIGH | SSL_FIPS,
  298. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  299. 256,
  300. 256,
  301. },
  302. {
  303. 1,
  304. TLS1_TXT_DHE_DSS_WITH_AES_256_SHA,
  305. TLS1_RFC_DHE_DSS_WITH_AES_256_SHA,
  306. TLS1_CK_DHE_DSS_WITH_AES_256_SHA,
  307. SSL_kDHE,
  308. SSL_aDSS,
  309. SSL_AES256,
  310. SSL_SHA1,
  311. SSL3_VERSION, TLS1_2_VERSION,
  312. DTLS1_BAD_VER, DTLS1_2_VERSION,
  313. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  314. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  315. 256,
  316. 256,
  317. },
  318. {
  319. 1,
  320. TLS1_TXT_DHE_RSA_WITH_AES_256_SHA,
  321. TLS1_RFC_DHE_RSA_WITH_AES_256_SHA,
  322. TLS1_CK_DHE_RSA_WITH_AES_256_SHA,
  323. SSL_kDHE,
  324. SSL_aRSA,
  325. SSL_AES256,
  326. SSL_SHA1,
  327. SSL3_VERSION, TLS1_2_VERSION,
  328. DTLS1_BAD_VER, DTLS1_2_VERSION,
  329. SSL_HIGH | SSL_FIPS,
  330. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  331. 256,
  332. 256,
  333. },
  334. {
  335. 1,
  336. TLS1_TXT_ADH_WITH_AES_256_SHA,
  337. TLS1_RFC_ADH_WITH_AES_256_SHA,
  338. TLS1_CK_ADH_WITH_AES_256_SHA,
  339. SSL_kDHE,
  340. SSL_aNULL,
  341. SSL_AES256,
  342. SSL_SHA1,
  343. SSL3_VERSION, TLS1_2_VERSION,
  344. DTLS1_BAD_VER, DTLS1_2_VERSION,
  345. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  346. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  347. 256,
  348. 256,
  349. },
  350. {
  351. 1,
  352. TLS1_TXT_RSA_WITH_NULL_SHA256,
  353. TLS1_RFC_RSA_WITH_NULL_SHA256,
  354. TLS1_CK_RSA_WITH_NULL_SHA256,
  355. SSL_kRSA,
  356. SSL_aRSA,
  357. SSL_eNULL,
  358. SSL_SHA256,
  359. TLS1_2_VERSION, TLS1_2_VERSION,
  360. DTLS1_2_VERSION, DTLS1_2_VERSION,
  361. SSL_STRONG_NONE | SSL_FIPS,
  362. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  363. 0,
  364. 0,
  365. },
  366. {
  367. 1,
  368. TLS1_TXT_RSA_WITH_AES_128_SHA256,
  369. TLS1_RFC_RSA_WITH_AES_128_SHA256,
  370. TLS1_CK_RSA_WITH_AES_128_SHA256,
  371. SSL_kRSA,
  372. SSL_aRSA,
  373. SSL_AES128,
  374. SSL_SHA256,
  375. TLS1_2_VERSION, TLS1_2_VERSION,
  376. DTLS1_2_VERSION, DTLS1_2_VERSION,
  377. SSL_HIGH | SSL_FIPS,
  378. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  379. 128,
  380. 128,
  381. },
  382. {
  383. 1,
  384. TLS1_TXT_RSA_WITH_AES_256_SHA256,
  385. TLS1_RFC_RSA_WITH_AES_256_SHA256,
  386. TLS1_CK_RSA_WITH_AES_256_SHA256,
  387. SSL_kRSA,
  388. SSL_aRSA,
  389. SSL_AES256,
  390. SSL_SHA256,
  391. TLS1_2_VERSION, TLS1_2_VERSION,
  392. DTLS1_2_VERSION, DTLS1_2_VERSION,
  393. SSL_HIGH | SSL_FIPS,
  394. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  395. 256,
  396. 256,
  397. },
  398. {
  399. 1,
  400. TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256,
  401. TLS1_RFC_DHE_DSS_WITH_AES_128_SHA256,
  402. TLS1_CK_DHE_DSS_WITH_AES_128_SHA256,
  403. SSL_kDHE,
  404. SSL_aDSS,
  405. SSL_AES128,
  406. SSL_SHA256,
  407. TLS1_2_VERSION, TLS1_2_VERSION,
  408. DTLS1_2_VERSION, DTLS1_2_VERSION,
  409. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  410. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  411. 128,
  412. 128,
  413. },
  414. {
  415. 1,
  416. TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256,
  417. TLS1_RFC_DHE_RSA_WITH_AES_128_SHA256,
  418. TLS1_CK_DHE_RSA_WITH_AES_128_SHA256,
  419. SSL_kDHE,
  420. SSL_aRSA,
  421. SSL_AES128,
  422. SSL_SHA256,
  423. TLS1_2_VERSION, TLS1_2_VERSION,
  424. DTLS1_2_VERSION, DTLS1_2_VERSION,
  425. SSL_HIGH | SSL_FIPS,
  426. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  427. 128,
  428. 128,
  429. },
  430. {
  431. 1,
  432. TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256,
  433. TLS1_RFC_DHE_DSS_WITH_AES_256_SHA256,
  434. TLS1_CK_DHE_DSS_WITH_AES_256_SHA256,
  435. SSL_kDHE,
  436. SSL_aDSS,
  437. SSL_AES256,
  438. SSL_SHA256,
  439. TLS1_2_VERSION, TLS1_2_VERSION,
  440. DTLS1_2_VERSION, DTLS1_2_VERSION,
  441. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  442. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  443. 256,
  444. 256,
  445. },
  446. {
  447. 1,
  448. TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256,
  449. TLS1_RFC_DHE_RSA_WITH_AES_256_SHA256,
  450. TLS1_CK_DHE_RSA_WITH_AES_256_SHA256,
  451. SSL_kDHE,
  452. SSL_aRSA,
  453. SSL_AES256,
  454. SSL_SHA256,
  455. TLS1_2_VERSION, TLS1_2_VERSION,
  456. DTLS1_2_VERSION, DTLS1_2_VERSION,
  457. SSL_HIGH | SSL_FIPS,
  458. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  459. 256,
  460. 256,
  461. },
  462. {
  463. 1,
  464. TLS1_TXT_ADH_WITH_AES_128_SHA256,
  465. TLS1_RFC_ADH_WITH_AES_128_SHA256,
  466. TLS1_CK_ADH_WITH_AES_128_SHA256,
  467. SSL_kDHE,
  468. SSL_aNULL,
  469. SSL_AES128,
  470. SSL_SHA256,
  471. TLS1_2_VERSION, TLS1_2_VERSION,
  472. DTLS1_2_VERSION, DTLS1_2_VERSION,
  473. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  474. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  475. 128,
  476. 128,
  477. },
  478. {
  479. 1,
  480. TLS1_TXT_ADH_WITH_AES_256_SHA256,
  481. TLS1_RFC_ADH_WITH_AES_256_SHA256,
  482. TLS1_CK_ADH_WITH_AES_256_SHA256,
  483. SSL_kDHE,
  484. SSL_aNULL,
  485. SSL_AES256,
  486. SSL_SHA256,
  487. TLS1_2_VERSION, TLS1_2_VERSION,
  488. DTLS1_2_VERSION, DTLS1_2_VERSION,
  489. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  490. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  491. 256,
  492. 256,
  493. },
  494. {
  495. 1,
  496. TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256,
  497. TLS1_RFC_RSA_WITH_AES_128_GCM_SHA256,
  498. TLS1_CK_RSA_WITH_AES_128_GCM_SHA256,
  499. SSL_kRSA,
  500. SSL_aRSA,
  501. SSL_AES128GCM,
  502. SSL_AEAD,
  503. TLS1_2_VERSION, TLS1_2_VERSION,
  504. DTLS1_2_VERSION, DTLS1_2_VERSION,
  505. SSL_HIGH | SSL_FIPS,
  506. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  507. 128,
  508. 128,
  509. },
  510. {
  511. 1,
  512. TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384,
  513. TLS1_RFC_RSA_WITH_AES_256_GCM_SHA384,
  514. TLS1_CK_RSA_WITH_AES_256_GCM_SHA384,
  515. SSL_kRSA,
  516. SSL_aRSA,
  517. SSL_AES256GCM,
  518. SSL_AEAD,
  519. TLS1_2_VERSION, TLS1_2_VERSION,
  520. DTLS1_2_VERSION, DTLS1_2_VERSION,
  521. SSL_HIGH | SSL_FIPS,
  522. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  523. 256,
  524. 256,
  525. },
  526. {
  527. 1,
  528. TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256,
  529. TLS1_RFC_DHE_RSA_WITH_AES_128_GCM_SHA256,
  530. TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256,
  531. SSL_kDHE,
  532. SSL_aRSA,
  533. SSL_AES128GCM,
  534. SSL_AEAD,
  535. TLS1_2_VERSION, TLS1_2_VERSION,
  536. DTLS1_2_VERSION, DTLS1_2_VERSION,
  537. SSL_HIGH | SSL_FIPS,
  538. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  539. 128,
  540. 128,
  541. },
  542. {
  543. 1,
  544. TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384,
  545. TLS1_RFC_DHE_RSA_WITH_AES_256_GCM_SHA384,
  546. TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384,
  547. SSL_kDHE,
  548. SSL_aRSA,
  549. SSL_AES256GCM,
  550. SSL_AEAD,
  551. TLS1_2_VERSION, TLS1_2_VERSION,
  552. DTLS1_2_VERSION, DTLS1_2_VERSION,
  553. SSL_HIGH | SSL_FIPS,
  554. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  555. 256,
  556. 256,
  557. },
  558. {
  559. 1,
  560. TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256,
  561. TLS1_RFC_DHE_DSS_WITH_AES_128_GCM_SHA256,
  562. TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256,
  563. SSL_kDHE,
  564. SSL_aDSS,
  565. SSL_AES128GCM,
  566. SSL_AEAD,
  567. TLS1_2_VERSION, TLS1_2_VERSION,
  568. DTLS1_2_VERSION, DTLS1_2_VERSION,
  569. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  570. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  571. 128,
  572. 128,
  573. },
  574. {
  575. 1,
  576. TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384,
  577. TLS1_RFC_DHE_DSS_WITH_AES_256_GCM_SHA384,
  578. TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384,
  579. SSL_kDHE,
  580. SSL_aDSS,
  581. SSL_AES256GCM,
  582. SSL_AEAD,
  583. TLS1_2_VERSION, TLS1_2_VERSION,
  584. DTLS1_2_VERSION, DTLS1_2_VERSION,
  585. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  586. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  587. 256,
  588. 256,
  589. },
  590. {
  591. 1,
  592. TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256,
  593. TLS1_RFC_ADH_WITH_AES_128_GCM_SHA256,
  594. TLS1_CK_ADH_WITH_AES_128_GCM_SHA256,
  595. SSL_kDHE,
  596. SSL_aNULL,
  597. SSL_AES128GCM,
  598. SSL_AEAD,
  599. TLS1_2_VERSION, TLS1_2_VERSION,
  600. DTLS1_2_VERSION, DTLS1_2_VERSION,
  601. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  602. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  603. 128,
  604. 128,
  605. },
  606. {
  607. 1,
  608. TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384,
  609. TLS1_RFC_ADH_WITH_AES_256_GCM_SHA384,
  610. TLS1_CK_ADH_WITH_AES_256_GCM_SHA384,
  611. SSL_kDHE,
  612. SSL_aNULL,
  613. SSL_AES256GCM,
  614. SSL_AEAD,
  615. TLS1_2_VERSION, TLS1_2_VERSION,
  616. DTLS1_2_VERSION, DTLS1_2_VERSION,
  617. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  618. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  619. 256,
  620. 256,
  621. },
  622. {
  623. 1,
  624. TLS1_TXT_RSA_WITH_AES_128_CCM,
  625. TLS1_RFC_RSA_WITH_AES_128_CCM,
  626. TLS1_CK_RSA_WITH_AES_128_CCM,
  627. SSL_kRSA,
  628. SSL_aRSA,
  629. SSL_AES128CCM,
  630. SSL_AEAD,
  631. TLS1_2_VERSION, TLS1_2_VERSION,
  632. DTLS1_2_VERSION, DTLS1_2_VERSION,
  633. SSL_NOT_DEFAULT | SSL_HIGH,
  634. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  635. 128,
  636. 128,
  637. },
  638. {
  639. 1,
  640. TLS1_TXT_RSA_WITH_AES_256_CCM,
  641. TLS1_RFC_RSA_WITH_AES_256_CCM,
  642. TLS1_CK_RSA_WITH_AES_256_CCM,
  643. SSL_kRSA,
  644. SSL_aRSA,
  645. SSL_AES256CCM,
  646. SSL_AEAD,
  647. TLS1_2_VERSION, TLS1_2_VERSION,
  648. DTLS1_2_VERSION, DTLS1_2_VERSION,
  649. SSL_NOT_DEFAULT | SSL_HIGH,
  650. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  651. 256,
  652. 256,
  653. },
  654. {
  655. 1,
  656. TLS1_TXT_DHE_RSA_WITH_AES_128_CCM,
  657. TLS1_RFC_DHE_RSA_WITH_AES_128_CCM,
  658. TLS1_CK_DHE_RSA_WITH_AES_128_CCM,
  659. SSL_kDHE,
  660. SSL_aRSA,
  661. SSL_AES128CCM,
  662. SSL_AEAD,
  663. TLS1_2_VERSION, TLS1_2_VERSION,
  664. DTLS1_2_VERSION, DTLS1_2_VERSION,
  665. SSL_NOT_DEFAULT | SSL_HIGH,
  666. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  667. 128,
  668. 128,
  669. },
  670. {
  671. 1,
  672. TLS1_TXT_DHE_RSA_WITH_AES_256_CCM,
  673. TLS1_RFC_DHE_RSA_WITH_AES_256_CCM,
  674. TLS1_CK_DHE_RSA_WITH_AES_256_CCM,
  675. SSL_kDHE,
  676. SSL_aRSA,
  677. SSL_AES256CCM,
  678. SSL_AEAD,
  679. TLS1_2_VERSION, TLS1_2_VERSION,
  680. DTLS1_2_VERSION, DTLS1_2_VERSION,
  681. SSL_NOT_DEFAULT | SSL_HIGH,
  682. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  683. 256,
  684. 256,
  685. },
  686. {
  687. 1,
  688. TLS1_TXT_RSA_WITH_AES_128_CCM_8,
  689. TLS1_RFC_RSA_WITH_AES_128_CCM_8,
  690. TLS1_CK_RSA_WITH_AES_128_CCM_8,
  691. SSL_kRSA,
  692. SSL_aRSA,
  693. SSL_AES128CCM8,
  694. SSL_AEAD,
  695. TLS1_2_VERSION, TLS1_2_VERSION,
  696. DTLS1_2_VERSION, DTLS1_2_VERSION,
  697. SSL_NOT_DEFAULT | SSL_HIGH,
  698. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  699. 128,
  700. 128,
  701. },
  702. {
  703. 1,
  704. TLS1_TXT_RSA_WITH_AES_256_CCM_8,
  705. TLS1_RFC_RSA_WITH_AES_256_CCM_8,
  706. TLS1_CK_RSA_WITH_AES_256_CCM_8,
  707. SSL_kRSA,
  708. SSL_aRSA,
  709. SSL_AES256CCM8,
  710. SSL_AEAD,
  711. TLS1_2_VERSION, TLS1_2_VERSION,
  712. DTLS1_2_VERSION, DTLS1_2_VERSION,
  713. SSL_NOT_DEFAULT | SSL_HIGH,
  714. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  715. 256,
  716. 256,
  717. },
  718. {
  719. 1,
  720. TLS1_TXT_DHE_RSA_WITH_AES_128_CCM_8,
  721. TLS1_RFC_DHE_RSA_WITH_AES_128_CCM_8,
  722. TLS1_CK_DHE_RSA_WITH_AES_128_CCM_8,
  723. SSL_kDHE,
  724. SSL_aRSA,
  725. SSL_AES128CCM8,
  726. SSL_AEAD,
  727. TLS1_2_VERSION, TLS1_2_VERSION,
  728. DTLS1_2_VERSION, DTLS1_2_VERSION,
  729. SSL_NOT_DEFAULT | SSL_HIGH,
  730. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  731. 128,
  732. 128,
  733. },
  734. {
  735. 1,
  736. TLS1_TXT_DHE_RSA_WITH_AES_256_CCM_8,
  737. TLS1_RFC_DHE_RSA_WITH_AES_256_CCM_8,
  738. TLS1_CK_DHE_RSA_WITH_AES_256_CCM_8,
  739. SSL_kDHE,
  740. SSL_aRSA,
  741. SSL_AES256CCM8,
  742. SSL_AEAD,
  743. TLS1_2_VERSION, TLS1_2_VERSION,
  744. DTLS1_2_VERSION, DTLS1_2_VERSION,
  745. SSL_NOT_DEFAULT | SSL_HIGH,
  746. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  747. 256,
  748. 256,
  749. },
  750. {
  751. 1,
  752. TLS1_TXT_PSK_WITH_AES_128_CCM,
  753. TLS1_RFC_PSK_WITH_AES_128_CCM,
  754. TLS1_CK_PSK_WITH_AES_128_CCM,
  755. SSL_kPSK,
  756. SSL_aPSK,
  757. SSL_AES128CCM,
  758. SSL_AEAD,
  759. TLS1_2_VERSION, TLS1_2_VERSION,
  760. DTLS1_2_VERSION, DTLS1_2_VERSION,
  761. SSL_NOT_DEFAULT | SSL_HIGH,
  762. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  763. 128,
  764. 128,
  765. },
  766. {
  767. 1,
  768. TLS1_TXT_PSK_WITH_AES_256_CCM,
  769. TLS1_RFC_PSK_WITH_AES_256_CCM,
  770. TLS1_CK_PSK_WITH_AES_256_CCM,
  771. SSL_kPSK,
  772. SSL_aPSK,
  773. SSL_AES256CCM,
  774. SSL_AEAD,
  775. TLS1_2_VERSION, TLS1_2_VERSION,
  776. DTLS1_2_VERSION, DTLS1_2_VERSION,
  777. SSL_NOT_DEFAULT | SSL_HIGH,
  778. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  779. 256,
  780. 256,
  781. },
  782. {
  783. 1,
  784. TLS1_TXT_DHE_PSK_WITH_AES_128_CCM,
  785. TLS1_RFC_DHE_PSK_WITH_AES_128_CCM,
  786. TLS1_CK_DHE_PSK_WITH_AES_128_CCM,
  787. SSL_kDHEPSK,
  788. SSL_aPSK,
  789. SSL_AES128CCM,
  790. SSL_AEAD,
  791. TLS1_2_VERSION, TLS1_2_VERSION,
  792. DTLS1_2_VERSION, DTLS1_2_VERSION,
  793. SSL_NOT_DEFAULT | SSL_HIGH,
  794. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  795. 128,
  796. 128,
  797. },
  798. {
  799. 1,
  800. TLS1_TXT_DHE_PSK_WITH_AES_256_CCM,
  801. TLS1_RFC_DHE_PSK_WITH_AES_256_CCM,
  802. TLS1_CK_DHE_PSK_WITH_AES_256_CCM,
  803. SSL_kDHEPSK,
  804. SSL_aPSK,
  805. SSL_AES256CCM,
  806. SSL_AEAD,
  807. TLS1_2_VERSION, TLS1_2_VERSION,
  808. DTLS1_2_VERSION, DTLS1_2_VERSION,
  809. SSL_NOT_DEFAULT | SSL_HIGH,
  810. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  811. 256,
  812. 256,
  813. },
  814. {
  815. 1,
  816. TLS1_TXT_PSK_WITH_AES_128_CCM_8,
  817. TLS1_RFC_PSK_WITH_AES_128_CCM_8,
  818. TLS1_CK_PSK_WITH_AES_128_CCM_8,
  819. SSL_kPSK,
  820. SSL_aPSK,
  821. SSL_AES128CCM8,
  822. SSL_AEAD,
  823. TLS1_2_VERSION, TLS1_2_VERSION,
  824. DTLS1_2_VERSION, DTLS1_2_VERSION,
  825. SSL_NOT_DEFAULT | SSL_HIGH,
  826. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  827. 128,
  828. 128,
  829. },
  830. {
  831. 1,
  832. TLS1_TXT_PSK_WITH_AES_256_CCM_8,
  833. TLS1_RFC_PSK_WITH_AES_256_CCM_8,
  834. TLS1_CK_PSK_WITH_AES_256_CCM_8,
  835. SSL_kPSK,
  836. SSL_aPSK,
  837. SSL_AES256CCM8,
  838. SSL_AEAD,
  839. TLS1_2_VERSION, TLS1_2_VERSION,
  840. DTLS1_2_VERSION, DTLS1_2_VERSION,
  841. SSL_NOT_DEFAULT | SSL_HIGH,
  842. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  843. 256,
  844. 256,
  845. },
  846. {
  847. 1,
  848. TLS1_TXT_DHE_PSK_WITH_AES_128_CCM_8,
  849. TLS1_RFC_DHE_PSK_WITH_AES_128_CCM_8,
  850. TLS1_CK_DHE_PSK_WITH_AES_128_CCM_8,
  851. SSL_kDHEPSK,
  852. SSL_aPSK,
  853. SSL_AES128CCM8,
  854. SSL_AEAD,
  855. TLS1_2_VERSION, TLS1_2_VERSION,
  856. DTLS1_2_VERSION, DTLS1_2_VERSION,
  857. SSL_NOT_DEFAULT | SSL_HIGH,
  858. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  859. 128,
  860. 128,
  861. },
  862. {
  863. 1,
  864. TLS1_TXT_DHE_PSK_WITH_AES_256_CCM_8,
  865. TLS1_RFC_DHE_PSK_WITH_AES_256_CCM_8,
  866. TLS1_CK_DHE_PSK_WITH_AES_256_CCM_8,
  867. SSL_kDHEPSK,
  868. SSL_aPSK,
  869. SSL_AES256CCM8,
  870. SSL_AEAD,
  871. TLS1_2_VERSION, TLS1_2_VERSION,
  872. DTLS1_2_VERSION, DTLS1_2_VERSION,
  873. SSL_NOT_DEFAULT | SSL_HIGH,
  874. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  875. 256,
  876. 256,
  877. },
  878. {
  879. 1,
  880. TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM,
  881. TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM,
  882. TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM,
  883. SSL_kECDHE,
  884. SSL_aECDSA,
  885. SSL_AES128CCM,
  886. SSL_AEAD,
  887. TLS1_2_VERSION, TLS1_2_VERSION,
  888. DTLS1_2_VERSION, DTLS1_2_VERSION,
  889. SSL_NOT_DEFAULT | SSL_HIGH,
  890. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  891. 128,
  892. 128,
  893. },
  894. {
  895. 1,
  896. TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM,
  897. TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM,
  898. TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM,
  899. SSL_kECDHE,
  900. SSL_aECDSA,
  901. SSL_AES256CCM,
  902. SSL_AEAD,
  903. TLS1_2_VERSION, TLS1_2_VERSION,
  904. DTLS1_2_VERSION, DTLS1_2_VERSION,
  905. SSL_NOT_DEFAULT | SSL_HIGH,
  906. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  907. 256,
  908. 256,
  909. },
  910. {
  911. 1,
  912. TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM_8,
  913. TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM_8,
  914. TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM_8,
  915. SSL_kECDHE,
  916. SSL_aECDSA,
  917. SSL_AES128CCM8,
  918. SSL_AEAD,
  919. TLS1_2_VERSION, TLS1_2_VERSION,
  920. DTLS1_2_VERSION, DTLS1_2_VERSION,
  921. SSL_NOT_DEFAULT | SSL_HIGH,
  922. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  923. 128,
  924. 128,
  925. },
  926. {
  927. 1,
  928. TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8,
  929. TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM_8,
  930. TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM_8,
  931. SSL_kECDHE,
  932. SSL_aECDSA,
  933. SSL_AES256CCM8,
  934. SSL_AEAD,
  935. TLS1_2_VERSION, TLS1_2_VERSION,
  936. DTLS1_2_VERSION, DTLS1_2_VERSION,
  937. SSL_NOT_DEFAULT | SSL_HIGH,
  938. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  939. 256,
  940. 256,
  941. },
  942. {
  943. 1,
  944. TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA,
  945. TLS1_RFC_ECDHE_ECDSA_WITH_NULL_SHA,
  946. TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA,
  947. SSL_kECDHE,
  948. SSL_aECDSA,
  949. SSL_eNULL,
  950. SSL_SHA1,
  951. TLS1_VERSION, TLS1_2_VERSION,
  952. DTLS1_BAD_VER, DTLS1_2_VERSION,
  953. SSL_STRONG_NONE | SSL_FIPS,
  954. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  955. 0,
  956. 0,
  957. },
  958. # ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  959. {
  960. 1,
  961. TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA,
  962. TLS1_RFC_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA,
  963. TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA,
  964. SSL_kECDHE,
  965. SSL_aECDSA,
  966. SSL_3DES,
  967. SSL_SHA1,
  968. TLS1_VERSION, TLS1_2_VERSION,
  969. DTLS1_BAD_VER, DTLS1_2_VERSION,
  970. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  971. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  972. 112,
  973. 168,
  974. },
  975. # endif
  976. {
  977. 1,
  978. TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
  979. TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
  980. TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
  981. SSL_kECDHE,
  982. SSL_aECDSA,
  983. SSL_AES128,
  984. SSL_SHA1,
  985. TLS1_VERSION, TLS1_2_VERSION,
  986. DTLS1_BAD_VER, DTLS1_2_VERSION,
  987. SSL_HIGH | SSL_FIPS,
  988. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  989. 128,
  990. 128,
  991. },
  992. {
  993. 1,
  994. TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
  995. TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
  996. TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
  997. SSL_kECDHE,
  998. SSL_aECDSA,
  999. SSL_AES256,
  1000. SSL_SHA1,
  1001. TLS1_VERSION, TLS1_2_VERSION,
  1002. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1003. SSL_HIGH | SSL_FIPS,
  1004. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1005. 256,
  1006. 256,
  1007. },
  1008. {
  1009. 1,
  1010. TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA,
  1011. TLS1_RFC_ECDHE_RSA_WITH_NULL_SHA,
  1012. TLS1_CK_ECDHE_RSA_WITH_NULL_SHA,
  1013. SSL_kECDHE,
  1014. SSL_aRSA,
  1015. SSL_eNULL,
  1016. SSL_SHA1,
  1017. TLS1_VERSION, TLS1_2_VERSION,
  1018. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1019. SSL_STRONG_NONE | SSL_FIPS,
  1020. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1021. 0,
  1022. 0,
  1023. },
  1024. # ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  1025. {
  1026. 1,
  1027. TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA,
  1028. TLS1_RFC_ECDHE_RSA_WITH_DES_192_CBC3_SHA,
  1029. TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA,
  1030. SSL_kECDHE,
  1031. SSL_aRSA,
  1032. SSL_3DES,
  1033. SSL_SHA1,
  1034. TLS1_VERSION, TLS1_2_VERSION,
  1035. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1036. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  1037. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1038. 112,
  1039. 168,
  1040. },
  1041. # endif
  1042. {
  1043. 1,
  1044. TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA,
  1045. TLS1_RFC_ECDHE_RSA_WITH_AES_128_CBC_SHA,
  1046. TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA,
  1047. SSL_kECDHE,
  1048. SSL_aRSA,
  1049. SSL_AES128,
  1050. SSL_SHA1,
  1051. TLS1_VERSION, TLS1_2_VERSION,
  1052. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1053. SSL_HIGH | SSL_FIPS,
  1054. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1055. 128,
  1056. 128,
  1057. },
  1058. {
  1059. 1,
  1060. TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA,
  1061. TLS1_RFC_ECDHE_RSA_WITH_AES_256_CBC_SHA,
  1062. TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA,
  1063. SSL_kECDHE,
  1064. SSL_aRSA,
  1065. SSL_AES256,
  1066. SSL_SHA1,
  1067. TLS1_VERSION, TLS1_2_VERSION,
  1068. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1069. SSL_HIGH | SSL_FIPS,
  1070. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1071. 256,
  1072. 256,
  1073. },
  1074. {
  1075. 1,
  1076. TLS1_TXT_ECDH_anon_WITH_NULL_SHA,
  1077. TLS1_RFC_ECDH_anon_WITH_NULL_SHA,
  1078. TLS1_CK_ECDH_anon_WITH_NULL_SHA,
  1079. SSL_kECDHE,
  1080. SSL_aNULL,
  1081. SSL_eNULL,
  1082. SSL_SHA1,
  1083. TLS1_VERSION, TLS1_2_VERSION,
  1084. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1085. SSL_STRONG_NONE | SSL_FIPS,
  1086. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1087. 0,
  1088. 0,
  1089. },
  1090. # ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  1091. {
  1092. 1,
  1093. TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA,
  1094. TLS1_RFC_ECDH_anon_WITH_DES_192_CBC3_SHA,
  1095. TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA,
  1096. SSL_kECDHE,
  1097. SSL_aNULL,
  1098. SSL_3DES,
  1099. SSL_SHA1,
  1100. TLS1_VERSION, TLS1_2_VERSION,
  1101. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1102. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  1103. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1104. 112,
  1105. 168,
  1106. },
  1107. # endif
  1108. {
  1109. 1,
  1110. TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA,
  1111. TLS1_RFC_ECDH_anon_WITH_AES_128_CBC_SHA,
  1112. TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA,
  1113. SSL_kECDHE,
  1114. SSL_aNULL,
  1115. SSL_AES128,
  1116. SSL_SHA1,
  1117. TLS1_VERSION, TLS1_2_VERSION,
  1118. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1119. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  1120. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1121. 128,
  1122. 128,
  1123. },
  1124. {
  1125. 1,
  1126. TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA,
  1127. TLS1_RFC_ECDH_anon_WITH_AES_256_CBC_SHA,
  1128. TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA,
  1129. SSL_kECDHE,
  1130. SSL_aNULL,
  1131. SSL_AES256,
  1132. SSL_SHA1,
  1133. TLS1_VERSION, TLS1_2_VERSION,
  1134. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1135. SSL_NOT_DEFAULT | SSL_HIGH | SSL_FIPS,
  1136. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1137. 256,
  1138. 256,
  1139. },
  1140. {
  1141. 1,
  1142. TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256,
  1143. TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_SHA256,
  1144. TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256,
  1145. SSL_kECDHE,
  1146. SSL_aECDSA,
  1147. SSL_AES128,
  1148. SSL_SHA256,
  1149. TLS1_2_VERSION, TLS1_2_VERSION,
  1150. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1151. SSL_HIGH | SSL_FIPS,
  1152. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  1153. 128,
  1154. 128,
  1155. },
  1156. {
  1157. 1,
  1158. TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384,
  1159. TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_SHA384,
  1160. TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384,
  1161. SSL_kECDHE,
  1162. SSL_aECDSA,
  1163. SSL_AES256,
  1164. SSL_SHA384,
  1165. TLS1_2_VERSION, TLS1_2_VERSION,
  1166. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1167. SSL_HIGH | SSL_FIPS,
  1168. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1169. 256,
  1170. 256,
  1171. },
  1172. {
  1173. 1,
  1174. TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256,
  1175. TLS1_RFC_ECDHE_RSA_WITH_AES_128_SHA256,
  1176. TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256,
  1177. SSL_kECDHE,
  1178. SSL_aRSA,
  1179. SSL_AES128,
  1180. SSL_SHA256,
  1181. TLS1_2_VERSION, TLS1_2_VERSION,
  1182. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1183. SSL_HIGH | SSL_FIPS,
  1184. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  1185. 128,
  1186. 128,
  1187. },
  1188. {
  1189. 1,
  1190. TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384,
  1191. TLS1_RFC_ECDHE_RSA_WITH_AES_256_SHA384,
  1192. TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384,
  1193. SSL_kECDHE,
  1194. SSL_aRSA,
  1195. SSL_AES256,
  1196. SSL_SHA384,
  1197. TLS1_2_VERSION, TLS1_2_VERSION,
  1198. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1199. SSL_HIGH | SSL_FIPS,
  1200. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1201. 256,
  1202. 256,
  1203. },
  1204. {
  1205. 1,
  1206. TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
  1207. TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
  1208. TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
  1209. SSL_kECDHE,
  1210. SSL_aECDSA,
  1211. SSL_AES128GCM,
  1212. SSL_AEAD,
  1213. TLS1_2_VERSION, TLS1_2_VERSION,
  1214. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1215. SSL_HIGH | SSL_FIPS,
  1216. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  1217. 128,
  1218. 128,
  1219. },
  1220. {
  1221. 1,
  1222. TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
  1223. TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
  1224. TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
  1225. SSL_kECDHE,
  1226. SSL_aECDSA,
  1227. SSL_AES256GCM,
  1228. SSL_AEAD,
  1229. TLS1_2_VERSION, TLS1_2_VERSION,
  1230. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1231. SSL_HIGH | SSL_FIPS,
  1232. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1233. 256,
  1234. 256,
  1235. },
  1236. {
  1237. 1,
  1238. TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
  1239. TLS1_RFC_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
  1240. TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
  1241. SSL_kECDHE,
  1242. SSL_aRSA,
  1243. SSL_AES128GCM,
  1244. SSL_AEAD,
  1245. TLS1_2_VERSION, TLS1_2_VERSION,
  1246. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1247. SSL_HIGH | SSL_FIPS,
  1248. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  1249. 128,
  1250. 128,
  1251. },
  1252. {
  1253. 1,
  1254. TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
  1255. TLS1_RFC_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
  1256. TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
  1257. SSL_kECDHE,
  1258. SSL_aRSA,
  1259. SSL_AES256GCM,
  1260. SSL_AEAD,
  1261. TLS1_2_VERSION, TLS1_2_VERSION,
  1262. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1263. SSL_HIGH | SSL_FIPS,
  1264. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1265. 256,
  1266. 256,
  1267. },
  1268. {
  1269. 1,
  1270. TLS1_TXT_PSK_WITH_NULL_SHA,
  1271. TLS1_RFC_PSK_WITH_NULL_SHA,
  1272. TLS1_CK_PSK_WITH_NULL_SHA,
  1273. SSL_kPSK,
  1274. SSL_aPSK,
  1275. SSL_eNULL,
  1276. SSL_SHA1,
  1277. SSL3_VERSION, TLS1_2_VERSION,
  1278. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1279. SSL_STRONG_NONE | SSL_FIPS,
  1280. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1281. 0,
  1282. 0,
  1283. },
  1284. {
  1285. 1,
  1286. TLS1_TXT_DHE_PSK_WITH_NULL_SHA,
  1287. TLS1_RFC_DHE_PSK_WITH_NULL_SHA,
  1288. TLS1_CK_DHE_PSK_WITH_NULL_SHA,
  1289. SSL_kDHEPSK,
  1290. SSL_aPSK,
  1291. SSL_eNULL,
  1292. SSL_SHA1,
  1293. SSL3_VERSION, TLS1_2_VERSION,
  1294. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1295. SSL_STRONG_NONE | SSL_FIPS,
  1296. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1297. 0,
  1298. 0,
  1299. },
  1300. {
  1301. 1,
  1302. TLS1_TXT_RSA_PSK_WITH_NULL_SHA,
  1303. TLS1_RFC_RSA_PSK_WITH_NULL_SHA,
  1304. TLS1_CK_RSA_PSK_WITH_NULL_SHA,
  1305. SSL_kRSAPSK,
  1306. SSL_aRSA,
  1307. SSL_eNULL,
  1308. SSL_SHA1,
  1309. SSL3_VERSION, TLS1_2_VERSION,
  1310. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1311. SSL_STRONG_NONE | SSL_FIPS,
  1312. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1313. 0,
  1314. 0,
  1315. },
  1316. # ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  1317. {
  1318. 1,
  1319. TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA,
  1320. TLS1_RFC_PSK_WITH_3DES_EDE_CBC_SHA,
  1321. TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA,
  1322. SSL_kPSK,
  1323. SSL_aPSK,
  1324. SSL_3DES,
  1325. SSL_SHA1,
  1326. SSL3_VERSION, TLS1_2_VERSION,
  1327. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1328. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  1329. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1330. 112,
  1331. 168,
  1332. },
  1333. # endif
  1334. {
  1335. 1,
  1336. TLS1_TXT_PSK_WITH_AES_128_CBC_SHA,
  1337. TLS1_RFC_PSK_WITH_AES_128_CBC_SHA,
  1338. TLS1_CK_PSK_WITH_AES_128_CBC_SHA,
  1339. SSL_kPSK,
  1340. SSL_aPSK,
  1341. SSL_AES128,
  1342. SSL_SHA1,
  1343. SSL3_VERSION, TLS1_2_VERSION,
  1344. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1345. SSL_HIGH | SSL_FIPS,
  1346. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1347. 128,
  1348. 128,
  1349. },
  1350. {
  1351. 1,
  1352. TLS1_TXT_PSK_WITH_AES_256_CBC_SHA,
  1353. TLS1_RFC_PSK_WITH_AES_256_CBC_SHA,
  1354. TLS1_CK_PSK_WITH_AES_256_CBC_SHA,
  1355. SSL_kPSK,
  1356. SSL_aPSK,
  1357. SSL_AES256,
  1358. SSL_SHA1,
  1359. SSL3_VERSION, TLS1_2_VERSION,
  1360. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1361. SSL_HIGH | SSL_FIPS,
  1362. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1363. 256,
  1364. 256,
  1365. },
  1366. # ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  1367. {
  1368. 1,
  1369. TLS1_TXT_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
  1370. TLS1_RFC_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
  1371. TLS1_CK_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
  1372. SSL_kDHEPSK,
  1373. SSL_aPSK,
  1374. SSL_3DES,
  1375. SSL_SHA1,
  1376. SSL3_VERSION, TLS1_2_VERSION,
  1377. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1378. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  1379. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1380. 112,
  1381. 168,
  1382. },
  1383. # endif
  1384. {
  1385. 1,
  1386. TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA,
  1387. TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA,
  1388. TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA,
  1389. SSL_kDHEPSK,
  1390. SSL_aPSK,
  1391. SSL_AES128,
  1392. SSL_SHA1,
  1393. SSL3_VERSION, TLS1_2_VERSION,
  1394. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1395. SSL_HIGH | SSL_FIPS,
  1396. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1397. 128,
  1398. 128,
  1399. },
  1400. {
  1401. 1,
  1402. TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA,
  1403. TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA,
  1404. TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA,
  1405. SSL_kDHEPSK,
  1406. SSL_aPSK,
  1407. SSL_AES256,
  1408. SSL_SHA1,
  1409. SSL3_VERSION, TLS1_2_VERSION,
  1410. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1411. SSL_HIGH | SSL_FIPS,
  1412. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1413. 256,
  1414. 256,
  1415. },
  1416. # ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  1417. {
  1418. 1,
  1419. TLS1_TXT_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
  1420. TLS1_RFC_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
  1421. TLS1_CK_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
  1422. SSL_kRSAPSK,
  1423. SSL_aRSA,
  1424. SSL_3DES,
  1425. SSL_SHA1,
  1426. SSL3_VERSION, TLS1_2_VERSION,
  1427. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1428. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  1429. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1430. 112,
  1431. 168,
  1432. },
  1433. # endif
  1434. {
  1435. 1,
  1436. TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA,
  1437. TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA,
  1438. TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA,
  1439. SSL_kRSAPSK,
  1440. SSL_aRSA,
  1441. SSL_AES128,
  1442. SSL_SHA1,
  1443. SSL3_VERSION, TLS1_2_VERSION,
  1444. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1445. SSL_HIGH | SSL_FIPS,
  1446. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1447. 128,
  1448. 128,
  1449. },
  1450. {
  1451. 1,
  1452. TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA,
  1453. TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA,
  1454. TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA,
  1455. SSL_kRSAPSK,
  1456. SSL_aRSA,
  1457. SSL_AES256,
  1458. SSL_SHA1,
  1459. SSL3_VERSION, TLS1_2_VERSION,
  1460. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1461. SSL_HIGH | SSL_FIPS,
  1462. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1463. 256,
  1464. 256,
  1465. },
  1466. {
  1467. 1,
  1468. TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256,
  1469. TLS1_RFC_PSK_WITH_AES_128_GCM_SHA256,
  1470. TLS1_CK_PSK_WITH_AES_128_GCM_SHA256,
  1471. SSL_kPSK,
  1472. SSL_aPSK,
  1473. SSL_AES128GCM,
  1474. SSL_AEAD,
  1475. TLS1_2_VERSION, TLS1_2_VERSION,
  1476. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1477. SSL_HIGH | SSL_FIPS,
  1478. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  1479. 128,
  1480. 128,
  1481. },
  1482. {
  1483. 1,
  1484. TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384,
  1485. TLS1_RFC_PSK_WITH_AES_256_GCM_SHA384,
  1486. TLS1_CK_PSK_WITH_AES_256_GCM_SHA384,
  1487. SSL_kPSK,
  1488. SSL_aPSK,
  1489. SSL_AES256GCM,
  1490. SSL_AEAD,
  1491. TLS1_2_VERSION, TLS1_2_VERSION,
  1492. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1493. SSL_HIGH | SSL_FIPS,
  1494. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1495. 256,
  1496. 256,
  1497. },
  1498. {
  1499. 1,
  1500. TLS1_TXT_DHE_PSK_WITH_AES_128_GCM_SHA256,
  1501. TLS1_RFC_DHE_PSK_WITH_AES_128_GCM_SHA256,
  1502. TLS1_CK_DHE_PSK_WITH_AES_128_GCM_SHA256,
  1503. SSL_kDHEPSK,
  1504. SSL_aPSK,
  1505. SSL_AES128GCM,
  1506. SSL_AEAD,
  1507. TLS1_2_VERSION, TLS1_2_VERSION,
  1508. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1509. SSL_HIGH | SSL_FIPS,
  1510. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  1511. 128,
  1512. 128,
  1513. },
  1514. {
  1515. 1,
  1516. TLS1_TXT_DHE_PSK_WITH_AES_256_GCM_SHA384,
  1517. TLS1_RFC_DHE_PSK_WITH_AES_256_GCM_SHA384,
  1518. TLS1_CK_DHE_PSK_WITH_AES_256_GCM_SHA384,
  1519. SSL_kDHEPSK,
  1520. SSL_aPSK,
  1521. SSL_AES256GCM,
  1522. SSL_AEAD,
  1523. TLS1_2_VERSION, TLS1_2_VERSION,
  1524. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1525. SSL_HIGH | SSL_FIPS,
  1526. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1527. 256,
  1528. 256,
  1529. },
  1530. {
  1531. 1,
  1532. TLS1_TXT_RSA_PSK_WITH_AES_128_GCM_SHA256,
  1533. TLS1_RFC_RSA_PSK_WITH_AES_128_GCM_SHA256,
  1534. TLS1_CK_RSA_PSK_WITH_AES_128_GCM_SHA256,
  1535. SSL_kRSAPSK,
  1536. SSL_aRSA,
  1537. SSL_AES128GCM,
  1538. SSL_AEAD,
  1539. TLS1_2_VERSION, TLS1_2_VERSION,
  1540. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1541. SSL_HIGH | SSL_FIPS,
  1542. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  1543. 128,
  1544. 128,
  1545. },
  1546. {
  1547. 1,
  1548. TLS1_TXT_RSA_PSK_WITH_AES_256_GCM_SHA384,
  1549. TLS1_RFC_RSA_PSK_WITH_AES_256_GCM_SHA384,
  1550. TLS1_CK_RSA_PSK_WITH_AES_256_GCM_SHA384,
  1551. SSL_kRSAPSK,
  1552. SSL_aRSA,
  1553. SSL_AES256GCM,
  1554. SSL_AEAD,
  1555. TLS1_2_VERSION, TLS1_2_VERSION,
  1556. DTLS1_2_VERSION, DTLS1_2_VERSION,
  1557. SSL_HIGH | SSL_FIPS,
  1558. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1559. 256,
  1560. 256,
  1561. },
  1562. {
  1563. 1,
  1564. TLS1_TXT_PSK_WITH_AES_128_CBC_SHA256,
  1565. TLS1_RFC_PSK_WITH_AES_128_CBC_SHA256,
  1566. TLS1_CK_PSK_WITH_AES_128_CBC_SHA256,
  1567. SSL_kPSK,
  1568. SSL_aPSK,
  1569. SSL_AES128,
  1570. SSL_SHA256,
  1571. TLS1_VERSION, TLS1_2_VERSION,
  1572. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1573. SSL_HIGH | SSL_FIPS,
  1574. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1575. 128,
  1576. 128,
  1577. },
  1578. {
  1579. 1,
  1580. TLS1_TXT_PSK_WITH_AES_256_CBC_SHA384,
  1581. TLS1_RFC_PSK_WITH_AES_256_CBC_SHA384,
  1582. TLS1_CK_PSK_WITH_AES_256_CBC_SHA384,
  1583. SSL_kPSK,
  1584. SSL_aPSK,
  1585. SSL_AES256,
  1586. SSL_SHA384,
  1587. TLS1_VERSION, TLS1_2_VERSION,
  1588. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1589. SSL_HIGH | SSL_FIPS,
  1590. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1591. 256,
  1592. 256,
  1593. },
  1594. {
  1595. 1,
  1596. TLS1_TXT_PSK_WITH_NULL_SHA256,
  1597. TLS1_RFC_PSK_WITH_NULL_SHA256,
  1598. TLS1_CK_PSK_WITH_NULL_SHA256,
  1599. SSL_kPSK,
  1600. SSL_aPSK,
  1601. SSL_eNULL,
  1602. SSL_SHA256,
  1603. TLS1_VERSION, TLS1_2_VERSION,
  1604. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1605. SSL_STRONG_NONE | SSL_FIPS,
  1606. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1607. 0,
  1608. 0,
  1609. },
  1610. {
  1611. 1,
  1612. TLS1_TXT_PSK_WITH_NULL_SHA384,
  1613. TLS1_RFC_PSK_WITH_NULL_SHA384,
  1614. TLS1_CK_PSK_WITH_NULL_SHA384,
  1615. SSL_kPSK,
  1616. SSL_aPSK,
  1617. SSL_eNULL,
  1618. SSL_SHA384,
  1619. TLS1_VERSION, TLS1_2_VERSION,
  1620. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1621. SSL_STRONG_NONE | SSL_FIPS,
  1622. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1623. 0,
  1624. 0,
  1625. },
  1626. {
  1627. 1,
  1628. TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA256,
  1629. TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA256,
  1630. TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA256,
  1631. SSL_kDHEPSK,
  1632. SSL_aPSK,
  1633. SSL_AES128,
  1634. SSL_SHA256,
  1635. TLS1_VERSION, TLS1_2_VERSION,
  1636. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1637. SSL_HIGH | SSL_FIPS,
  1638. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1639. 128,
  1640. 128,
  1641. },
  1642. {
  1643. 1,
  1644. TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA384,
  1645. TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA384,
  1646. TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA384,
  1647. SSL_kDHEPSK,
  1648. SSL_aPSK,
  1649. SSL_AES256,
  1650. SSL_SHA384,
  1651. TLS1_VERSION, TLS1_2_VERSION,
  1652. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1653. SSL_HIGH | SSL_FIPS,
  1654. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1655. 256,
  1656. 256,
  1657. },
  1658. {
  1659. 1,
  1660. TLS1_TXT_DHE_PSK_WITH_NULL_SHA256,
  1661. TLS1_RFC_DHE_PSK_WITH_NULL_SHA256,
  1662. TLS1_CK_DHE_PSK_WITH_NULL_SHA256,
  1663. SSL_kDHEPSK,
  1664. SSL_aPSK,
  1665. SSL_eNULL,
  1666. SSL_SHA256,
  1667. TLS1_VERSION, TLS1_2_VERSION,
  1668. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1669. SSL_STRONG_NONE | SSL_FIPS,
  1670. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1671. 0,
  1672. 0,
  1673. },
  1674. {
  1675. 1,
  1676. TLS1_TXT_DHE_PSK_WITH_NULL_SHA384,
  1677. TLS1_RFC_DHE_PSK_WITH_NULL_SHA384,
  1678. TLS1_CK_DHE_PSK_WITH_NULL_SHA384,
  1679. SSL_kDHEPSK,
  1680. SSL_aPSK,
  1681. SSL_eNULL,
  1682. SSL_SHA384,
  1683. TLS1_VERSION, TLS1_2_VERSION,
  1684. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1685. SSL_STRONG_NONE | SSL_FIPS,
  1686. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1687. 0,
  1688. 0,
  1689. },
  1690. {
  1691. 1,
  1692. TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA256,
  1693. TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA256,
  1694. TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA256,
  1695. SSL_kRSAPSK,
  1696. SSL_aRSA,
  1697. SSL_AES128,
  1698. SSL_SHA256,
  1699. TLS1_VERSION, TLS1_2_VERSION,
  1700. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1701. SSL_HIGH | SSL_FIPS,
  1702. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1703. 128,
  1704. 128,
  1705. },
  1706. {
  1707. 1,
  1708. TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA384,
  1709. TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA384,
  1710. TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA384,
  1711. SSL_kRSAPSK,
  1712. SSL_aRSA,
  1713. SSL_AES256,
  1714. SSL_SHA384,
  1715. TLS1_VERSION, TLS1_2_VERSION,
  1716. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1717. SSL_HIGH | SSL_FIPS,
  1718. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1719. 256,
  1720. 256,
  1721. },
  1722. {
  1723. 1,
  1724. TLS1_TXT_RSA_PSK_WITH_NULL_SHA256,
  1725. TLS1_RFC_RSA_PSK_WITH_NULL_SHA256,
  1726. TLS1_CK_RSA_PSK_WITH_NULL_SHA256,
  1727. SSL_kRSAPSK,
  1728. SSL_aRSA,
  1729. SSL_eNULL,
  1730. SSL_SHA256,
  1731. TLS1_VERSION, TLS1_2_VERSION,
  1732. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1733. SSL_STRONG_NONE | SSL_FIPS,
  1734. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1735. 0,
  1736. 0,
  1737. },
  1738. {
  1739. 1,
  1740. TLS1_TXT_RSA_PSK_WITH_NULL_SHA384,
  1741. TLS1_RFC_RSA_PSK_WITH_NULL_SHA384,
  1742. TLS1_CK_RSA_PSK_WITH_NULL_SHA384,
  1743. SSL_kRSAPSK,
  1744. SSL_aRSA,
  1745. SSL_eNULL,
  1746. SSL_SHA384,
  1747. TLS1_VERSION, TLS1_2_VERSION,
  1748. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1749. SSL_STRONG_NONE | SSL_FIPS,
  1750. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1751. 0,
  1752. 0,
  1753. },
  1754. # ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  1755. {
  1756. 1,
  1757. TLS1_TXT_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
  1758. TLS1_RFC_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
  1759. TLS1_CK_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
  1760. SSL_kECDHEPSK,
  1761. SSL_aPSK,
  1762. SSL_3DES,
  1763. SSL_SHA1,
  1764. TLS1_VERSION, TLS1_2_VERSION,
  1765. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1766. SSL_NOT_DEFAULT | SSL_MEDIUM | SSL_FIPS,
  1767. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1768. 112,
  1769. 168,
  1770. },
  1771. # endif
  1772. {
  1773. 1,
  1774. TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA,
  1775. TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA,
  1776. TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA,
  1777. SSL_kECDHEPSK,
  1778. SSL_aPSK,
  1779. SSL_AES128,
  1780. SSL_SHA1,
  1781. TLS1_VERSION, TLS1_2_VERSION,
  1782. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1783. SSL_HIGH | SSL_FIPS,
  1784. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1785. 128,
  1786. 128,
  1787. },
  1788. {
  1789. 1,
  1790. TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA,
  1791. TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA,
  1792. TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA,
  1793. SSL_kECDHEPSK,
  1794. SSL_aPSK,
  1795. SSL_AES256,
  1796. SSL_SHA1,
  1797. TLS1_VERSION, TLS1_2_VERSION,
  1798. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1799. SSL_HIGH | SSL_FIPS,
  1800. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1801. 256,
  1802. 256,
  1803. },
  1804. {
  1805. 1,
  1806. TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
  1807. TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
  1808. TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
  1809. SSL_kECDHEPSK,
  1810. SSL_aPSK,
  1811. SSL_AES128,
  1812. SSL_SHA256,
  1813. TLS1_VERSION, TLS1_2_VERSION,
  1814. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1815. SSL_HIGH | SSL_FIPS,
  1816. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1817. 128,
  1818. 128,
  1819. },
  1820. {
  1821. 1,
  1822. TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
  1823. TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
  1824. TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
  1825. SSL_kECDHEPSK,
  1826. SSL_aPSK,
  1827. SSL_AES256,
  1828. SSL_SHA384,
  1829. TLS1_VERSION, TLS1_2_VERSION,
  1830. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1831. SSL_HIGH | SSL_FIPS,
  1832. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1833. 256,
  1834. 256,
  1835. },
  1836. {
  1837. 1,
  1838. TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA,
  1839. TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA,
  1840. TLS1_CK_ECDHE_PSK_WITH_NULL_SHA,
  1841. SSL_kECDHEPSK,
  1842. SSL_aPSK,
  1843. SSL_eNULL,
  1844. SSL_SHA1,
  1845. TLS1_VERSION, TLS1_2_VERSION,
  1846. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1847. SSL_STRONG_NONE | SSL_FIPS,
  1848. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1849. 0,
  1850. 0,
  1851. },
  1852. {
  1853. 1,
  1854. TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA256,
  1855. TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA256,
  1856. TLS1_CK_ECDHE_PSK_WITH_NULL_SHA256,
  1857. SSL_kECDHEPSK,
  1858. SSL_aPSK,
  1859. SSL_eNULL,
  1860. SSL_SHA256,
  1861. TLS1_VERSION, TLS1_2_VERSION,
  1862. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1863. SSL_STRONG_NONE | SSL_FIPS,
  1864. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1865. 0,
  1866. 0,
  1867. },
  1868. {
  1869. 1,
  1870. TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA384,
  1871. TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA384,
  1872. TLS1_CK_ECDHE_PSK_WITH_NULL_SHA384,
  1873. SSL_kECDHEPSK,
  1874. SSL_aPSK,
  1875. SSL_eNULL,
  1876. SSL_SHA384,
  1877. TLS1_VERSION, TLS1_2_VERSION,
  1878. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1879. SSL_STRONG_NONE | SSL_FIPS,
  1880. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  1881. 0,
  1882. 0,
  1883. },
  1884. # ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  1885. {
  1886. 1,
  1887. TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA,
  1888. TLS1_RFC_SRP_SHA_WITH_3DES_EDE_CBC_SHA,
  1889. TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA,
  1890. SSL_kSRP,
  1891. SSL_aSRP,
  1892. SSL_3DES,
  1893. SSL_SHA1,
  1894. SSL3_VERSION, TLS1_2_VERSION,
  1895. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1896. SSL_NOT_DEFAULT | SSL_MEDIUM,
  1897. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1898. 112,
  1899. 168,
  1900. },
  1901. {
  1902. 1,
  1903. TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA,
  1904. TLS1_RFC_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA,
  1905. TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA,
  1906. SSL_kSRP,
  1907. SSL_aRSA,
  1908. SSL_3DES,
  1909. SSL_SHA1,
  1910. SSL3_VERSION, TLS1_2_VERSION,
  1911. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1912. SSL_NOT_DEFAULT | SSL_MEDIUM,
  1913. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1914. 112,
  1915. 168,
  1916. },
  1917. {
  1918. 1,
  1919. TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA,
  1920. TLS1_RFC_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA,
  1921. TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA,
  1922. SSL_kSRP,
  1923. SSL_aDSS,
  1924. SSL_3DES,
  1925. SSL_SHA1,
  1926. SSL3_VERSION, TLS1_2_VERSION,
  1927. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1928. SSL_NOT_DEFAULT | SSL_MEDIUM,
  1929. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1930. 112,
  1931. 168,
  1932. },
  1933. # endif
  1934. {
  1935. 1,
  1936. TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA,
  1937. TLS1_RFC_SRP_SHA_WITH_AES_128_CBC_SHA,
  1938. TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA,
  1939. SSL_kSRP,
  1940. SSL_aSRP,
  1941. SSL_AES128,
  1942. SSL_SHA1,
  1943. SSL3_VERSION, TLS1_2_VERSION,
  1944. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1945. SSL_HIGH,
  1946. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1947. 128,
  1948. 128,
  1949. },
  1950. {
  1951. 1,
  1952. TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA,
  1953. TLS1_RFC_SRP_SHA_RSA_WITH_AES_128_CBC_SHA,
  1954. TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA,
  1955. SSL_kSRP,
  1956. SSL_aRSA,
  1957. SSL_AES128,
  1958. SSL_SHA1,
  1959. SSL3_VERSION, TLS1_2_VERSION,
  1960. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1961. SSL_HIGH,
  1962. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1963. 128,
  1964. 128,
  1965. },
  1966. {
  1967. 1,
  1968. TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA,
  1969. TLS1_RFC_SRP_SHA_DSS_WITH_AES_128_CBC_SHA,
  1970. TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA,
  1971. SSL_kSRP,
  1972. SSL_aDSS,
  1973. SSL_AES128,
  1974. SSL_SHA1,
  1975. SSL3_VERSION, TLS1_2_VERSION,
  1976. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1977. SSL_NOT_DEFAULT | SSL_HIGH,
  1978. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1979. 128,
  1980. 128,
  1981. },
  1982. {
  1983. 1,
  1984. TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA,
  1985. TLS1_RFC_SRP_SHA_WITH_AES_256_CBC_SHA,
  1986. TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA,
  1987. SSL_kSRP,
  1988. SSL_aSRP,
  1989. SSL_AES256,
  1990. SSL_SHA1,
  1991. SSL3_VERSION, TLS1_2_VERSION,
  1992. DTLS1_BAD_VER, DTLS1_2_VERSION,
  1993. SSL_HIGH,
  1994. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  1995. 256,
  1996. 256,
  1997. },
  1998. {
  1999. 1,
  2000. TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,
  2001. TLS1_RFC_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,
  2002. TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,
  2003. SSL_kSRP,
  2004. SSL_aRSA,
  2005. SSL_AES256,
  2006. SSL_SHA1,
  2007. SSL3_VERSION, TLS1_2_VERSION,
  2008. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2009. SSL_HIGH,
  2010. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2011. 256,
  2012. 256,
  2013. },
  2014. {
  2015. 1,
  2016. TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA,
  2017. TLS1_RFC_SRP_SHA_DSS_WITH_AES_256_CBC_SHA,
  2018. TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA,
  2019. SSL_kSRP,
  2020. SSL_aDSS,
  2021. SSL_AES256,
  2022. SSL_SHA1,
  2023. SSL3_VERSION, TLS1_2_VERSION,
  2024. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2025. SSL_NOT_DEFAULT | SSL_HIGH,
  2026. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2027. 256,
  2028. 256,
  2029. },
  2030. #if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
  2031. {
  2032. 1,
  2033. TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305,
  2034. TLS1_RFC_DHE_RSA_WITH_CHACHA20_POLY1305,
  2035. TLS1_CK_DHE_RSA_WITH_CHACHA20_POLY1305,
  2036. SSL_kDHE,
  2037. SSL_aRSA,
  2038. SSL_CHACHA20POLY1305,
  2039. SSL_AEAD,
  2040. TLS1_2_VERSION, TLS1_2_VERSION,
  2041. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2042. SSL_HIGH,
  2043. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2044. 256,
  2045. 256,
  2046. },
  2047. {
  2048. 1,
  2049. TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305,
  2050. TLS1_RFC_ECDHE_RSA_WITH_CHACHA20_POLY1305,
  2051. TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305,
  2052. SSL_kECDHE,
  2053. SSL_aRSA,
  2054. SSL_CHACHA20POLY1305,
  2055. SSL_AEAD,
  2056. TLS1_2_VERSION, TLS1_2_VERSION,
  2057. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2058. SSL_HIGH,
  2059. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2060. 256,
  2061. 256,
  2062. },
  2063. {
  2064. 1,
  2065. TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
  2066. TLS1_RFC_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
  2067. TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
  2068. SSL_kECDHE,
  2069. SSL_aECDSA,
  2070. SSL_CHACHA20POLY1305,
  2071. SSL_AEAD,
  2072. TLS1_2_VERSION, TLS1_2_VERSION,
  2073. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2074. SSL_HIGH,
  2075. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2076. 256,
  2077. 256,
  2078. },
  2079. {
  2080. 1,
  2081. TLS1_TXT_PSK_WITH_CHACHA20_POLY1305,
  2082. TLS1_RFC_PSK_WITH_CHACHA20_POLY1305,
  2083. TLS1_CK_PSK_WITH_CHACHA20_POLY1305,
  2084. SSL_kPSK,
  2085. SSL_aPSK,
  2086. SSL_CHACHA20POLY1305,
  2087. SSL_AEAD,
  2088. TLS1_2_VERSION, TLS1_2_VERSION,
  2089. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2090. SSL_HIGH,
  2091. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2092. 256,
  2093. 256,
  2094. },
  2095. {
  2096. 1,
  2097. TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305,
  2098. TLS1_RFC_ECDHE_PSK_WITH_CHACHA20_POLY1305,
  2099. TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305,
  2100. SSL_kECDHEPSK,
  2101. SSL_aPSK,
  2102. SSL_CHACHA20POLY1305,
  2103. SSL_AEAD,
  2104. TLS1_2_VERSION, TLS1_2_VERSION,
  2105. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2106. SSL_HIGH,
  2107. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2108. 256,
  2109. 256,
  2110. },
  2111. {
  2112. 1,
  2113. TLS1_TXT_DHE_PSK_WITH_CHACHA20_POLY1305,
  2114. TLS1_RFC_DHE_PSK_WITH_CHACHA20_POLY1305,
  2115. TLS1_CK_DHE_PSK_WITH_CHACHA20_POLY1305,
  2116. SSL_kDHEPSK,
  2117. SSL_aPSK,
  2118. SSL_CHACHA20POLY1305,
  2119. SSL_AEAD,
  2120. TLS1_2_VERSION, TLS1_2_VERSION,
  2121. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2122. SSL_HIGH,
  2123. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2124. 256,
  2125. 256,
  2126. },
  2127. {
  2128. 1,
  2129. TLS1_TXT_RSA_PSK_WITH_CHACHA20_POLY1305,
  2130. TLS1_RFC_RSA_PSK_WITH_CHACHA20_POLY1305,
  2131. TLS1_CK_RSA_PSK_WITH_CHACHA20_POLY1305,
  2132. SSL_kRSAPSK,
  2133. SSL_aRSA,
  2134. SSL_CHACHA20POLY1305,
  2135. SSL_AEAD,
  2136. TLS1_2_VERSION, TLS1_2_VERSION,
  2137. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2138. SSL_HIGH,
  2139. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2140. 256,
  2141. 256,
  2142. },
  2143. #endif /* !defined(OPENSSL_NO_CHACHA) &&
  2144. * !defined(OPENSSL_NO_POLY1305) */
  2145. #ifndef OPENSSL_NO_CAMELLIA
  2146. {
  2147. 1,
  2148. TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  2149. TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  2150. TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  2151. SSL_kRSA,
  2152. SSL_aRSA,
  2153. SSL_CAMELLIA128,
  2154. SSL_SHA256,
  2155. TLS1_2_VERSION, TLS1_2_VERSION,
  2156. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2157. SSL_NOT_DEFAULT | SSL_HIGH,
  2158. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2159. 128,
  2160. 128,
  2161. },
  2162. {
  2163. 1,
  2164. TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
  2165. TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
  2166. TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
  2167. SSL_kEDH,
  2168. SSL_aDSS,
  2169. SSL_CAMELLIA128,
  2170. SSL_SHA256,
  2171. TLS1_2_VERSION, TLS1_2_VERSION,
  2172. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2173. SSL_NOT_DEFAULT | SSL_HIGH,
  2174. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2175. 128,
  2176. 128,
  2177. },
  2178. {
  2179. 1,
  2180. TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  2181. TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  2182. TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  2183. SSL_kEDH,
  2184. SSL_aRSA,
  2185. SSL_CAMELLIA128,
  2186. SSL_SHA256,
  2187. TLS1_2_VERSION, TLS1_2_VERSION,
  2188. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2189. SSL_NOT_DEFAULT | SSL_HIGH,
  2190. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2191. 128,
  2192. 128,
  2193. },
  2194. {
  2195. 1,
  2196. TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA256,
  2197. TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA256,
  2198. TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256,
  2199. SSL_kEDH,
  2200. SSL_aNULL,
  2201. SSL_CAMELLIA128,
  2202. SSL_SHA256,
  2203. TLS1_2_VERSION, TLS1_2_VERSION,
  2204. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2205. SSL_NOT_DEFAULT | SSL_HIGH,
  2206. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2207. 128,
  2208. 128,
  2209. },
  2210. {
  2211. 1,
  2212. TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA256,
  2213. TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA256,
  2214. TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA256,
  2215. SSL_kRSA,
  2216. SSL_aRSA,
  2217. SSL_CAMELLIA256,
  2218. SSL_SHA256,
  2219. TLS1_2_VERSION, TLS1_2_VERSION,
  2220. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2221. SSL_NOT_DEFAULT | SSL_HIGH,
  2222. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2223. 256,
  2224. 256,
  2225. },
  2226. {
  2227. 1,
  2228. TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
  2229. TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
  2230. TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
  2231. SSL_kEDH,
  2232. SSL_aDSS,
  2233. SSL_CAMELLIA256,
  2234. SSL_SHA256,
  2235. TLS1_2_VERSION, TLS1_2_VERSION,
  2236. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2237. SSL_NOT_DEFAULT | SSL_HIGH,
  2238. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2239. 256,
  2240. 256,
  2241. },
  2242. {
  2243. 1,
  2244. TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
  2245. TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
  2246. TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
  2247. SSL_kEDH,
  2248. SSL_aRSA,
  2249. SSL_CAMELLIA256,
  2250. SSL_SHA256,
  2251. TLS1_2_VERSION, TLS1_2_VERSION,
  2252. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2253. SSL_NOT_DEFAULT | SSL_HIGH,
  2254. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2255. 256,
  2256. 256,
  2257. },
  2258. {
  2259. 1,
  2260. TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA256,
  2261. TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA256,
  2262. TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256,
  2263. SSL_kEDH,
  2264. SSL_aNULL,
  2265. SSL_CAMELLIA256,
  2266. SSL_SHA256,
  2267. TLS1_2_VERSION, TLS1_2_VERSION,
  2268. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2269. SSL_NOT_DEFAULT | SSL_HIGH,
  2270. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2271. 256,
  2272. 256,
  2273. },
  2274. {
  2275. 1,
  2276. TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA,
  2277. TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA,
  2278. TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA,
  2279. SSL_kRSA,
  2280. SSL_aRSA,
  2281. SSL_CAMELLIA256,
  2282. SSL_SHA1,
  2283. SSL3_VERSION, TLS1_2_VERSION,
  2284. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2285. SSL_NOT_DEFAULT | SSL_HIGH,
  2286. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2287. 256,
  2288. 256,
  2289. },
  2290. {
  2291. 1,
  2292. TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA,
  2293. TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA,
  2294. TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA,
  2295. SSL_kDHE,
  2296. SSL_aDSS,
  2297. SSL_CAMELLIA256,
  2298. SSL_SHA1,
  2299. SSL3_VERSION, TLS1_2_VERSION,
  2300. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2301. SSL_NOT_DEFAULT | SSL_HIGH,
  2302. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2303. 256,
  2304. 256,
  2305. },
  2306. {
  2307. 1,
  2308. TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
  2309. TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
  2310. TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
  2311. SSL_kDHE,
  2312. SSL_aRSA,
  2313. SSL_CAMELLIA256,
  2314. SSL_SHA1,
  2315. SSL3_VERSION, TLS1_2_VERSION,
  2316. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2317. SSL_NOT_DEFAULT | SSL_HIGH,
  2318. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2319. 256,
  2320. 256,
  2321. },
  2322. {
  2323. 1,
  2324. TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA,
  2325. TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA,
  2326. TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA,
  2327. SSL_kDHE,
  2328. SSL_aNULL,
  2329. SSL_CAMELLIA256,
  2330. SSL_SHA1,
  2331. SSL3_VERSION, TLS1_2_VERSION,
  2332. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2333. SSL_NOT_DEFAULT | SSL_HIGH,
  2334. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2335. 256,
  2336. 256,
  2337. },
  2338. {
  2339. 1,
  2340. TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA,
  2341. TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA,
  2342. TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA,
  2343. SSL_kRSA,
  2344. SSL_aRSA,
  2345. SSL_CAMELLIA128,
  2346. SSL_SHA1,
  2347. SSL3_VERSION, TLS1_2_VERSION,
  2348. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2349. SSL_NOT_DEFAULT | SSL_HIGH,
  2350. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2351. 128,
  2352. 128,
  2353. },
  2354. {
  2355. 1,
  2356. TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA,
  2357. TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA,
  2358. TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA,
  2359. SSL_kDHE,
  2360. SSL_aDSS,
  2361. SSL_CAMELLIA128,
  2362. SSL_SHA1,
  2363. SSL3_VERSION, TLS1_2_VERSION,
  2364. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2365. SSL_NOT_DEFAULT | SSL_HIGH,
  2366. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2367. 128,
  2368. 128,
  2369. },
  2370. {
  2371. 1,
  2372. TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
  2373. TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
  2374. TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
  2375. SSL_kDHE,
  2376. SSL_aRSA,
  2377. SSL_CAMELLIA128,
  2378. SSL_SHA1,
  2379. SSL3_VERSION, TLS1_2_VERSION,
  2380. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2381. SSL_NOT_DEFAULT | SSL_HIGH,
  2382. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2383. 128,
  2384. 128,
  2385. },
  2386. {
  2387. 1,
  2388. TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA,
  2389. TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA,
  2390. TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA,
  2391. SSL_kDHE,
  2392. SSL_aNULL,
  2393. SSL_CAMELLIA128,
  2394. SSL_SHA1,
  2395. SSL3_VERSION, TLS1_2_VERSION,
  2396. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2397. SSL_NOT_DEFAULT | SSL_HIGH,
  2398. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2399. 128,
  2400. 128,
  2401. },
  2402. {
  2403. 1,
  2404. TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
  2405. TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
  2406. TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
  2407. SSL_kECDHE,
  2408. SSL_aECDSA,
  2409. SSL_CAMELLIA128,
  2410. SSL_SHA256,
  2411. TLS1_2_VERSION, TLS1_2_VERSION,
  2412. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2413. SSL_NOT_DEFAULT | SSL_HIGH,
  2414. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2415. 128,
  2416. 128,
  2417. },
  2418. {
  2419. 1,
  2420. TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
  2421. TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
  2422. TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
  2423. SSL_kECDHE,
  2424. SSL_aECDSA,
  2425. SSL_CAMELLIA256,
  2426. SSL_SHA384,
  2427. TLS1_2_VERSION, TLS1_2_VERSION,
  2428. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2429. SSL_NOT_DEFAULT | SSL_HIGH,
  2430. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  2431. 256,
  2432. 256,
  2433. },
  2434. {
  2435. 1,
  2436. TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  2437. TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  2438. TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
  2439. SSL_kECDHE,
  2440. SSL_aRSA,
  2441. SSL_CAMELLIA128,
  2442. SSL_SHA256,
  2443. TLS1_2_VERSION, TLS1_2_VERSION,
  2444. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2445. SSL_NOT_DEFAULT | SSL_HIGH,
  2446. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2447. 128,
  2448. 128,
  2449. },
  2450. {
  2451. 1,
  2452. TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
  2453. TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
  2454. TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
  2455. SSL_kECDHE,
  2456. SSL_aRSA,
  2457. SSL_CAMELLIA256,
  2458. SSL_SHA384,
  2459. TLS1_2_VERSION, TLS1_2_VERSION,
  2460. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2461. SSL_NOT_DEFAULT | SSL_HIGH,
  2462. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  2463. 256,
  2464. 256,
  2465. },
  2466. {
  2467. 1,
  2468. TLS1_TXT_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2469. TLS1_RFC_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2470. TLS1_CK_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2471. SSL_kPSK,
  2472. SSL_aPSK,
  2473. SSL_CAMELLIA128,
  2474. SSL_SHA256,
  2475. TLS1_VERSION, TLS1_2_VERSION,
  2476. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2477. SSL_NOT_DEFAULT | SSL_HIGH,
  2478. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2479. 128,
  2480. 128,
  2481. },
  2482. {
  2483. 1,
  2484. TLS1_TXT_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2485. TLS1_RFC_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2486. TLS1_CK_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2487. SSL_kPSK,
  2488. SSL_aPSK,
  2489. SSL_CAMELLIA256,
  2490. SSL_SHA384,
  2491. TLS1_VERSION, TLS1_2_VERSION,
  2492. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2493. SSL_NOT_DEFAULT | SSL_HIGH,
  2494. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  2495. 256,
  2496. 256,
  2497. },
  2498. {
  2499. 1,
  2500. TLS1_TXT_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2501. TLS1_RFC_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2502. TLS1_CK_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2503. SSL_kDHEPSK,
  2504. SSL_aPSK,
  2505. SSL_CAMELLIA128,
  2506. SSL_SHA256,
  2507. TLS1_VERSION, TLS1_2_VERSION,
  2508. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2509. SSL_NOT_DEFAULT | SSL_HIGH,
  2510. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2511. 128,
  2512. 128,
  2513. },
  2514. {
  2515. 1,
  2516. TLS1_TXT_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2517. TLS1_RFC_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2518. TLS1_CK_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2519. SSL_kDHEPSK,
  2520. SSL_aPSK,
  2521. SSL_CAMELLIA256,
  2522. SSL_SHA384,
  2523. TLS1_VERSION, TLS1_2_VERSION,
  2524. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2525. SSL_NOT_DEFAULT | SSL_HIGH,
  2526. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  2527. 256,
  2528. 256,
  2529. },
  2530. {
  2531. 1,
  2532. TLS1_TXT_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2533. TLS1_RFC_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2534. TLS1_CK_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2535. SSL_kRSAPSK,
  2536. SSL_aRSA,
  2537. SSL_CAMELLIA128,
  2538. SSL_SHA256,
  2539. TLS1_VERSION, TLS1_2_VERSION,
  2540. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2541. SSL_NOT_DEFAULT | SSL_HIGH,
  2542. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2543. 128,
  2544. 128,
  2545. },
  2546. {
  2547. 1,
  2548. TLS1_TXT_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2549. TLS1_RFC_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2550. TLS1_CK_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2551. SSL_kRSAPSK,
  2552. SSL_aRSA,
  2553. SSL_CAMELLIA256,
  2554. SSL_SHA384,
  2555. TLS1_VERSION, TLS1_2_VERSION,
  2556. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2557. SSL_NOT_DEFAULT | SSL_HIGH,
  2558. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  2559. 256,
  2560. 256,
  2561. },
  2562. {
  2563. 1,
  2564. TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2565. TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2566. TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
  2567. SSL_kECDHEPSK,
  2568. SSL_aPSK,
  2569. SSL_CAMELLIA128,
  2570. SSL_SHA256,
  2571. TLS1_VERSION, TLS1_2_VERSION,
  2572. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2573. SSL_NOT_DEFAULT | SSL_HIGH,
  2574. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2575. 128,
  2576. 128,
  2577. },
  2578. {
  2579. 1,
  2580. TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2581. TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2582. TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
  2583. SSL_kECDHEPSK,
  2584. SSL_aPSK,
  2585. SSL_CAMELLIA256,
  2586. SSL_SHA384,
  2587. TLS1_VERSION, TLS1_2_VERSION,
  2588. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2589. SSL_NOT_DEFAULT | SSL_HIGH,
  2590. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  2591. 256,
  2592. 256,
  2593. },
  2594. #endif /* OPENSSL_NO_CAMELLIA */
  2595. #ifndef OPENSSL_NO_GOST
  2596. {
  2597. 1,
  2598. "GOST2001-GOST89-GOST89",
  2599. "TLS_GOSTR341001_WITH_28147_CNT_IMIT",
  2600. 0x3000081,
  2601. SSL_kGOST,
  2602. SSL_aGOST01,
  2603. SSL_eGOST2814789CNT,
  2604. SSL_GOST89MAC,
  2605. TLS1_VERSION, TLS1_2_VERSION,
  2606. 0, 0,
  2607. SSL_HIGH,
  2608. SSL_HANDSHAKE_MAC_GOST94 | TLS1_PRF_GOST94 | TLS1_STREAM_MAC,
  2609. 256,
  2610. 256,
  2611. },
  2612. {
  2613. 1,
  2614. "GOST2001-NULL-GOST94",
  2615. "TLS_GOSTR341001_WITH_NULL_GOSTR3411",
  2616. 0x3000083,
  2617. SSL_kGOST,
  2618. SSL_aGOST01,
  2619. SSL_eNULL,
  2620. SSL_GOST94,
  2621. TLS1_VERSION, TLS1_2_VERSION,
  2622. 0, 0,
  2623. SSL_STRONG_NONE,
  2624. SSL_HANDSHAKE_MAC_GOST94 | TLS1_PRF_GOST94,
  2625. 0,
  2626. 0,
  2627. },
  2628. {
  2629. 1,
  2630. "GOST2012-GOST8912-GOST8912",
  2631. NULL,
  2632. 0x0300ff85,
  2633. SSL_kGOST,
  2634. SSL_aGOST12 | SSL_aGOST01,
  2635. SSL_eGOST2814789CNT12,
  2636. SSL_GOST89MAC12,
  2637. TLS1_VERSION, TLS1_2_VERSION,
  2638. 0, 0,
  2639. SSL_HIGH,
  2640. SSL_HANDSHAKE_MAC_GOST12_256 | TLS1_PRF_GOST12_256 | TLS1_STREAM_MAC,
  2641. 256,
  2642. 256,
  2643. },
  2644. {
  2645. 1,
  2646. "GOST2012-NULL-GOST12",
  2647. NULL,
  2648. 0x0300ff87,
  2649. SSL_kGOST,
  2650. SSL_aGOST12 | SSL_aGOST01,
  2651. SSL_eNULL,
  2652. SSL_GOST12_256,
  2653. TLS1_VERSION, TLS1_2_VERSION,
  2654. 0, 0,
  2655. SSL_STRONG_NONE,
  2656. SSL_HANDSHAKE_MAC_GOST12_256 | TLS1_PRF_GOST12_256 | TLS1_STREAM_MAC,
  2657. 0,
  2658. 0,
  2659. },
  2660. #endif /* OPENSSL_NO_GOST */
  2661. #ifndef OPENSSL_NO_IDEA
  2662. {
  2663. 1,
  2664. SSL3_TXT_RSA_IDEA_128_SHA,
  2665. SSL3_RFC_RSA_IDEA_128_SHA,
  2666. SSL3_CK_RSA_IDEA_128_SHA,
  2667. SSL_kRSA,
  2668. SSL_aRSA,
  2669. SSL_IDEA,
  2670. SSL_SHA1,
  2671. SSL3_VERSION, TLS1_1_VERSION,
  2672. DTLS1_BAD_VER, DTLS1_VERSION,
  2673. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2674. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2675. 128,
  2676. 128,
  2677. },
  2678. #endif
  2679. #ifndef OPENSSL_NO_SEED
  2680. {
  2681. 1,
  2682. TLS1_TXT_RSA_WITH_SEED_SHA,
  2683. TLS1_RFC_RSA_WITH_SEED_SHA,
  2684. TLS1_CK_RSA_WITH_SEED_SHA,
  2685. SSL_kRSA,
  2686. SSL_aRSA,
  2687. SSL_SEED,
  2688. SSL_SHA1,
  2689. SSL3_VERSION, TLS1_2_VERSION,
  2690. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2691. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2692. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2693. 128,
  2694. 128,
  2695. },
  2696. {
  2697. 1,
  2698. TLS1_TXT_DHE_DSS_WITH_SEED_SHA,
  2699. TLS1_RFC_DHE_DSS_WITH_SEED_SHA,
  2700. TLS1_CK_DHE_DSS_WITH_SEED_SHA,
  2701. SSL_kDHE,
  2702. SSL_aDSS,
  2703. SSL_SEED,
  2704. SSL_SHA1,
  2705. SSL3_VERSION, TLS1_2_VERSION,
  2706. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2707. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2708. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2709. 128,
  2710. 128,
  2711. },
  2712. {
  2713. 1,
  2714. TLS1_TXT_DHE_RSA_WITH_SEED_SHA,
  2715. TLS1_RFC_DHE_RSA_WITH_SEED_SHA,
  2716. TLS1_CK_DHE_RSA_WITH_SEED_SHA,
  2717. SSL_kDHE,
  2718. SSL_aRSA,
  2719. SSL_SEED,
  2720. SSL_SHA1,
  2721. SSL3_VERSION, TLS1_2_VERSION,
  2722. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2723. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2724. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2725. 128,
  2726. 128,
  2727. },
  2728. {
  2729. 1,
  2730. TLS1_TXT_ADH_WITH_SEED_SHA,
  2731. TLS1_RFC_ADH_WITH_SEED_SHA,
  2732. TLS1_CK_ADH_WITH_SEED_SHA,
  2733. SSL_kDHE,
  2734. SSL_aNULL,
  2735. SSL_SEED,
  2736. SSL_SHA1,
  2737. SSL3_VERSION, TLS1_2_VERSION,
  2738. DTLS1_BAD_VER, DTLS1_2_VERSION,
  2739. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2740. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2741. 128,
  2742. 128,
  2743. },
  2744. #endif /* OPENSSL_NO_SEED */
  2745. #ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
  2746. {
  2747. 1,
  2748. SSL3_TXT_RSA_RC4_128_MD5,
  2749. SSL3_RFC_RSA_RC4_128_MD5,
  2750. SSL3_CK_RSA_RC4_128_MD5,
  2751. SSL_kRSA,
  2752. SSL_aRSA,
  2753. SSL_RC4,
  2754. SSL_MD5,
  2755. SSL3_VERSION, TLS1_2_VERSION,
  2756. 0, 0,
  2757. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2758. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2759. 128,
  2760. 128,
  2761. },
  2762. {
  2763. 1,
  2764. SSL3_TXT_RSA_RC4_128_SHA,
  2765. SSL3_RFC_RSA_RC4_128_SHA,
  2766. SSL3_CK_RSA_RC4_128_SHA,
  2767. SSL_kRSA,
  2768. SSL_aRSA,
  2769. SSL_RC4,
  2770. SSL_SHA1,
  2771. SSL3_VERSION, TLS1_2_VERSION,
  2772. 0, 0,
  2773. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2774. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2775. 128,
  2776. 128,
  2777. },
  2778. {
  2779. 1,
  2780. SSL3_TXT_ADH_RC4_128_MD5,
  2781. SSL3_RFC_ADH_RC4_128_MD5,
  2782. SSL3_CK_ADH_RC4_128_MD5,
  2783. SSL_kDHE,
  2784. SSL_aNULL,
  2785. SSL_RC4,
  2786. SSL_MD5,
  2787. SSL3_VERSION, TLS1_2_VERSION,
  2788. 0, 0,
  2789. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2790. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2791. 128,
  2792. 128,
  2793. },
  2794. {
  2795. 1,
  2796. TLS1_TXT_ECDHE_PSK_WITH_RC4_128_SHA,
  2797. TLS1_RFC_ECDHE_PSK_WITH_RC4_128_SHA,
  2798. TLS1_CK_ECDHE_PSK_WITH_RC4_128_SHA,
  2799. SSL_kECDHEPSK,
  2800. SSL_aPSK,
  2801. SSL_RC4,
  2802. SSL_SHA1,
  2803. TLS1_VERSION, TLS1_2_VERSION,
  2804. 0, 0,
  2805. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2806. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2807. 128,
  2808. 128,
  2809. },
  2810. {
  2811. 1,
  2812. TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA,
  2813. TLS1_RFC_ECDH_anon_WITH_RC4_128_SHA,
  2814. TLS1_CK_ECDH_anon_WITH_RC4_128_SHA,
  2815. SSL_kECDHE,
  2816. SSL_aNULL,
  2817. SSL_RC4,
  2818. SSL_SHA1,
  2819. TLS1_VERSION, TLS1_2_VERSION,
  2820. 0, 0,
  2821. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2822. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2823. 128,
  2824. 128,
  2825. },
  2826. {
  2827. 1,
  2828. TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA,
  2829. TLS1_RFC_ECDHE_ECDSA_WITH_RC4_128_SHA,
  2830. TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA,
  2831. SSL_kECDHE,
  2832. SSL_aECDSA,
  2833. SSL_RC4,
  2834. SSL_SHA1,
  2835. TLS1_VERSION, TLS1_2_VERSION,
  2836. 0, 0,
  2837. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2838. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2839. 128,
  2840. 128,
  2841. },
  2842. {
  2843. 1,
  2844. TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA,
  2845. TLS1_RFC_ECDHE_RSA_WITH_RC4_128_SHA,
  2846. TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA,
  2847. SSL_kECDHE,
  2848. SSL_aRSA,
  2849. SSL_RC4,
  2850. SSL_SHA1,
  2851. TLS1_VERSION, TLS1_2_VERSION,
  2852. 0, 0,
  2853. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2854. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2855. 128,
  2856. 128,
  2857. },
  2858. {
  2859. 1,
  2860. TLS1_TXT_PSK_WITH_RC4_128_SHA,
  2861. TLS1_RFC_PSK_WITH_RC4_128_SHA,
  2862. TLS1_CK_PSK_WITH_RC4_128_SHA,
  2863. SSL_kPSK,
  2864. SSL_aPSK,
  2865. SSL_RC4,
  2866. SSL_SHA1,
  2867. SSL3_VERSION, TLS1_2_VERSION,
  2868. 0, 0,
  2869. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2870. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2871. 128,
  2872. 128,
  2873. },
  2874. {
  2875. 1,
  2876. TLS1_TXT_RSA_PSK_WITH_RC4_128_SHA,
  2877. TLS1_RFC_RSA_PSK_WITH_RC4_128_SHA,
  2878. TLS1_CK_RSA_PSK_WITH_RC4_128_SHA,
  2879. SSL_kRSAPSK,
  2880. SSL_aRSA,
  2881. SSL_RC4,
  2882. SSL_SHA1,
  2883. SSL3_VERSION, TLS1_2_VERSION,
  2884. 0, 0,
  2885. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2886. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2887. 128,
  2888. 128,
  2889. },
  2890. {
  2891. 1,
  2892. TLS1_TXT_DHE_PSK_WITH_RC4_128_SHA,
  2893. TLS1_RFC_DHE_PSK_WITH_RC4_128_SHA,
  2894. TLS1_CK_DHE_PSK_WITH_RC4_128_SHA,
  2895. SSL_kDHEPSK,
  2896. SSL_aPSK,
  2897. SSL_RC4,
  2898. SSL_SHA1,
  2899. SSL3_VERSION, TLS1_2_VERSION,
  2900. 0, 0,
  2901. SSL_NOT_DEFAULT | SSL_MEDIUM,
  2902. SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF,
  2903. 128,
  2904. 128,
  2905. },
  2906. #endif /* OPENSSL_NO_WEAK_SSL_CIPHERS */
  2907. #ifndef OPENSSL_NO_ARIA
  2908. {
  2909. 1,
  2910. TLS1_TXT_RSA_WITH_ARIA_128_GCM_SHA256,
  2911. TLS1_RFC_RSA_WITH_ARIA_128_GCM_SHA256,
  2912. TLS1_CK_RSA_WITH_ARIA_128_GCM_SHA256,
  2913. SSL_kRSA,
  2914. SSL_aRSA,
  2915. SSL_ARIA128GCM,
  2916. SSL_AEAD,
  2917. TLS1_2_VERSION, TLS1_2_VERSION,
  2918. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2919. SSL_NOT_DEFAULT | SSL_HIGH,
  2920. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2921. 128,
  2922. 128,
  2923. },
  2924. {
  2925. 1,
  2926. TLS1_TXT_RSA_WITH_ARIA_256_GCM_SHA384,
  2927. TLS1_RFC_RSA_WITH_ARIA_256_GCM_SHA384,
  2928. TLS1_CK_RSA_WITH_ARIA_256_GCM_SHA384,
  2929. SSL_kRSA,
  2930. SSL_aRSA,
  2931. SSL_ARIA256GCM,
  2932. SSL_AEAD,
  2933. TLS1_2_VERSION, TLS1_2_VERSION,
  2934. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2935. SSL_NOT_DEFAULT | SSL_HIGH,
  2936. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  2937. 256,
  2938. 256,
  2939. },
  2940. {
  2941. 1,
  2942. TLS1_TXT_DHE_RSA_WITH_ARIA_128_GCM_SHA256,
  2943. TLS1_RFC_DHE_RSA_WITH_ARIA_128_GCM_SHA256,
  2944. TLS1_CK_DHE_RSA_WITH_ARIA_128_GCM_SHA256,
  2945. SSL_kDHE,
  2946. SSL_aRSA,
  2947. SSL_ARIA128GCM,
  2948. SSL_AEAD,
  2949. TLS1_2_VERSION, TLS1_2_VERSION,
  2950. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2951. SSL_NOT_DEFAULT | SSL_HIGH,
  2952. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2953. 128,
  2954. 128,
  2955. },
  2956. {
  2957. 1,
  2958. TLS1_TXT_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
  2959. TLS1_RFC_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
  2960. TLS1_CK_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
  2961. SSL_kDHE,
  2962. SSL_aRSA,
  2963. SSL_ARIA256GCM,
  2964. SSL_AEAD,
  2965. TLS1_2_VERSION, TLS1_2_VERSION,
  2966. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2967. SSL_NOT_DEFAULT | SSL_HIGH,
  2968. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  2969. 256,
  2970. 256,
  2971. },
  2972. {
  2973. 1,
  2974. TLS1_TXT_DHE_DSS_WITH_ARIA_128_GCM_SHA256,
  2975. TLS1_RFC_DHE_DSS_WITH_ARIA_128_GCM_SHA256,
  2976. TLS1_CK_DHE_DSS_WITH_ARIA_128_GCM_SHA256,
  2977. SSL_kDHE,
  2978. SSL_aDSS,
  2979. SSL_ARIA128GCM,
  2980. SSL_AEAD,
  2981. TLS1_2_VERSION, TLS1_2_VERSION,
  2982. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2983. SSL_NOT_DEFAULT | SSL_HIGH,
  2984. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  2985. 128,
  2986. 128,
  2987. },
  2988. {
  2989. 1,
  2990. TLS1_TXT_DHE_DSS_WITH_ARIA_256_GCM_SHA384,
  2991. TLS1_RFC_DHE_DSS_WITH_ARIA_256_GCM_SHA384,
  2992. TLS1_CK_DHE_DSS_WITH_ARIA_256_GCM_SHA384,
  2993. SSL_kDHE,
  2994. SSL_aDSS,
  2995. SSL_ARIA256GCM,
  2996. SSL_AEAD,
  2997. TLS1_2_VERSION, TLS1_2_VERSION,
  2998. DTLS1_2_VERSION, DTLS1_2_VERSION,
  2999. SSL_NOT_DEFAULT | SSL_HIGH,
  3000. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  3001. 256,
  3002. 256,
  3003. },
  3004. {
  3005. 1,
  3006. TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256,
  3007. TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256,
  3008. TLS1_CK_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256,
  3009. SSL_kECDHE,
  3010. SSL_aECDSA,
  3011. SSL_ARIA128GCM,
  3012. SSL_AEAD,
  3013. TLS1_2_VERSION, TLS1_2_VERSION,
  3014. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3015. SSL_NOT_DEFAULT | SSL_HIGH,
  3016. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  3017. 128,
  3018. 128,
  3019. },
  3020. {
  3021. 1,
  3022. TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384,
  3023. TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384,
  3024. TLS1_CK_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384,
  3025. SSL_kECDHE,
  3026. SSL_aECDSA,
  3027. SSL_ARIA256GCM,
  3028. SSL_AEAD,
  3029. TLS1_2_VERSION, TLS1_2_VERSION,
  3030. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3031. SSL_NOT_DEFAULT | SSL_HIGH,
  3032. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  3033. 256,
  3034. 256,
  3035. },
  3036. {
  3037. 1,
  3038. TLS1_TXT_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256,
  3039. TLS1_RFC_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256,
  3040. TLS1_CK_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256,
  3041. SSL_kECDHE,
  3042. SSL_aRSA,
  3043. SSL_ARIA128GCM,
  3044. SSL_AEAD,
  3045. TLS1_2_VERSION, TLS1_2_VERSION,
  3046. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3047. SSL_NOT_DEFAULT | SSL_HIGH,
  3048. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  3049. 128,
  3050. 128,
  3051. },
  3052. {
  3053. 1,
  3054. TLS1_TXT_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
  3055. TLS1_RFC_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
  3056. TLS1_CK_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
  3057. SSL_kECDHE,
  3058. SSL_aRSA,
  3059. SSL_ARIA256GCM,
  3060. SSL_AEAD,
  3061. TLS1_2_VERSION, TLS1_2_VERSION,
  3062. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3063. SSL_NOT_DEFAULT | SSL_HIGH,
  3064. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  3065. 256,
  3066. 256,
  3067. },
  3068. {
  3069. 1,
  3070. TLS1_TXT_PSK_WITH_ARIA_128_GCM_SHA256,
  3071. TLS1_RFC_PSK_WITH_ARIA_128_GCM_SHA256,
  3072. TLS1_CK_PSK_WITH_ARIA_128_GCM_SHA256,
  3073. SSL_kPSK,
  3074. SSL_aPSK,
  3075. SSL_ARIA128GCM,
  3076. SSL_AEAD,
  3077. TLS1_2_VERSION, TLS1_2_VERSION,
  3078. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3079. SSL_NOT_DEFAULT | SSL_HIGH,
  3080. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  3081. 128,
  3082. 128,
  3083. },
  3084. {
  3085. 1,
  3086. TLS1_TXT_PSK_WITH_ARIA_256_GCM_SHA384,
  3087. TLS1_RFC_PSK_WITH_ARIA_256_GCM_SHA384,
  3088. TLS1_CK_PSK_WITH_ARIA_256_GCM_SHA384,
  3089. SSL_kPSK,
  3090. SSL_aPSK,
  3091. SSL_ARIA256GCM,
  3092. SSL_AEAD,
  3093. TLS1_2_VERSION, TLS1_2_VERSION,
  3094. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3095. SSL_NOT_DEFAULT | SSL_HIGH,
  3096. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  3097. 256,
  3098. 256,
  3099. },
  3100. {
  3101. 1,
  3102. TLS1_TXT_DHE_PSK_WITH_ARIA_128_GCM_SHA256,
  3103. TLS1_RFC_DHE_PSK_WITH_ARIA_128_GCM_SHA256,
  3104. TLS1_CK_DHE_PSK_WITH_ARIA_128_GCM_SHA256,
  3105. SSL_kDHEPSK,
  3106. SSL_aPSK,
  3107. SSL_ARIA128GCM,
  3108. SSL_AEAD,
  3109. TLS1_2_VERSION, TLS1_2_VERSION,
  3110. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3111. SSL_NOT_DEFAULT | SSL_HIGH,
  3112. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  3113. 128,
  3114. 128,
  3115. },
  3116. {
  3117. 1,
  3118. TLS1_TXT_DHE_PSK_WITH_ARIA_256_GCM_SHA384,
  3119. TLS1_RFC_DHE_PSK_WITH_ARIA_256_GCM_SHA384,
  3120. TLS1_CK_DHE_PSK_WITH_ARIA_256_GCM_SHA384,
  3121. SSL_kDHEPSK,
  3122. SSL_aPSK,
  3123. SSL_ARIA256GCM,
  3124. SSL_AEAD,
  3125. TLS1_2_VERSION, TLS1_2_VERSION,
  3126. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3127. SSL_NOT_DEFAULT | SSL_HIGH,
  3128. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  3129. 256,
  3130. 256,
  3131. },
  3132. {
  3133. 1,
  3134. TLS1_TXT_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
  3135. TLS1_RFC_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
  3136. TLS1_CK_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
  3137. SSL_kRSAPSK,
  3138. SSL_aRSA,
  3139. SSL_ARIA128GCM,
  3140. SSL_AEAD,
  3141. TLS1_2_VERSION, TLS1_2_VERSION,
  3142. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3143. SSL_NOT_DEFAULT | SSL_HIGH,
  3144. SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256,
  3145. 128,
  3146. 128,
  3147. },
  3148. {
  3149. 1,
  3150. TLS1_TXT_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
  3151. TLS1_RFC_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
  3152. TLS1_CK_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
  3153. SSL_kRSAPSK,
  3154. SSL_aRSA,
  3155. SSL_ARIA256GCM,
  3156. SSL_AEAD,
  3157. TLS1_2_VERSION, TLS1_2_VERSION,
  3158. DTLS1_2_VERSION, DTLS1_2_VERSION,
  3159. SSL_NOT_DEFAULT | SSL_HIGH,
  3160. SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384,
  3161. 256,
  3162. 256,
  3163. },
  3164. #endif /* OPENSSL_NO_ARIA */
  3165. };
  3166. /*
  3167. * The list of known Signalling Cipher-Suite Value "ciphers", non-valid
  3168. * values stuffed into the ciphers field of the wire protocol for signalling
  3169. * purposes.
  3170. */
  3171. static SSL_CIPHER ssl3_scsvs[] = {
  3172. {
  3173. 0,
  3174. "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
  3175. "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
  3176. SSL3_CK_SCSV,
  3177. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  3178. },
  3179. {
  3180. 0,
  3181. "TLS_FALLBACK_SCSV",
  3182. "TLS_FALLBACK_SCSV",
  3183. SSL3_CK_FALLBACK_SCSV,
  3184. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  3185. },
  3186. };
  3187. static int cipher_compare(const void *a, const void *b)
  3188. {
  3189. const SSL_CIPHER *ap = (const SSL_CIPHER *)a;
  3190. const SSL_CIPHER *bp = (const SSL_CIPHER *)b;
  3191. if (ap->id == bp->id)
  3192. return 0;
  3193. return ap->id < bp->id ? -1 : 1;
  3194. }
  3195. void ssl_sort_cipher_list(void)
  3196. {
  3197. qsort(tls13_ciphers, TLS13_NUM_CIPHERS, sizeof(tls13_ciphers[0]),
  3198. cipher_compare);
  3199. qsort(ssl3_ciphers, SSL3_NUM_CIPHERS, sizeof(ssl3_ciphers[0]),
  3200. cipher_compare);
  3201. qsort(ssl3_scsvs, SSL3_NUM_SCSVS, sizeof(ssl3_scsvs[0]), cipher_compare);
  3202. }
  3203. static int ssl_undefined_function_1(SSL *ssl, unsigned char *r, size_t s,
  3204. const char * t, size_t u,
  3205. const unsigned char * v, size_t w, int x)
  3206. {
  3207. (void)r;
  3208. (void)s;
  3209. (void)t;
  3210. (void)u;
  3211. (void)v;
  3212. (void)w;
  3213. (void)x;
  3214. return ssl_undefined_function(ssl);
  3215. }
  3216. const SSL3_ENC_METHOD SSLv3_enc_data = {
  3217. ssl3_enc,
  3218. n_ssl3_mac,
  3219. ssl3_setup_key_block,
  3220. ssl3_generate_master_secret,
  3221. ssl3_change_cipher_state,
  3222. ssl3_final_finish_mac,
  3223. SSL3_MD_CLIENT_FINISHED_CONST, 4,
  3224. SSL3_MD_SERVER_FINISHED_CONST, 4,
  3225. ssl3_alert_code,
  3226. ssl_undefined_function_1,
  3227. 0,
  3228. ssl3_set_handshake_header,
  3229. tls_close_construct_packet,
  3230. ssl3_handshake_write
  3231. };
  3232. long ssl3_default_timeout(void)
  3233. {
  3234. /*
  3235. * 2 hours, the 24 hours mentioned in the SSLv3 spec is way too long for
  3236. * http, the cache would over fill
  3237. */
  3238. return (60 * 60 * 2);
  3239. }
  3240. int ssl3_num_ciphers(void)
  3241. {
  3242. return SSL3_NUM_CIPHERS;
  3243. }
  3244. const SSL_CIPHER *ssl3_get_cipher(unsigned int u)
  3245. {
  3246. if (u < SSL3_NUM_CIPHERS)
  3247. return &(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u]);
  3248. else
  3249. return NULL;
  3250. }
  3251. int ssl3_set_handshake_header(SSL *s, WPACKET *pkt, int htype)
  3252. {
  3253. /* No header in the event of a CCS */
  3254. if (htype == SSL3_MT_CHANGE_CIPHER_SPEC)
  3255. return 1;
  3256. /* Set the content type and 3 bytes for the message len */
  3257. if (!WPACKET_put_bytes_u8(pkt, htype)
  3258. || !WPACKET_start_sub_packet_u24(pkt))
  3259. return 0;
  3260. return 1;
  3261. }
  3262. int ssl3_handshake_write(SSL *s)
  3263. {
  3264. return ssl3_do_write(s, SSL3_RT_HANDSHAKE);
  3265. }
  3266. int ssl3_new(SSL *s)
  3267. {
  3268. #ifndef OPENSSL_NO_SRP
  3269. if (!SSL_SRP_CTX_init(s))
  3270. return 0;
  3271. #endif
  3272. if (!s->method->ssl_clear(s))
  3273. return 0;
  3274. return 1;
  3275. }
  3276. void ssl3_free(SSL *s)
  3277. {
  3278. if (s == NULL)
  3279. return;
  3280. ssl3_cleanup_key_block(s);
  3281. #if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
  3282. EVP_PKEY_free(s->s3.peer_tmp);
  3283. s->s3.peer_tmp = NULL;
  3284. EVP_PKEY_free(s->s3.tmp.pkey);
  3285. s->s3.tmp.pkey = NULL;
  3286. #endif
  3287. OPENSSL_free(s->s3.tmp.ctype);
  3288. sk_X509_NAME_pop_free(s->s3.tmp.peer_ca_names, X509_NAME_free);
  3289. OPENSSL_free(s->s3.tmp.ciphers_raw);
  3290. OPENSSL_clear_free(s->s3.tmp.pms, s->s3.tmp.pmslen);
  3291. OPENSSL_free(s->s3.tmp.peer_sigalgs);
  3292. OPENSSL_free(s->s3.tmp.peer_cert_sigalgs);
  3293. ssl3_free_digest_list(s);
  3294. OPENSSL_free(s->s3.alpn_selected);
  3295. OPENSSL_free(s->s3.alpn_proposed);
  3296. #ifndef OPENSSL_NO_SRP
  3297. SSL_SRP_CTX_free(s);
  3298. #endif
  3299. memset(&s->s3, 0, sizeof(s->s3));
  3300. }
  3301. int ssl3_clear(SSL *s)
  3302. {
  3303. ssl3_cleanup_key_block(s);
  3304. OPENSSL_free(s->s3.tmp.ctype);
  3305. sk_X509_NAME_pop_free(s->s3.tmp.peer_ca_names, X509_NAME_free);
  3306. OPENSSL_free(s->s3.tmp.ciphers_raw);
  3307. OPENSSL_clear_free(s->s3.tmp.pms, s->s3.tmp.pmslen);
  3308. OPENSSL_free(s->s3.tmp.peer_sigalgs);
  3309. OPENSSL_free(s->s3.tmp.peer_cert_sigalgs);
  3310. #if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
  3311. EVP_PKEY_free(s->s3.tmp.pkey);
  3312. EVP_PKEY_free(s->s3.peer_tmp);
  3313. #endif /* !OPENSSL_NO_EC */
  3314. ssl3_free_digest_list(s);
  3315. OPENSSL_free(s->s3.alpn_selected);
  3316. OPENSSL_free(s->s3.alpn_proposed);
  3317. /* NULL/zero-out everything in the s3 struct */
  3318. memset(&s->s3, 0, sizeof(s->s3));
  3319. if (!ssl_free_wbio_buffer(s))
  3320. return 0;
  3321. s->version = SSL3_VERSION;
  3322. #if !defined(OPENSSL_NO_NEXTPROTONEG)
  3323. OPENSSL_free(s->ext.npn);
  3324. s->ext.npn = NULL;
  3325. s->ext.npn_len = 0;
  3326. #endif
  3327. return 1;
  3328. }
  3329. #ifndef OPENSSL_NO_SRP
  3330. static char *srp_password_from_info_cb(SSL *s, void *arg)
  3331. {
  3332. return OPENSSL_strdup(s->srp_ctx.info);
  3333. }
  3334. #endif
  3335. static int ssl3_set_req_cert_type(CERT *c, const unsigned char *p, size_t len);
  3336. long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
  3337. {
  3338. int ret = 0;
  3339. switch (cmd) {
  3340. case SSL_CTRL_GET_CLIENT_CERT_REQUEST:
  3341. break;
  3342. case SSL_CTRL_GET_NUM_RENEGOTIATIONS:
  3343. ret = s->s3.num_renegotiations;
  3344. break;
  3345. case SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS:
  3346. ret = s->s3.num_renegotiations;
  3347. s->s3.num_renegotiations = 0;
  3348. break;
  3349. case SSL_CTRL_GET_TOTAL_RENEGOTIATIONS:
  3350. ret = s->s3.total_renegotiations;
  3351. break;
  3352. case SSL_CTRL_GET_FLAGS:
  3353. ret = (int)(s->s3.flags);
  3354. break;
  3355. #ifndef OPENSSL_NO_DH
  3356. case SSL_CTRL_SET_TMP_DH:
  3357. {
  3358. DH *dh = (DH *)parg;
  3359. EVP_PKEY *pkdh = NULL;
  3360. if (dh == NULL) {
  3361. SSLerr(SSL_F_SSL3_CTRL, ERR_R_PASSED_NULL_PARAMETER);
  3362. return 0;
  3363. }
  3364. pkdh = ssl_dh_to_pkey(dh);
  3365. if (pkdh == NULL) {
  3366. SSLerr(SSL_F_SSL3_CTRL, ERR_R_MALLOC_FAILURE);
  3367. return 0;
  3368. }
  3369. if (!ssl_security(s, SSL_SECOP_TMP_DH,
  3370. EVP_PKEY_security_bits(pkdh), 0, pkdh)) {
  3371. SSLerr(SSL_F_SSL3_CTRL, SSL_R_DH_KEY_TOO_SMALL);
  3372. EVP_PKEY_free(pkdh);
  3373. return 0;
  3374. }
  3375. EVP_PKEY_free(s->cert->dh_tmp);
  3376. s->cert->dh_tmp = pkdh;
  3377. return 1;
  3378. }
  3379. break;
  3380. case SSL_CTRL_SET_TMP_DH_CB:
  3381. {
  3382. SSLerr(SSL_F_SSL3_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  3383. return ret;
  3384. }
  3385. case SSL_CTRL_SET_DH_AUTO:
  3386. s->cert->dh_tmp_auto = larg;
  3387. return 1;
  3388. #endif
  3389. #ifndef OPENSSL_NO_EC
  3390. case SSL_CTRL_SET_TMP_ECDH:
  3391. {
  3392. const EC_GROUP *group = NULL;
  3393. int nid;
  3394. if (parg == NULL) {
  3395. SSLerr(SSL_F_SSL3_CTRL, ERR_R_PASSED_NULL_PARAMETER);
  3396. return 0;
  3397. }
  3398. group = EC_KEY_get0_group((const EC_KEY *)parg);
  3399. if (group == NULL) {
  3400. SSLerr(SSL_F_SSL3_CTRL, EC_R_MISSING_PARAMETERS);
  3401. return 0;
  3402. }
  3403. nid = EC_GROUP_get_curve_name(group);
  3404. if (nid == NID_undef)
  3405. return 0;
  3406. return tls1_set_groups(&s->ext.supportedgroups,
  3407. &s->ext.supportedgroups_len,
  3408. &nid, 1);
  3409. }
  3410. break;
  3411. #endif /* !OPENSSL_NO_EC */
  3412. case SSL_CTRL_SET_TLSEXT_HOSTNAME:
  3413. /*
  3414. * TODO(OpenSSL1.2)
  3415. * This API is only used for a client to set what SNI it will request
  3416. * from the server, but we currently allow it to be used on servers
  3417. * as well, which is a programming error. Currently we just clear
  3418. * the field in SSL_do_handshake() for server SSLs, but when we can
  3419. * make ABI-breaking changes, we may want to make use of this API
  3420. * an error on server SSLs.
  3421. */
  3422. if (larg == TLSEXT_NAMETYPE_host_name) {
  3423. size_t len;
  3424. OPENSSL_free(s->ext.hostname);
  3425. s->ext.hostname = NULL;
  3426. ret = 1;
  3427. if (parg == NULL)
  3428. break;
  3429. len = strlen((char *)parg);
  3430. if (len == 0 || len > TLSEXT_MAXLEN_host_name) {
  3431. SSLerr(SSL_F_SSL3_CTRL, SSL_R_SSL3_EXT_INVALID_SERVERNAME);
  3432. return 0;
  3433. }
  3434. if ((s->ext.hostname = OPENSSL_strdup((char *)parg)) == NULL) {
  3435. SSLerr(SSL_F_SSL3_CTRL, ERR_R_INTERNAL_ERROR);
  3436. return 0;
  3437. }
  3438. } else {
  3439. SSLerr(SSL_F_SSL3_CTRL, SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE);
  3440. return 0;
  3441. }
  3442. break;
  3443. case SSL_CTRL_SET_TLSEXT_DEBUG_ARG:
  3444. s->ext.debug_arg = parg;
  3445. ret = 1;
  3446. break;
  3447. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  3448. ret = s->ext.status_type;
  3449. break;
  3450. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  3451. s->ext.status_type = larg;
  3452. ret = 1;
  3453. break;
  3454. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS:
  3455. *(STACK_OF(X509_EXTENSION) **)parg = s->ext.ocsp.exts;
  3456. ret = 1;
  3457. break;
  3458. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS:
  3459. s->ext.ocsp.exts = parg;
  3460. ret = 1;
  3461. break;
  3462. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS:
  3463. *(STACK_OF(OCSP_RESPID) **)parg = s->ext.ocsp.ids;
  3464. ret = 1;
  3465. break;
  3466. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS:
  3467. s->ext.ocsp.ids = parg;
  3468. ret = 1;
  3469. break;
  3470. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP:
  3471. *(unsigned char **)parg = s->ext.ocsp.resp;
  3472. if (s->ext.ocsp.resp_len == 0
  3473. || s->ext.ocsp.resp_len > LONG_MAX)
  3474. return -1;
  3475. return (long)s->ext.ocsp.resp_len;
  3476. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP:
  3477. OPENSSL_free(s->ext.ocsp.resp);
  3478. s->ext.ocsp.resp = parg;
  3479. s->ext.ocsp.resp_len = larg;
  3480. ret = 1;
  3481. break;
  3482. case SSL_CTRL_CHAIN:
  3483. if (larg)
  3484. return ssl_cert_set1_chain(s, NULL, (STACK_OF(X509) *)parg);
  3485. else
  3486. return ssl_cert_set0_chain(s, NULL, (STACK_OF(X509) *)parg);
  3487. case SSL_CTRL_CHAIN_CERT:
  3488. if (larg)
  3489. return ssl_cert_add1_chain_cert(s, NULL, (X509 *)parg);
  3490. else
  3491. return ssl_cert_add0_chain_cert(s, NULL, (X509 *)parg);
  3492. case SSL_CTRL_GET_CHAIN_CERTS:
  3493. *(STACK_OF(X509) **)parg = s->cert->key->chain;
  3494. ret = 1;
  3495. break;
  3496. case SSL_CTRL_SELECT_CURRENT_CERT:
  3497. return ssl_cert_select_current(s->cert, (X509 *)parg);
  3498. case SSL_CTRL_SET_CURRENT_CERT:
  3499. if (larg == SSL_CERT_SET_SERVER) {
  3500. const SSL_CIPHER *cipher;
  3501. if (!s->server)
  3502. return 0;
  3503. cipher = s->s3.tmp.new_cipher;
  3504. if (cipher == NULL)
  3505. return 0;
  3506. /*
  3507. * No certificate for unauthenticated ciphersuites or using SRP
  3508. * authentication
  3509. */
  3510. if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  3511. return 2;
  3512. if (s->s3.tmp.cert == NULL)
  3513. return 0;
  3514. s->cert->key = s->s3.tmp.cert;
  3515. return 1;
  3516. }
  3517. return ssl_cert_set_current(s->cert, larg);
  3518. #if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
  3519. case SSL_CTRL_GET_GROUPS:
  3520. {
  3521. uint16_t *clist;
  3522. size_t clistlen;
  3523. if (!s->session)
  3524. return 0;
  3525. clist = s->ext.peer_supportedgroups;
  3526. clistlen = s->ext.peer_supportedgroups_len;
  3527. if (parg) {
  3528. size_t i;
  3529. int *cptr = parg;
  3530. for (i = 0; i < clistlen; i++) {
  3531. const TLS_GROUP_INFO *cinf = tls1_group_id_lookup(clist[i]);
  3532. if (cinf != NULL)
  3533. cptr[i] = cinf->nid;
  3534. else
  3535. cptr[i] = TLSEXT_nid_unknown | clist[i];
  3536. }
  3537. }
  3538. return (int)clistlen;
  3539. }
  3540. case SSL_CTRL_SET_GROUPS:
  3541. return tls1_set_groups(&s->ext.supportedgroups,
  3542. &s->ext.supportedgroups_len, parg, larg);
  3543. case SSL_CTRL_SET_GROUPS_LIST:
  3544. return tls1_set_groups_list(&s->ext.supportedgroups,
  3545. &s->ext.supportedgroups_len, parg);
  3546. case SSL_CTRL_GET_SHARED_GROUP:
  3547. {
  3548. uint16_t id = tls1_shared_group(s, larg);
  3549. if (larg != -1)
  3550. return tls1_group_id2nid(id);
  3551. return id;
  3552. }
  3553. case SSL_CTRL_GET_NEGOTIATED_GROUP:
  3554. ret = tls1_group_id2nid(s->s3.group_id);
  3555. break;
  3556. #endif /* !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH) */
  3557. case SSL_CTRL_SET_SIGALGS:
  3558. return tls1_set_sigalgs(s->cert, parg, larg, 0);
  3559. case SSL_CTRL_SET_SIGALGS_LIST:
  3560. return tls1_set_sigalgs_list(s->cert, parg, 0);
  3561. case SSL_CTRL_SET_CLIENT_SIGALGS:
  3562. return tls1_set_sigalgs(s->cert, parg, larg, 1);
  3563. case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  3564. return tls1_set_sigalgs_list(s->cert, parg, 1);
  3565. case SSL_CTRL_GET_CLIENT_CERT_TYPES:
  3566. {
  3567. const unsigned char **pctype = parg;
  3568. if (s->server || !s->s3.tmp.cert_req)
  3569. return 0;
  3570. if (pctype)
  3571. *pctype = s->s3.tmp.ctype;
  3572. return s->s3.tmp.ctype_len;
  3573. }
  3574. case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  3575. if (!s->server)
  3576. return 0;
  3577. return ssl3_set_req_cert_type(s->cert, parg, larg);
  3578. case SSL_CTRL_BUILD_CERT_CHAIN:
  3579. return ssl_build_cert_chain(s, NULL, larg);
  3580. case SSL_CTRL_SET_VERIFY_CERT_STORE:
  3581. return ssl_cert_set_cert_store(s->cert, parg, 0, larg);
  3582. case SSL_CTRL_SET_CHAIN_CERT_STORE:
  3583. return ssl_cert_set_cert_store(s->cert, parg, 1, larg);
  3584. case SSL_CTRL_GET_PEER_SIGNATURE_NID:
  3585. if (s->s3.tmp.peer_sigalg == NULL)
  3586. return 0;
  3587. *(int *)parg = s->s3.tmp.peer_sigalg->hash;
  3588. return 1;
  3589. case SSL_CTRL_GET_SIGNATURE_NID:
  3590. if (s->s3.tmp.sigalg == NULL)
  3591. return 0;
  3592. *(int *)parg = s->s3.tmp.sigalg->hash;
  3593. return 1;
  3594. case SSL_CTRL_GET_PEER_TMP_KEY:
  3595. #if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC)
  3596. if (s->session == NULL || s->s3.peer_tmp == NULL) {
  3597. return 0;
  3598. } else {
  3599. EVP_PKEY_up_ref(s->s3.peer_tmp);
  3600. *(EVP_PKEY **)parg = s->s3.peer_tmp;
  3601. return 1;
  3602. }
  3603. #else
  3604. return 0;
  3605. #endif
  3606. case SSL_CTRL_GET_TMP_KEY:
  3607. #if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC)
  3608. if (s->session == NULL || s->s3.tmp.pkey == NULL) {
  3609. return 0;
  3610. } else {
  3611. EVP_PKEY_up_ref(s->s3.tmp.pkey);
  3612. *(EVP_PKEY **)parg = s->s3.tmp.pkey;
  3613. return 1;
  3614. }
  3615. #else
  3616. return 0;
  3617. #endif
  3618. #ifndef OPENSSL_NO_EC
  3619. case SSL_CTRL_GET_EC_POINT_FORMATS:
  3620. {
  3621. const unsigned char **pformat = parg;
  3622. if (s->ext.peer_ecpointformats == NULL)
  3623. return 0;
  3624. *pformat = s->ext.peer_ecpointformats;
  3625. return (int)s->ext.peer_ecpointformats_len;
  3626. }
  3627. #endif
  3628. default:
  3629. break;
  3630. }
  3631. return ret;
  3632. }
  3633. long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp) (void))
  3634. {
  3635. int ret = 0;
  3636. switch (cmd) {
  3637. #ifndef OPENSSL_NO_DH
  3638. case SSL_CTRL_SET_TMP_DH_CB:
  3639. {
  3640. s->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
  3641. }
  3642. break;
  3643. #endif
  3644. case SSL_CTRL_SET_TLSEXT_DEBUG_CB:
  3645. s->ext.debug_cb = (void (*)(SSL *, int, int,
  3646. const unsigned char *, int, void *))fp;
  3647. break;
  3648. case SSL_CTRL_SET_NOT_RESUMABLE_SESS_CB:
  3649. {
  3650. s->not_resumable_session_cb = (int (*)(SSL *, int))fp;
  3651. }
  3652. break;
  3653. default:
  3654. break;
  3655. }
  3656. return ret;
  3657. }
  3658. long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
  3659. {
  3660. switch (cmd) {
  3661. #ifndef OPENSSL_NO_DH
  3662. case SSL_CTRL_SET_TMP_DH:
  3663. {
  3664. DH *dh = (DH *)parg;
  3665. EVP_PKEY *pkdh = NULL;
  3666. if (dh == NULL) {
  3667. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_PASSED_NULL_PARAMETER);
  3668. return 0;
  3669. }
  3670. pkdh = ssl_dh_to_pkey(dh);
  3671. if (pkdh == NULL) {
  3672. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_MALLOC_FAILURE);
  3673. return 0;
  3674. }
  3675. if (!ssl_ctx_security(ctx, SSL_SECOP_TMP_DH,
  3676. EVP_PKEY_security_bits(pkdh), 0, pkdh)) {
  3677. SSLerr(SSL_F_SSL3_CTX_CTRL, SSL_R_DH_KEY_TOO_SMALL);
  3678. EVP_PKEY_free(pkdh);
  3679. return 0;
  3680. }
  3681. EVP_PKEY_free(ctx->cert->dh_tmp);
  3682. ctx->cert->dh_tmp = pkdh;
  3683. return 1;
  3684. }
  3685. case SSL_CTRL_SET_TMP_DH_CB:
  3686. {
  3687. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  3688. return 0;
  3689. }
  3690. case SSL_CTRL_SET_DH_AUTO:
  3691. ctx->cert->dh_tmp_auto = larg;
  3692. return 1;
  3693. #endif
  3694. #ifndef OPENSSL_NO_EC
  3695. case SSL_CTRL_SET_TMP_ECDH:
  3696. {
  3697. const EC_GROUP *group = NULL;
  3698. int nid;
  3699. if (parg == NULL) {
  3700. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_PASSED_NULL_PARAMETER);
  3701. return 0;
  3702. }
  3703. group = EC_KEY_get0_group((const EC_KEY *)parg);
  3704. if (group == NULL) {
  3705. SSLerr(SSL_F_SSL3_CTX_CTRL, EC_R_MISSING_PARAMETERS);
  3706. return 0;
  3707. }
  3708. nid = EC_GROUP_get_curve_name(group);
  3709. if (nid == NID_undef)
  3710. return 0;
  3711. return tls1_set_groups(&ctx->ext.supportedgroups,
  3712. &ctx->ext.supportedgroups_len,
  3713. &nid, 1);
  3714. }
  3715. #endif /* !OPENSSL_NO_EC */
  3716. case SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG:
  3717. ctx->ext.servername_arg = parg;
  3718. break;
  3719. case SSL_CTRL_SET_TLSEXT_TICKET_KEYS:
  3720. case SSL_CTRL_GET_TLSEXT_TICKET_KEYS:
  3721. {
  3722. unsigned char *keys = parg;
  3723. long tick_keylen = (sizeof(ctx->ext.tick_key_name) +
  3724. sizeof(ctx->ext.secure->tick_hmac_key) +
  3725. sizeof(ctx->ext.secure->tick_aes_key));
  3726. if (keys == NULL)
  3727. return tick_keylen;
  3728. if (larg != tick_keylen) {
  3729. SSLerr(SSL_F_SSL3_CTX_CTRL, SSL_R_INVALID_TICKET_KEYS_LENGTH);
  3730. return 0;
  3731. }
  3732. if (cmd == SSL_CTRL_SET_TLSEXT_TICKET_KEYS) {
  3733. memcpy(ctx->ext.tick_key_name, keys,
  3734. sizeof(ctx->ext.tick_key_name));
  3735. memcpy(ctx->ext.secure->tick_hmac_key,
  3736. keys + sizeof(ctx->ext.tick_key_name),
  3737. sizeof(ctx->ext.secure->tick_hmac_key));
  3738. memcpy(ctx->ext.secure->tick_aes_key,
  3739. keys + sizeof(ctx->ext.tick_key_name) +
  3740. sizeof(ctx->ext.secure->tick_hmac_key),
  3741. sizeof(ctx->ext.secure->tick_aes_key));
  3742. } else {
  3743. memcpy(keys, ctx->ext.tick_key_name,
  3744. sizeof(ctx->ext.tick_key_name));
  3745. memcpy(keys + sizeof(ctx->ext.tick_key_name),
  3746. ctx->ext.secure->tick_hmac_key,
  3747. sizeof(ctx->ext.secure->tick_hmac_key));
  3748. memcpy(keys + sizeof(ctx->ext.tick_key_name) +
  3749. sizeof(ctx->ext.secure->tick_hmac_key),
  3750. ctx->ext.secure->tick_aes_key,
  3751. sizeof(ctx->ext.secure->tick_aes_key));
  3752. }
  3753. return 1;
  3754. }
  3755. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  3756. return ctx->ext.status_type;
  3757. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  3758. ctx->ext.status_type = larg;
  3759. break;
  3760. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG:
  3761. ctx->ext.status_arg = parg;
  3762. return 1;
  3763. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG:
  3764. *(void**)parg = ctx->ext.status_arg;
  3765. break;
  3766. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB:
  3767. *(int (**)(SSL*, void*))parg = ctx->ext.status_cb;
  3768. break;
  3769. #ifndef OPENSSL_NO_SRP
  3770. case SSL_CTRL_SET_TLS_EXT_SRP_USERNAME:
  3771. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3772. OPENSSL_free(ctx->srp_ctx.login);
  3773. ctx->srp_ctx.login = NULL;
  3774. if (parg == NULL)
  3775. break;
  3776. if (strlen((const char *)parg) > 255 || strlen((const char *)parg) < 1) {
  3777. SSLerr(SSL_F_SSL3_CTX_CTRL, SSL_R_INVALID_SRP_USERNAME);
  3778. return 0;
  3779. }
  3780. if ((ctx->srp_ctx.login = OPENSSL_strdup((char *)parg)) == NULL) {
  3781. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_INTERNAL_ERROR);
  3782. return 0;
  3783. }
  3784. break;
  3785. case SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD:
  3786. ctx->srp_ctx.SRP_give_srp_client_pwd_callback =
  3787. srp_password_from_info_cb;
  3788. if (ctx->srp_ctx.info != NULL)
  3789. OPENSSL_free(ctx->srp_ctx.info);
  3790. if ((ctx->srp_ctx.info = BUF_strdup((char *)parg)) == NULL) {
  3791. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_INTERNAL_ERROR);
  3792. return 0;
  3793. }
  3794. break;
  3795. case SSL_CTRL_SET_SRP_ARG:
  3796. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3797. ctx->srp_ctx.SRP_cb_arg = parg;
  3798. break;
  3799. case SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH:
  3800. ctx->srp_ctx.strength = larg;
  3801. break;
  3802. #endif
  3803. #if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
  3804. case SSL_CTRL_SET_GROUPS:
  3805. return tls1_set_groups(&ctx->ext.supportedgroups,
  3806. &ctx->ext.supportedgroups_len,
  3807. parg, larg);
  3808. case SSL_CTRL_SET_GROUPS_LIST:
  3809. return tls1_set_groups_list(&ctx->ext.supportedgroups,
  3810. &ctx->ext.supportedgroups_len,
  3811. parg);
  3812. #endif /* !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH) */
  3813. case SSL_CTRL_SET_SIGALGS:
  3814. return tls1_set_sigalgs(ctx->cert, parg, larg, 0);
  3815. case SSL_CTRL_SET_SIGALGS_LIST:
  3816. return tls1_set_sigalgs_list(ctx->cert, parg, 0);
  3817. case SSL_CTRL_SET_CLIENT_SIGALGS:
  3818. return tls1_set_sigalgs(ctx->cert, parg, larg, 1);
  3819. case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  3820. return tls1_set_sigalgs_list(ctx->cert, parg, 1);
  3821. case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  3822. return ssl3_set_req_cert_type(ctx->cert, parg, larg);
  3823. case SSL_CTRL_BUILD_CERT_CHAIN:
  3824. return ssl_build_cert_chain(NULL, ctx, larg);
  3825. case SSL_CTRL_SET_VERIFY_CERT_STORE:
  3826. return ssl_cert_set_cert_store(ctx->cert, parg, 0, larg);
  3827. case SSL_CTRL_SET_CHAIN_CERT_STORE:
  3828. return ssl_cert_set_cert_store(ctx->cert, parg, 1, larg);
  3829. /* A Thawte special :-) */
  3830. case SSL_CTRL_EXTRA_CHAIN_CERT:
  3831. if (ctx->extra_certs == NULL) {
  3832. if ((ctx->extra_certs = sk_X509_new_null()) == NULL) {
  3833. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_MALLOC_FAILURE);
  3834. return 0;
  3835. }
  3836. }
  3837. if (!sk_X509_push(ctx->extra_certs, (X509 *)parg)) {
  3838. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_MALLOC_FAILURE);
  3839. return 0;
  3840. }
  3841. break;
  3842. case SSL_CTRL_GET_EXTRA_CHAIN_CERTS:
  3843. if (ctx->extra_certs == NULL && larg == 0)
  3844. *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
  3845. else
  3846. *(STACK_OF(X509) **)parg = ctx->extra_certs;
  3847. break;
  3848. case SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS:
  3849. sk_X509_pop_free(ctx->extra_certs, X509_free);
  3850. ctx->extra_certs = NULL;
  3851. break;
  3852. case SSL_CTRL_CHAIN:
  3853. if (larg)
  3854. return ssl_cert_set1_chain(NULL, ctx, (STACK_OF(X509) *)parg);
  3855. else
  3856. return ssl_cert_set0_chain(NULL, ctx, (STACK_OF(X509) *)parg);
  3857. case SSL_CTRL_CHAIN_CERT:
  3858. if (larg)
  3859. return ssl_cert_add1_chain_cert(NULL, ctx, (X509 *)parg);
  3860. else
  3861. return ssl_cert_add0_chain_cert(NULL, ctx, (X509 *)parg);
  3862. case SSL_CTRL_GET_CHAIN_CERTS:
  3863. *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
  3864. break;
  3865. case SSL_CTRL_SELECT_CURRENT_CERT:
  3866. return ssl_cert_select_current(ctx->cert, (X509 *)parg);
  3867. case SSL_CTRL_SET_CURRENT_CERT:
  3868. return ssl_cert_set_current(ctx->cert, larg);
  3869. default:
  3870. return 0;
  3871. }
  3872. return 1;
  3873. }
  3874. long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void))
  3875. {
  3876. switch (cmd) {
  3877. #ifndef OPENSSL_NO_DH
  3878. case SSL_CTRL_SET_TMP_DH_CB:
  3879. {
  3880. ctx->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
  3881. }
  3882. break;
  3883. #endif
  3884. case SSL_CTRL_SET_TLSEXT_SERVERNAME_CB:
  3885. ctx->ext.servername_cb = (int (*)(SSL *, int *, void *))fp;
  3886. break;
  3887. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB:
  3888. ctx->ext.status_cb = (int (*)(SSL *, void *))fp;
  3889. break;
  3890. case SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB:
  3891. ctx->ext.ticket_key_cb = (int (*)(SSL *, unsigned char *,
  3892. unsigned char *,
  3893. EVP_CIPHER_CTX *,
  3894. HMAC_CTX *, int))fp;
  3895. break;
  3896. #ifndef OPENSSL_NO_SRP
  3897. case SSL_CTRL_SET_SRP_VERIFY_PARAM_CB:
  3898. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3899. ctx->srp_ctx.SRP_verify_param_callback = (int (*)(SSL *, void *))fp;
  3900. break;
  3901. case SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB:
  3902. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3903. ctx->srp_ctx.TLS_ext_srp_username_callback =
  3904. (int (*)(SSL *, int *, void *))fp;
  3905. break;
  3906. case SSL_CTRL_SET_SRP_GIVE_CLIENT_PWD_CB:
  3907. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3908. ctx->srp_ctx.SRP_give_srp_client_pwd_callback =
  3909. (char *(*)(SSL *, void *))fp;
  3910. break;
  3911. #endif
  3912. case SSL_CTRL_SET_NOT_RESUMABLE_SESS_CB:
  3913. {
  3914. ctx->not_resumable_session_cb = (int (*)(SSL *, int))fp;
  3915. }
  3916. break;
  3917. default:
  3918. return 0;
  3919. }
  3920. return 1;
  3921. }
  3922. const SSL_CIPHER *ssl3_get_cipher_by_id(uint32_t id)
  3923. {
  3924. SSL_CIPHER c;
  3925. const SSL_CIPHER *cp;
  3926. c.id = id;
  3927. cp = OBJ_bsearch_ssl_cipher_id(&c, tls13_ciphers, TLS13_NUM_CIPHERS);
  3928. if (cp != NULL)
  3929. return cp;
  3930. cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
  3931. if (cp != NULL)
  3932. return cp;
  3933. return OBJ_bsearch_ssl_cipher_id(&c, ssl3_scsvs, SSL3_NUM_SCSVS);
  3934. }
  3935. const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname)
  3936. {
  3937. SSL_CIPHER *c = NULL, *tbl;
  3938. SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers};
  3939. size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS};
  3940. /* this is not efficient, necessary to optimize this? */
  3941. for (j = 0; j < OSSL_NELEM(alltabs); j++) {
  3942. for (i = 0, tbl = alltabs[j]; i < tblsize[j]; i++, tbl++) {
  3943. if (tbl->stdname == NULL)
  3944. continue;
  3945. if (strcmp(stdname, tbl->stdname) == 0) {
  3946. c = tbl;
  3947. break;
  3948. }
  3949. }
  3950. }
  3951. if (c == NULL) {
  3952. tbl = ssl3_scsvs;
  3953. for (i = 0; i < SSL3_NUM_SCSVS; i++, tbl++) {
  3954. if (strcmp(stdname, tbl->stdname) == 0) {
  3955. c = tbl;
  3956. break;
  3957. }
  3958. }
  3959. }
  3960. return c;
  3961. }
  3962. /*
  3963. * This function needs to check if the ciphers required are actually
  3964. * available
  3965. */
  3966. const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p)
  3967. {
  3968. return ssl3_get_cipher_by_id(SSL3_CK_CIPHERSUITE_FLAG
  3969. | ((uint32_t)p[0] << 8L)
  3970. | (uint32_t)p[1]);
  3971. }
  3972. int ssl3_put_cipher_by_char(const SSL_CIPHER *c, WPACKET *pkt, size_t *len)
  3973. {
  3974. if ((c->id & 0xff000000) != SSL3_CK_CIPHERSUITE_FLAG) {
  3975. *len = 0;
  3976. return 1;
  3977. }
  3978. if (!WPACKET_put_bytes_u16(pkt, c->id & 0xffff))
  3979. return 0;
  3980. *len = 2;
  3981. return 1;
  3982. }
  3983. /*
  3984. * ssl3_choose_cipher - choose a cipher from those offered by the client
  3985. * @s: SSL connection
  3986. * @clnt: ciphers offered by the client
  3987. * @srvr: ciphers enabled on the server?
  3988. *
  3989. * Returns the selected cipher or NULL when no common ciphers.
  3990. */
  3991. const SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
  3992. STACK_OF(SSL_CIPHER) *srvr)
  3993. {
  3994. const SSL_CIPHER *c, *ret = NULL;
  3995. STACK_OF(SSL_CIPHER) *prio, *allow;
  3996. int i, ii, ok, prefer_sha256 = 0;
  3997. unsigned long alg_k = 0, alg_a = 0, mask_k = 0, mask_a = 0;
  3998. const EVP_MD *mdsha256 = EVP_sha256();
  3999. #ifndef OPENSSL_NO_CHACHA
  4000. STACK_OF(SSL_CIPHER) *prio_chacha = NULL;
  4001. #endif
  4002. /* Let's see which ciphers we can support */
  4003. /*
  4004. * Do not set the compare functions, because this may lead to a
  4005. * reordering by "id". We want to keep the original ordering. We may pay
  4006. * a price in performance during sk_SSL_CIPHER_find(), but would have to
  4007. * pay with the price of sk_SSL_CIPHER_dup().
  4008. */
  4009. OSSL_TRACE_BEGIN(TLS_CIPHER) {
  4010. BIO_printf(trc_out, "Server has %d from %p:\n",
  4011. sk_SSL_CIPHER_num(srvr), (void *)srvr);
  4012. for (i = 0; i < sk_SSL_CIPHER_num(srvr); ++i) {
  4013. c = sk_SSL_CIPHER_value(srvr, i);
  4014. BIO_printf(trc_out, "%p:%s\n", (void *)c, c->name);
  4015. }
  4016. BIO_printf(trc_out, "Client sent %d from %p:\n",
  4017. sk_SSL_CIPHER_num(clnt), (void *)clnt);
  4018. for (i = 0; i < sk_SSL_CIPHER_num(clnt); ++i) {
  4019. c = sk_SSL_CIPHER_value(clnt, i);
  4020. BIO_printf(trc_out, "%p:%s\n", (void *)c, c->name);
  4021. }
  4022. } OSSL_TRACE_END(TLS_CIPHER);
  4023. /* SUITE-B takes precedence over server preference and ChaCha priortiy */
  4024. if (tls1_suiteb(s)) {
  4025. prio = srvr;
  4026. allow = clnt;
  4027. } else if (s->options & SSL_OP_CIPHER_SERVER_PREFERENCE) {
  4028. prio = srvr;
  4029. allow = clnt;
  4030. #ifndef OPENSSL_NO_CHACHA
  4031. /* If ChaCha20 is at the top of the client preference list,
  4032. and there are ChaCha20 ciphers in the server list, then
  4033. temporarily prioritize all ChaCha20 ciphers in the servers list. */
  4034. if (s->options & SSL_OP_PRIORITIZE_CHACHA && sk_SSL_CIPHER_num(clnt) > 0) {
  4035. c = sk_SSL_CIPHER_value(clnt, 0);
  4036. if (c->algorithm_enc == SSL_CHACHA20POLY1305) {
  4037. /* ChaCha20 is client preferred, check server... */
  4038. int num = sk_SSL_CIPHER_num(srvr);
  4039. int found = 0;
  4040. for (i = 0; i < num; i++) {
  4041. c = sk_SSL_CIPHER_value(srvr, i);
  4042. if (c->algorithm_enc == SSL_CHACHA20POLY1305) {
  4043. found = 1;
  4044. break;
  4045. }
  4046. }
  4047. if (found) {
  4048. prio_chacha = sk_SSL_CIPHER_new_reserve(NULL, num);
  4049. /* if reserve fails, then there's likely a memory issue */
  4050. if (prio_chacha != NULL) {
  4051. /* Put all ChaCha20 at the top, starting with the one we just found */
  4052. sk_SSL_CIPHER_push(prio_chacha, c);
  4053. for (i++; i < num; i++) {
  4054. c = sk_SSL_CIPHER_value(srvr, i);
  4055. if (c->algorithm_enc == SSL_CHACHA20POLY1305)
  4056. sk_SSL_CIPHER_push(prio_chacha, c);
  4057. }
  4058. /* Pull in the rest */
  4059. for (i = 0; i < num; i++) {
  4060. c = sk_SSL_CIPHER_value(srvr, i);
  4061. if (c->algorithm_enc != SSL_CHACHA20POLY1305)
  4062. sk_SSL_CIPHER_push(prio_chacha, c);
  4063. }
  4064. prio = prio_chacha;
  4065. }
  4066. }
  4067. }
  4068. }
  4069. # endif
  4070. } else {
  4071. prio = clnt;
  4072. allow = srvr;
  4073. }
  4074. if (SSL_IS_TLS13(s)) {
  4075. #ifndef OPENSSL_NO_PSK
  4076. int j;
  4077. /*
  4078. * If we allow "old" style PSK callbacks, and we have no certificate (so
  4079. * we're not going to succeed without a PSK anyway), and we're in
  4080. * TLSv1.3 then the default hash for a PSK is SHA-256 (as per the
  4081. * TLSv1.3 spec). Therefore we should prioritise ciphersuites using
  4082. * that.
  4083. */
  4084. if (s->psk_server_callback != NULL) {
  4085. for (j = 0; j < SSL_PKEY_NUM && !ssl_has_cert(s, j); j++);
  4086. if (j == SSL_PKEY_NUM) {
  4087. /* There are no certificates */
  4088. prefer_sha256 = 1;
  4089. }
  4090. }
  4091. #endif
  4092. } else {
  4093. tls1_set_cert_validity(s);
  4094. ssl_set_masks(s);
  4095. }
  4096. for (i = 0; i < sk_SSL_CIPHER_num(prio); i++) {
  4097. c = sk_SSL_CIPHER_value(prio, i);
  4098. /* Skip ciphers not supported by the protocol version */
  4099. if (!SSL_IS_DTLS(s) &&
  4100. ((s->version < c->min_tls) || (s->version > c->max_tls)))
  4101. continue;
  4102. if (SSL_IS_DTLS(s) &&
  4103. (DTLS_VERSION_LT(s->version, c->min_dtls) ||
  4104. DTLS_VERSION_GT(s->version, c->max_dtls)))
  4105. continue;
  4106. /*
  4107. * Since TLS 1.3 ciphersuites can be used with any auth or
  4108. * key exchange scheme skip tests.
  4109. */
  4110. if (!SSL_IS_TLS13(s)) {
  4111. mask_k = s->s3.tmp.mask_k;
  4112. mask_a = s->s3.tmp.mask_a;
  4113. #ifndef OPENSSL_NO_SRP
  4114. if (s->srp_ctx.srp_Mask & SSL_kSRP) {
  4115. mask_k |= SSL_kSRP;
  4116. mask_a |= SSL_aSRP;
  4117. }
  4118. #endif
  4119. alg_k = c->algorithm_mkey;
  4120. alg_a = c->algorithm_auth;
  4121. #ifndef OPENSSL_NO_PSK
  4122. /* with PSK there must be server callback set */
  4123. if ((alg_k & SSL_PSK) && s->psk_server_callback == NULL)
  4124. continue;
  4125. #endif /* OPENSSL_NO_PSK */
  4126. ok = (alg_k & mask_k) && (alg_a & mask_a);
  4127. OSSL_TRACE7(TLS_CIPHER,
  4128. "%d:[%08lX:%08lX:%08lX:%08lX]%p:%s\n",
  4129. ok, alg_k, alg_a, mask_k, mask_a, (void *)c, c->name);
  4130. #ifndef OPENSSL_NO_EC
  4131. /*
  4132. * if we are considering an ECC cipher suite that uses an ephemeral
  4133. * EC key check it
  4134. */
  4135. if (alg_k & SSL_kECDHE)
  4136. ok = ok && tls1_check_ec_tmp_key(s, c->id);
  4137. #endif /* OPENSSL_NO_EC */
  4138. if (!ok)
  4139. continue;
  4140. }
  4141. ii = sk_SSL_CIPHER_find(allow, c);
  4142. if (ii >= 0) {
  4143. /* Check security callback permits this cipher */
  4144. if (!ssl_security(s, SSL_SECOP_CIPHER_SHARED,
  4145. c->strength_bits, 0, (void *)c))
  4146. continue;
  4147. #if !defined(OPENSSL_NO_EC)
  4148. if ((alg_k & SSL_kECDHE) && (alg_a & SSL_aECDSA)
  4149. && s->s3.is_probably_safari) {
  4150. if (!ret)
  4151. ret = sk_SSL_CIPHER_value(allow, ii);
  4152. continue;
  4153. }
  4154. #endif
  4155. if (prefer_sha256) {
  4156. const SSL_CIPHER *tmp = sk_SSL_CIPHER_value(allow, ii);
  4157. if (ssl_md(tmp->algorithm2) == mdsha256) {
  4158. ret = tmp;
  4159. break;
  4160. }
  4161. if (ret == NULL)
  4162. ret = tmp;
  4163. continue;
  4164. }
  4165. ret = sk_SSL_CIPHER_value(allow, ii);
  4166. break;
  4167. }
  4168. }
  4169. #ifndef OPENSSL_NO_CHACHA
  4170. sk_SSL_CIPHER_free(prio_chacha);
  4171. #endif
  4172. return ret;
  4173. }
  4174. int ssl3_get_req_cert_type(SSL *s, WPACKET *pkt)
  4175. {
  4176. uint32_t alg_k, alg_a = 0;
  4177. /* If we have custom certificate types set, use them */
  4178. if (s->cert->ctype)
  4179. return WPACKET_memcpy(pkt, s->cert->ctype, s->cert->ctype_len);
  4180. /* Get mask of algorithms disabled by signature list */
  4181. ssl_set_sig_mask(&alg_a, s, SSL_SECOP_SIGALG_MASK);
  4182. alg_k = s->s3.tmp.new_cipher->algorithm_mkey;
  4183. #ifndef OPENSSL_NO_GOST
  4184. if (s->version >= TLS1_VERSION && (alg_k & SSL_kGOST))
  4185. return WPACKET_put_bytes_u8(pkt, TLS_CT_GOST01_SIGN)
  4186. && WPACKET_put_bytes_u8(pkt, TLS_CT_GOST12_SIGN)
  4187. && WPACKET_put_bytes_u8(pkt, TLS_CT_GOST12_512_SIGN);
  4188. #endif
  4189. if ((s->version == SSL3_VERSION) && (alg_k & SSL_kDHE)) {
  4190. #ifndef OPENSSL_NO_DH
  4191. # ifndef OPENSSL_NO_RSA
  4192. if (!WPACKET_put_bytes_u8(pkt, SSL3_CT_RSA_EPHEMERAL_DH))
  4193. return 0;
  4194. # endif
  4195. # ifndef OPENSSL_NO_DSA
  4196. if (!WPACKET_put_bytes_u8(pkt, SSL3_CT_DSS_EPHEMERAL_DH))
  4197. return 0;
  4198. # endif
  4199. #endif /* !OPENSSL_NO_DH */
  4200. }
  4201. #ifndef OPENSSL_NO_RSA
  4202. if (!(alg_a & SSL_aRSA) && !WPACKET_put_bytes_u8(pkt, SSL3_CT_RSA_SIGN))
  4203. return 0;
  4204. #endif
  4205. #ifndef OPENSSL_NO_DSA
  4206. if (!(alg_a & SSL_aDSS) && !WPACKET_put_bytes_u8(pkt, SSL3_CT_DSS_SIGN))
  4207. return 0;
  4208. #endif
  4209. #ifndef OPENSSL_NO_EC
  4210. /*
  4211. * ECDSA certs can be used with RSA cipher suites too so we don't
  4212. * need to check for SSL_kECDH or SSL_kECDHE
  4213. */
  4214. if (s->version >= TLS1_VERSION
  4215. && !(alg_a & SSL_aECDSA)
  4216. && !WPACKET_put_bytes_u8(pkt, TLS_CT_ECDSA_SIGN))
  4217. return 0;
  4218. #endif
  4219. return 1;
  4220. }
  4221. static int ssl3_set_req_cert_type(CERT *c, const unsigned char *p, size_t len)
  4222. {
  4223. OPENSSL_free(c->ctype);
  4224. c->ctype = NULL;
  4225. c->ctype_len = 0;
  4226. if (p == NULL || len == 0)
  4227. return 1;
  4228. if (len > 0xff)
  4229. return 0;
  4230. c->ctype = OPENSSL_memdup(p, len);
  4231. if (c->ctype == NULL)
  4232. return 0;
  4233. c->ctype_len = len;
  4234. return 1;
  4235. }
  4236. int ssl3_shutdown(SSL *s)
  4237. {
  4238. int ret;
  4239. /*
  4240. * Don't do anything much if we have not done the handshake or we don't
  4241. * want to send messages :-)
  4242. */
  4243. if (s->quiet_shutdown || SSL_in_before(s)) {
  4244. s->shutdown = (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
  4245. return 1;
  4246. }
  4247. if (!(s->shutdown & SSL_SENT_SHUTDOWN)) {
  4248. s->shutdown |= SSL_SENT_SHUTDOWN;
  4249. ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_CLOSE_NOTIFY);
  4250. /*
  4251. * our shutdown alert has been sent now, and if it still needs to be
  4252. * written, s->s3.alert_dispatch will be true
  4253. */
  4254. if (s->s3.alert_dispatch)
  4255. return -1; /* return WANT_WRITE */
  4256. } else if (s->s3.alert_dispatch) {
  4257. /* resend it if not sent */
  4258. ret = s->method->ssl_dispatch_alert(s);
  4259. if (ret == -1) {
  4260. /*
  4261. * we only get to return -1 here the 2nd/Nth invocation, we must
  4262. * have already signalled return 0 upon a previous invocation,
  4263. * return WANT_WRITE
  4264. */
  4265. return ret;
  4266. }
  4267. } else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) {
  4268. size_t readbytes;
  4269. /*
  4270. * If we are waiting for a close from our peer, we are closed
  4271. */
  4272. s->method->ssl_read_bytes(s, 0, NULL, NULL, 0, 0, &readbytes);
  4273. if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) {
  4274. return -1; /* return WANT_READ */
  4275. }
  4276. }
  4277. if ((s->shutdown == (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN)) &&
  4278. !s->s3.alert_dispatch)
  4279. return 1;
  4280. else
  4281. return 0;
  4282. }
  4283. int ssl3_write(SSL *s, const void *buf, size_t len, size_t *written)
  4284. {
  4285. clear_sys_error();
  4286. if (s->s3.renegotiate)
  4287. ssl3_renegotiate_check(s, 0);
  4288. return s->method->ssl_write_bytes(s, SSL3_RT_APPLICATION_DATA, buf, len,
  4289. written);
  4290. }
  4291. static int ssl3_read_internal(SSL *s, void *buf, size_t len, int peek,
  4292. size_t *readbytes)
  4293. {
  4294. int ret;
  4295. clear_sys_error();
  4296. if (s->s3.renegotiate)
  4297. ssl3_renegotiate_check(s, 0);
  4298. s->s3.in_read_app_data = 1;
  4299. ret =
  4300. s->method->ssl_read_bytes(s, SSL3_RT_APPLICATION_DATA, NULL, buf, len,
  4301. peek, readbytes);
  4302. if ((ret == -1) && (s->s3.in_read_app_data == 2)) {
  4303. /*
  4304. * ssl3_read_bytes decided to call s->handshake_func, which called
  4305. * ssl3_read_bytes to read handshake data. However, ssl3_read_bytes
  4306. * actually found application data and thinks that application data
  4307. * makes sense here; so disable handshake processing and try to read
  4308. * application data again.
  4309. */
  4310. ossl_statem_set_in_handshake(s, 1);
  4311. ret =
  4312. s->method->ssl_read_bytes(s, SSL3_RT_APPLICATION_DATA, NULL, buf,
  4313. len, peek, readbytes);
  4314. ossl_statem_set_in_handshake(s, 0);
  4315. } else
  4316. s->s3.in_read_app_data = 0;
  4317. return ret;
  4318. }
  4319. int ssl3_read(SSL *s, void *buf, size_t len, size_t *readbytes)
  4320. {
  4321. return ssl3_read_internal(s, buf, len, 0, readbytes);
  4322. }
  4323. int ssl3_peek(SSL *s, void *buf, size_t len, size_t *readbytes)
  4324. {
  4325. return ssl3_read_internal(s, buf, len, 1, readbytes);
  4326. }
  4327. int ssl3_renegotiate(SSL *s)
  4328. {
  4329. if (s->handshake_func == NULL)
  4330. return 1;
  4331. s->s3.renegotiate = 1;
  4332. return 1;
  4333. }
  4334. /*
  4335. * Check if we are waiting to do a renegotiation and if so whether now is a
  4336. * good time to do it. If |initok| is true then we are being called from inside
  4337. * the state machine so ignore the result of SSL_in_init(s). Otherwise we
  4338. * should not do a renegotiation if SSL_in_init(s) is true. Returns 1 if we
  4339. * should do a renegotiation now and sets up the state machine for it. Otherwise
  4340. * returns 0.
  4341. */
  4342. int ssl3_renegotiate_check(SSL *s, int initok)
  4343. {
  4344. int ret = 0;
  4345. if (s->s3.renegotiate) {
  4346. if (!RECORD_LAYER_read_pending(&s->rlayer)
  4347. && !RECORD_LAYER_write_pending(&s->rlayer)
  4348. && (initok || !SSL_in_init(s))) {
  4349. /*
  4350. * if we are the server, and we have sent a 'RENEGOTIATE'
  4351. * message, we need to set the state machine into the renegotiate
  4352. * state.
  4353. */
  4354. ossl_statem_set_renegotiate(s);
  4355. s->s3.renegotiate = 0;
  4356. s->s3.num_renegotiations++;
  4357. s->s3.total_renegotiations++;
  4358. ret = 1;
  4359. }
  4360. }
  4361. return ret;
  4362. }
  4363. /*
  4364. * If we are using default SHA1+MD5 algorithms switch to new SHA256 PRF and
  4365. * handshake macs if required.
  4366. *
  4367. * If PSK and using SHA384 for TLS < 1.2 switch to default.
  4368. */
  4369. long ssl_get_algorithm2(SSL *s)
  4370. {
  4371. long alg2;
  4372. if (s->s3.tmp.new_cipher == NULL)
  4373. return -1;
  4374. alg2 = s->s3.tmp.new_cipher->algorithm2;
  4375. if (s->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SHA256_PRF) {
  4376. if (alg2 == (SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF))
  4377. return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256;
  4378. } else if (s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK) {
  4379. if (alg2 == (SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384))
  4380. return SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF;
  4381. }
  4382. return alg2;
  4383. }
  4384. /*
  4385. * Fill a ClientRandom or ServerRandom field of length len. Returns <= 0 on
  4386. * failure, 1 on success.
  4387. */
  4388. int ssl_fill_hello_random(SSL *s, int server, unsigned char *result, size_t len,
  4389. DOWNGRADE dgrd)
  4390. {
  4391. int send_time = 0, ret;
  4392. if (len < 4)
  4393. return 0;
  4394. if (server)
  4395. send_time = (s->mode & SSL_MODE_SEND_SERVERHELLO_TIME) != 0;
  4396. else
  4397. send_time = (s->mode & SSL_MODE_SEND_CLIENTHELLO_TIME) != 0;
  4398. if (send_time) {
  4399. unsigned long Time = (unsigned long)time(NULL);
  4400. unsigned char *p = result;
  4401. l2n(Time, p);
  4402. ret = RAND_bytes(p, len - 4);
  4403. } else {
  4404. ret = RAND_bytes(result, len);
  4405. }
  4406. if (ret > 0) {
  4407. if (!ossl_assert(sizeof(tls11downgrade) < len)
  4408. || !ossl_assert(sizeof(tls12downgrade) < len))
  4409. return 0;
  4410. if (dgrd == DOWNGRADE_TO_1_2)
  4411. memcpy(result + len - sizeof(tls12downgrade), tls12downgrade,
  4412. sizeof(tls12downgrade));
  4413. else if (dgrd == DOWNGRADE_TO_1_1)
  4414. memcpy(result + len - sizeof(tls11downgrade), tls11downgrade,
  4415. sizeof(tls11downgrade));
  4416. }
  4417. return ret;
  4418. }
  4419. int ssl_generate_master_secret(SSL *s, unsigned char *pms, size_t pmslen,
  4420. int free_pms)
  4421. {
  4422. unsigned long alg_k = s->s3.tmp.new_cipher->algorithm_mkey;
  4423. int ret = 0;
  4424. if (alg_k & SSL_PSK) {
  4425. #ifndef OPENSSL_NO_PSK
  4426. unsigned char *pskpms, *t;
  4427. size_t psklen = s->s3.tmp.psklen;
  4428. size_t pskpmslen;
  4429. /* create PSK premaster_secret */
  4430. /* For plain PSK "other_secret" is psklen zeroes */
  4431. if (alg_k & SSL_kPSK)
  4432. pmslen = psklen;
  4433. pskpmslen = 4 + pmslen + psklen;
  4434. pskpms = OPENSSL_malloc(pskpmslen);
  4435. if (pskpms == NULL)
  4436. goto err;
  4437. t = pskpms;
  4438. s2n(pmslen, t);
  4439. if (alg_k & SSL_kPSK)
  4440. memset(t, 0, pmslen);
  4441. else
  4442. memcpy(t, pms, pmslen);
  4443. t += pmslen;
  4444. s2n(psklen, t);
  4445. memcpy(t, s->s3.tmp.psk, psklen);
  4446. OPENSSL_clear_free(s->s3.tmp.psk, psklen);
  4447. s->s3.tmp.psk = NULL;
  4448. if (!s->method->ssl3_enc->generate_master_secret(s,
  4449. s->session->master_key,pskpms, pskpmslen,
  4450. &s->session->master_key_length)) {
  4451. OPENSSL_clear_free(pskpms, pskpmslen);
  4452. /* SSLfatal() already called */
  4453. goto err;
  4454. }
  4455. OPENSSL_clear_free(pskpms, pskpmslen);
  4456. #else
  4457. /* Should never happen */
  4458. goto err;
  4459. #endif
  4460. } else {
  4461. if (!s->method->ssl3_enc->generate_master_secret(s,
  4462. s->session->master_key, pms, pmslen,
  4463. &s->session->master_key_length)) {
  4464. /* SSLfatal() already called */
  4465. goto err;
  4466. }
  4467. }
  4468. ret = 1;
  4469. err:
  4470. if (pms) {
  4471. if (free_pms)
  4472. OPENSSL_clear_free(pms, pmslen);
  4473. else
  4474. OPENSSL_cleanse(pms, pmslen);
  4475. }
  4476. if (s->server == 0)
  4477. s->s3.tmp.pms = NULL;
  4478. return ret;
  4479. }
  4480. /* Generate a private key from parameters */
  4481. EVP_PKEY *ssl_generate_pkey(EVP_PKEY *pm)
  4482. {
  4483. EVP_PKEY_CTX *pctx = NULL;
  4484. EVP_PKEY *pkey = NULL;
  4485. if (pm == NULL)
  4486. return NULL;
  4487. pctx = EVP_PKEY_CTX_new(pm, NULL);
  4488. if (pctx == NULL)
  4489. goto err;
  4490. if (EVP_PKEY_keygen_init(pctx) <= 0)
  4491. goto err;
  4492. if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
  4493. EVP_PKEY_free(pkey);
  4494. pkey = NULL;
  4495. }
  4496. err:
  4497. EVP_PKEY_CTX_free(pctx);
  4498. return pkey;
  4499. }
  4500. /* Generate a private key from a group ID */
  4501. #if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC)
  4502. EVP_PKEY *ssl_generate_pkey_group(SSL *s, uint16_t id)
  4503. {
  4504. const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(id);
  4505. EVP_PKEY_CTX *pctx = NULL;
  4506. EVP_PKEY *pkey = NULL;
  4507. uint16_t gtype;
  4508. # ifndef OPENSSL_NO_DH
  4509. DH *dh = NULL;
  4510. # endif
  4511. if (ginf == NULL) {
  4512. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4513. ERR_R_INTERNAL_ERROR);
  4514. goto err;
  4515. }
  4516. gtype = ginf->flags & TLS_GROUP_TYPE;
  4517. # ifndef OPENSSL_NO_DH
  4518. if (gtype == TLS_GROUP_FFDHE)
  4519. pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_DH, NULL);
  4520. # ifndef OPENSSL_NO_EC
  4521. else
  4522. # endif
  4523. # endif
  4524. # ifndef OPENSSL_NO_EC
  4525. {
  4526. if (gtype == TLS_GROUP_CURVE_CUSTOM)
  4527. pctx = EVP_PKEY_CTX_new_id(ginf->nid, NULL);
  4528. else
  4529. pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, NULL);
  4530. }
  4531. # endif
  4532. if (pctx == NULL) {
  4533. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4534. ERR_R_MALLOC_FAILURE);
  4535. goto err;
  4536. }
  4537. if (EVP_PKEY_keygen_init(pctx) <= 0) {
  4538. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4539. ERR_R_EVP_LIB);
  4540. goto err;
  4541. }
  4542. # ifndef OPENSSL_NO_DH
  4543. if (gtype == TLS_GROUP_FFDHE) {
  4544. if ((pkey = EVP_PKEY_new()) == NULL
  4545. || (dh = DH_new_by_nid(ginf->nid)) == NULL
  4546. || !EVP_PKEY_assign(pkey, EVP_PKEY_DH, dh)) {
  4547. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4548. ERR_R_EVP_LIB);
  4549. DH_free(dh);
  4550. EVP_PKEY_free(pkey);
  4551. pkey = NULL;
  4552. goto err;
  4553. }
  4554. if (EVP_PKEY_CTX_set_dh_nid(pctx, ginf->nid) <= 0) {
  4555. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4556. ERR_R_EVP_LIB);
  4557. EVP_PKEY_free(pkey);
  4558. pkey = NULL;
  4559. goto err;
  4560. }
  4561. }
  4562. # ifndef OPENSSL_NO_EC
  4563. else
  4564. # endif
  4565. # endif
  4566. # ifndef OPENSSL_NO_EC
  4567. {
  4568. if (gtype != TLS_GROUP_CURVE_CUSTOM
  4569. && EVP_PKEY_CTX_set_ec_paramgen_curve_nid(pctx, ginf->nid) <= 0) {
  4570. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4571. ERR_R_EVP_LIB);
  4572. goto err;
  4573. }
  4574. }
  4575. # endif
  4576. if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
  4577. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4578. ERR_R_EVP_LIB);
  4579. EVP_PKEY_free(pkey);
  4580. pkey = NULL;
  4581. }
  4582. err:
  4583. EVP_PKEY_CTX_free(pctx);
  4584. return pkey;
  4585. }
  4586. #endif
  4587. /*
  4588. * Generate parameters from a group ID
  4589. */
  4590. EVP_PKEY *ssl_generate_param_group(uint16_t id)
  4591. {
  4592. EVP_PKEY_CTX *pctx = NULL;
  4593. EVP_PKEY *pkey = NULL;
  4594. const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(id);
  4595. int pkey_ctx_id;
  4596. if (ginf == NULL)
  4597. goto err;
  4598. if ((ginf->flags & TLS_GROUP_TYPE) == TLS_GROUP_CURVE_CUSTOM) {
  4599. pkey = EVP_PKEY_new();
  4600. if (pkey != NULL && EVP_PKEY_set_type(pkey, ginf->nid))
  4601. return pkey;
  4602. EVP_PKEY_free(pkey);
  4603. return NULL;
  4604. }
  4605. pkey_ctx_id = (ginf->flags & TLS_GROUP_FFDHE)
  4606. ? EVP_PKEY_DH : EVP_PKEY_EC;
  4607. pctx = EVP_PKEY_CTX_new_id(pkey_ctx_id, NULL);
  4608. if (pctx == NULL)
  4609. goto err;
  4610. if (EVP_PKEY_paramgen_init(pctx) <= 0)
  4611. goto err;
  4612. # ifndef OPENSSL_NO_DH
  4613. if (ginf->flags & TLS_GROUP_FFDHE) {
  4614. if (EVP_PKEY_CTX_set_dh_nid(pctx, ginf->nid) <= 0)
  4615. goto err;
  4616. }
  4617. # ifndef OPENSSL_NO_EC
  4618. else
  4619. # endif
  4620. # endif
  4621. # ifndef OPENSSL_NO_EC
  4622. {
  4623. if (EVP_PKEY_CTX_set_ec_paramgen_curve_nid(pctx, ginf->nid) <= 0)
  4624. goto err;
  4625. }
  4626. # endif
  4627. if (EVP_PKEY_paramgen(pctx, &pkey) <= 0) {
  4628. EVP_PKEY_free(pkey);
  4629. pkey = NULL;
  4630. }
  4631. err:
  4632. EVP_PKEY_CTX_free(pctx);
  4633. return pkey;
  4634. }
  4635. /* Derive secrets for ECDH/DH */
  4636. int ssl_derive(SSL *s, EVP_PKEY *privkey, EVP_PKEY *pubkey, int gensecret)
  4637. {
  4638. int rv = 0;
  4639. unsigned char *pms = NULL;
  4640. size_t pmslen = 0;
  4641. EVP_PKEY_CTX *pctx;
  4642. if (privkey == NULL || pubkey == NULL) {
  4643. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_DERIVE,
  4644. ERR_R_INTERNAL_ERROR);
  4645. return 0;
  4646. }
  4647. pctx = EVP_PKEY_CTX_new(privkey, NULL);
  4648. if (EVP_PKEY_derive_init(pctx) <= 0
  4649. || EVP_PKEY_derive_set_peer(pctx, pubkey) <= 0
  4650. || EVP_PKEY_derive(pctx, NULL, &pmslen) <= 0) {
  4651. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_DERIVE,
  4652. ERR_R_INTERNAL_ERROR);
  4653. goto err;
  4654. }
  4655. #ifndef OPENSSL_NO_DH
  4656. if (SSL_IS_TLS13(s) && EVP_PKEY_id(privkey) == EVP_PKEY_DH)
  4657. EVP_PKEY_CTX_set_dh_pad(pctx, 1);
  4658. #endif
  4659. pms = OPENSSL_malloc(pmslen);
  4660. if (pms == NULL) {
  4661. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_DERIVE,
  4662. ERR_R_MALLOC_FAILURE);
  4663. goto err;
  4664. }
  4665. if (EVP_PKEY_derive(pctx, pms, &pmslen) <= 0) {
  4666. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_DERIVE,
  4667. ERR_R_INTERNAL_ERROR);
  4668. goto err;
  4669. }
  4670. if (gensecret) {
  4671. /* SSLfatal() called as appropriate in the below functions */
  4672. if (SSL_IS_TLS13(s)) {
  4673. /*
  4674. * If we are resuming then we already generated the early secret
  4675. * when we created the ClientHello, so don't recreate it.
  4676. */
  4677. if (!s->hit)
  4678. rv = tls13_generate_secret(s, ssl_handshake_md(s), NULL, NULL,
  4679. 0,
  4680. (unsigned char *)&s->early_secret);
  4681. else
  4682. rv = 1;
  4683. rv = rv && tls13_generate_handshake_secret(s, pms, pmslen);
  4684. } else {
  4685. rv = ssl_generate_master_secret(s, pms, pmslen, 0);
  4686. }
  4687. } else {
  4688. /* Save premaster secret */
  4689. s->s3.tmp.pms = pms;
  4690. s->s3.tmp.pmslen = pmslen;
  4691. pms = NULL;
  4692. rv = 1;
  4693. }
  4694. err:
  4695. OPENSSL_clear_free(pms, pmslen);
  4696. EVP_PKEY_CTX_free(pctx);
  4697. return rv;
  4698. }
  4699. #ifndef OPENSSL_NO_DH
  4700. EVP_PKEY *ssl_dh_to_pkey(DH *dh)
  4701. {
  4702. EVP_PKEY *ret;
  4703. if (dh == NULL)
  4704. return NULL;
  4705. ret = EVP_PKEY_new();
  4706. if (EVP_PKEY_set1_DH(ret, dh) <= 0) {
  4707. EVP_PKEY_free(ret);
  4708. return NULL;
  4709. }
  4710. return ret;
  4711. }
  4712. #endif