s3_lib.c 112 KB

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