s3_lib.c 125 KB

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