s3_lib.c 125 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858
  1. /*
  2. * Copyright 1995-2021 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_local.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. ret = 1;
  3507. break;
  3508. case SSL_CTRL_SELECT_CURRENT_CERT:
  3509. return ssl_cert_select_current(s->cert, (X509 *)parg);
  3510. case SSL_CTRL_SET_CURRENT_CERT:
  3511. if (larg == SSL_CERT_SET_SERVER) {
  3512. const SSL_CIPHER *cipher;
  3513. if (!s->server)
  3514. return 0;
  3515. cipher = s->s3->tmp.new_cipher;
  3516. if (cipher == NULL)
  3517. return 0;
  3518. /*
  3519. * No certificate for unauthenticated ciphersuites or using SRP
  3520. * authentication
  3521. */
  3522. if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  3523. return 2;
  3524. if (s->s3->tmp.cert == NULL)
  3525. return 0;
  3526. s->cert->key = s->s3->tmp.cert;
  3527. return 1;
  3528. }
  3529. return ssl_cert_set_current(s->cert, larg);
  3530. #ifndef OPENSSL_NO_EC
  3531. case SSL_CTRL_GET_GROUPS:
  3532. {
  3533. uint16_t *clist;
  3534. size_t clistlen;
  3535. if (!s->session)
  3536. return 0;
  3537. clist = s->ext.peer_supportedgroups;
  3538. clistlen = s->ext.peer_supportedgroups_len;
  3539. if (parg) {
  3540. size_t i;
  3541. int *cptr = parg;
  3542. for (i = 0; i < clistlen; i++) {
  3543. const TLS_GROUP_INFO *cinf = tls1_group_id_lookup(clist[i]);
  3544. if (cinf != NULL)
  3545. cptr[i] = cinf->nid;
  3546. else
  3547. cptr[i] = TLSEXT_nid_unknown | clist[i];
  3548. }
  3549. }
  3550. return (int)clistlen;
  3551. }
  3552. case SSL_CTRL_SET_GROUPS:
  3553. return tls1_set_groups(&s->ext.supportedgroups,
  3554. &s->ext.supportedgroups_len, parg, larg);
  3555. case SSL_CTRL_SET_GROUPS_LIST:
  3556. return tls1_set_groups_list(&s->ext.supportedgroups,
  3557. &s->ext.supportedgroups_len, parg);
  3558. case SSL_CTRL_GET_SHARED_GROUP:
  3559. {
  3560. uint16_t id = tls1_shared_group(s, larg);
  3561. if (larg != -1) {
  3562. const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(id);
  3563. return ginf == NULL ? 0 : ginf->nid;
  3564. }
  3565. return id;
  3566. }
  3567. #endif
  3568. case SSL_CTRL_SET_SIGALGS:
  3569. return tls1_set_sigalgs(s->cert, parg, larg, 0);
  3570. case SSL_CTRL_SET_SIGALGS_LIST:
  3571. return tls1_set_sigalgs_list(s->cert, parg, 0);
  3572. case SSL_CTRL_SET_CLIENT_SIGALGS:
  3573. return tls1_set_sigalgs(s->cert, parg, larg, 1);
  3574. case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  3575. return tls1_set_sigalgs_list(s->cert, parg, 1);
  3576. case SSL_CTRL_GET_CLIENT_CERT_TYPES:
  3577. {
  3578. const unsigned char **pctype = parg;
  3579. if (s->server || !s->s3->tmp.cert_req)
  3580. return 0;
  3581. if (pctype)
  3582. *pctype = s->s3->tmp.ctype;
  3583. return s->s3->tmp.ctype_len;
  3584. }
  3585. case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  3586. if (!s->server)
  3587. return 0;
  3588. return ssl3_set_req_cert_type(s->cert, parg, larg);
  3589. case SSL_CTRL_BUILD_CERT_CHAIN:
  3590. return ssl_build_cert_chain(s, NULL, larg);
  3591. case SSL_CTRL_SET_VERIFY_CERT_STORE:
  3592. return ssl_cert_set_cert_store(s->cert, parg, 0, larg);
  3593. case SSL_CTRL_SET_CHAIN_CERT_STORE:
  3594. return ssl_cert_set_cert_store(s->cert, parg, 1, larg);
  3595. case SSL_CTRL_GET_PEER_SIGNATURE_NID:
  3596. if (s->s3->tmp.peer_sigalg == NULL)
  3597. return 0;
  3598. *(int *)parg = s->s3->tmp.peer_sigalg->hash;
  3599. return 1;
  3600. case SSL_CTRL_GET_SIGNATURE_NID:
  3601. if (s->s3->tmp.sigalg == NULL)
  3602. return 0;
  3603. *(int *)parg = s->s3->tmp.sigalg->hash;
  3604. return 1;
  3605. case SSL_CTRL_GET_PEER_TMP_KEY:
  3606. #if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC)
  3607. if (s->session == NULL || s->s3->peer_tmp == NULL) {
  3608. return 0;
  3609. } else {
  3610. EVP_PKEY_up_ref(s->s3->peer_tmp);
  3611. *(EVP_PKEY **)parg = s->s3->peer_tmp;
  3612. return 1;
  3613. }
  3614. #else
  3615. return 0;
  3616. #endif
  3617. case SSL_CTRL_GET_TMP_KEY:
  3618. #if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC)
  3619. if (s->session == NULL || s->s3->tmp.pkey == NULL) {
  3620. return 0;
  3621. } else {
  3622. EVP_PKEY_up_ref(s->s3->tmp.pkey);
  3623. *(EVP_PKEY **)parg = s->s3->tmp.pkey;
  3624. return 1;
  3625. }
  3626. #else
  3627. return 0;
  3628. #endif
  3629. #ifndef OPENSSL_NO_EC
  3630. case SSL_CTRL_GET_EC_POINT_FORMATS:
  3631. {
  3632. const unsigned char **pformat = parg;
  3633. if (s->ext.peer_ecpointformats == NULL)
  3634. return 0;
  3635. *pformat = s->ext.peer_ecpointformats;
  3636. return (int)s->ext.peer_ecpointformats_len;
  3637. }
  3638. #endif
  3639. default:
  3640. break;
  3641. }
  3642. return ret;
  3643. }
  3644. long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp) (void))
  3645. {
  3646. int ret = 0;
  3647. switch (cmd) {
  3648. #ifndef OPENSSL_NO_DH
  3649. case SSL_CTRL_SET_TMP_DH_CB:
  3650. {
  3651. s->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
  3652. }
  3653. break;
  3654. #endif
  3655. case SSL_CTRL_SET_TLSEXT_DEBUG_CB:
  3656. s->ext.debug_cb = (void (*)(SSL *, int, int,
  3657. const unsigned char *, int, void *))fp;
  3658. break;
  3659. case SSL_CTRL_SET_NOT_RESUMABLE_SESS_CB:
  3660. {
  3661. s->not_resumable_session_cb = (int (*)(SSL *, int))fp;
  3662. }
  3663. break;
  3664. default:
  3665. break;
  3666. }
  3667. return ret;
  3668. }
  3669. long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
  3670. {
  3671. switch (cmd) {
  3672. #ifndef OPENSSL_NO_DH
  3673. case SSL_CTRL_SET_TMP_DH:
  3674. {
  3675. DH *dh = (DH *)parg;
  3676. EVP_PKEY *pkdh = NULL;
  3677. if (dh == NULL) {
  3678. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_PASSED_NULL_PARAMETER);
  3679. return 0;
  3680. }
  3681. pkdh = ssl_dh_to_pkey(dh);
  3682. if (pkdh == NULL) {
  3683. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_MALLOC_FAILURE);
  3684. return 0;
  3685. }
  3686. if (!ssl_ctx_security(ctx, SSL_SECOP_TMP_DH,
  3687. EVP_PKEY_security_bits(pkdh), 0, pkdh)) {
  3688. SSLerr(SSL_F_SSL3_CTX_CTRL, SSL_R_DH_KEY_TOO_SMALL);
  3689. EVP_PKEY_free(pkdh);
  3690. return 0;
  3691. }
  3692. EVP_PKEY_free(ctx->cert->dh_tmp);
  3693. ctx->cert->dh_tmp = pkdh;
  3694. return 1;
  3695. }
  3696. case SSL_CTRL_SET_TMP_DH_CB:
  3697. {
  3698. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  3699. return 0;
  3700. }
  3701. case SSL_CTRL_SET_DH_AUTO:
  3702. ctx->cert->dh_tmp_auto = larg;
  3703. return 1;
  3704. #endif
  3705. #ifndef OPENSSL_NO_EC
  3706. case SSL_CTRL_SET_TMP_ECDH:
  3707. {
  3708. const EC_GROUP *group = NULL;
  3709. int nid;
  3710. if (parg == NULL) {
  3711. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_PASSED_NULL_PARAMETER);
  3712. return 0;
  3713. }
  3714. group = EC_KEY_get0_group((const EC_KEY *)parg);
  3715. if (group == NULL) {
  3716. SSLerr(SSL_F_SSL3_CTX_CTRL, EC_R_MISSING_PARAMETERS);
  3717. return 0;
  3718. }
  3719. nid = EC_GROUP_get_curve_name(group);
  3720. if (nid == NID_undef)
  3721. return 0;
  3722. return tls1_set_groups(&ctx->ext.supportedgroups,
  3723. &ctx->ext.supportedgroups_len,
  3724. &nid, 1);
  3725. }
  3726. #endif /* !OPENSSL_NO_EC */
  3727. case SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG:
  3728. ctx->ext.servername_arg = parg;
  3729. break;
  3730. case SSL_CTRL_SET_TLSEXT_TICKET_KEYS:
  3731. case SSL_CTRL_GET_TLSEXT_TICKET_KEYS:
  3732. {
  3733. unsigned char *keys = parg;
  3734. long tick_keylen = (sizeof(ctx->ext.tick_key_name) +
  3735. sizeof(ctx->ext.secure->tick_hmac_key) +
  3736. sizeof(ctx->ext.secure->tick_aes_key));
  3737. if (keys == NULL)
  3738. return tick_keylen;
  3739. if (larg != tick_keylen) {
  3740. SSLerr(SSL_F_SSL3_CTX_CTRL, SSL_R_INVALID_TICKET_KEYS_LENGTH);
  3741. return 0;
  3742. }
  3743. if (cmd == SSL_CTRL_SET_TLSEXT_TICKET_KEYS) {
  3744. memcpy(ctx->ext.tick_key_name, keys,
  3745. sizeof(ctx->ext.tick_key_name));
  3746. memcpy(ctx->ext.secure->tick_hmac_key,
  3747. keys + sizeof(ctx->ext.tick_key_name),
  3748. sizeof(ctx->ext.secure->tick_hmac_key));
  3749. memcpy(ctx->ext.secure->tick_aes_key,
  3750. keys + sizeof(ctx->ext.tick_key_name) +
  3751. sizeof(ctx->ext.secure->tick_hmac_key),
  3752. sizeof(ctx->ext.secure->tick_aes_key));
  3753. } else {
  3754. memcpy(keys, ctx->ext.tick_key_name,
  3755. sizeof(ctx->ext.tick_key_name));
  3756. memcpy(keys + sizeof(ctx->ext.tick_key_name),
  3757. ctx->ext.secure->tick_hmac_key,
  3758. sizeof(ctx->ext.secure->tick_hmac_key));
  3759. memcpy(keys + sizeof(ctx->ext.tick_key_name) +
  3760. sizeof(ctx->ext.secure->tick_hmac_key),
  3761. ctx->ext.secure->tick_aes_key,
  3762. sizeof(ctx->ext.secure->tick_aes_key));
  3763. }
  3764. return 1;
  3765. }
  3766. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  3767. return ctx->ext.status_type;
  3768. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  3769. ctx->ext.status_type = larg;
  3770. break;
  3771. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG:
  3772. ctx->ext.status_arg = parg;
  3773. return 1;
  3774. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG:
  3775. *(void**)parg = ctx->ext.status_arg;
  3776. break;
  3777. case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB:
  3778. *(int (**)(SSL*, void*))parg = ctx->ext.status_cb;
  3779. break;
  3780. #ifndef OPENSSL_NO_SRP
  3781. case SSL_CTRL_SET_TLS_EXT_SRP_USERNAME:
  3782. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3783. OPENSSL_free(ctx->srp_ctx.login);
  3784. ctx->srp_ctx.login = NULL;
  3785. if (parg == NULL)
  3786. break;
  3787. if (strlen((const char *)parg) > 255 || strlen((const char *)parg) < 1) {
  3788. SSLerr(SSL_F_SSL3_CTX_CTRL, SSL_R_INVALID_SRP_USERNAME);
  3789. return 0;
  3790. }
  3791. if ((ctx->srp_ctx.login = OPENSSL_strdup((char *)parg)) == NULL) {
  3792. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_INTERNAL_ERROR);
  3793. return 0;
  3794. }
  3795. break;
  3796. case SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD:
  3797. ctx->srp_ctx.SRP_give_srp_client_pwd_callback =
  3798. srp_password_from_info_cb;
  3799. if (ctx->srp_ctx.info != NULL)
  3800. OPENSSL_free(ctx->srp_ctx.info);
  3801. if ((ctx->srp_ctx.info = BUF_strdup((char *)parg)) == NULL) {
  3802. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_INTERNAL_ERROR);
  3803. return 0;
  3804. }
  3805. break;
  3806. case SSL_CTRL_SET_SRP_ARG:
  3807. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3808. ctx->srp_ctx.SRP_cb_arg = parg;
  3809. break;
  3810. case SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH:
  3811. ctx->srp_ctx.strength = larg;
  3812. break;
  3813. #endif
  3814. #ifndef OPENSSL_NO_EC
  3815. case SSL_CTRL_SET_GROUPS:
  3816. return tls1_set_groups(&ctx->ext.supportedgroups,
  3817. &ctx->ext.supportedgroups_len,
  3818. parg, larg);
  3819. case SSL_CTRL_SET_GROUPS_LIST:
  3820. return tls1_set_groups_list(&ctx->ext.supportedgroups,
  3821. &ctx->ext.supportedgroups_len,
  3822. parg);
  3823. #endif
  3824. case SSL_CTRL_SET_SIGALGS:
  3825. return tls1_set_sigalgs(ctx->cert, parg, larg, 0);
  3826. case SSL_CTRL_SET_SIGALGS_LIST:
  3827. return tls1_set_sigalgs_list(ctx->cert, parg, 0);
  3828. case SSL_CTRL_SET_CLIENT_SIGALGS:
  3829. return tls1_set_sigalgs(ctx->cert, parg, larg, 1);
  3830. case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  3831. return tls1_set_sigalgs_list(ctx->cert, parg, 1);
  3832. case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  3833. return ssl3_set_req_cert_type(ctx->cert, parg, larg);
  3834. case SSL_CTRL_BUILD_CERT_CHAIN:
  3835. return ssl_build_cert_chain(NULL, ctx, larg);
  3836. case SSL_CTRL_SET_VERIFY_CERT_STORE:
  3837. return ssl_cert_set_cert_store(ctx->cert, parg, 0, larg);
  3838. case SSL_CTRL_SET_CHAIN_CERT_STORE:
  3839. return ssl_cert_set_cert_store(ctx->cert, parg, 1, larg);
  3840. /* A Thawte special :-) */
  3841. case SSL_CTRL_EXTRA_CHAIN_CERT:
  3842. if (ctx->extra_certs == NULL) {
  3843. if ((ctx->extra_certs = sk_X509_new_null()) == NULL) {
  3844. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_MALLOC_FAILURE);
  3845. return 0;
  3846. }
  3847. }
  3848. if (!sk_X509_push(ctx->extra_certs, (X509 *)parg)) {
  3849. SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_MALLOC_FAILURE);
  3850. return 0;
  3851. }
  3852. break;
  3853. case SSL_CTRL_GET_EXTRA_CHAIN_CERTS:
  3854. if (ctx->extra_certs == NULL && larg == 0)
  3855. *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
  3856. else
  3857. *(STACK_OF(X509) **)parg = ctx->extra_certs;
  3858. break;
  3859. case SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS:
  3860. sk_X509_pop_free(ctx->extra_certs, X509_free);
  3861. ctx->extra_certs = NULL;
  3862. break;
  3863. case SSL_CTRL_CHAIN:
  3864. if (larg)
  3865. return ssl_cert_set1_chain(NULL, ctx, (STACK_OF(X509) *)parg);
  3866. else
  3867. return ssl_cert_set0_chain(NULL, ctx, (STACK_OF(X509) *)parg);
  3868. case SSL_CTRL_CHAIN_CERT:
  3869. if (larg)
  3870. return ssl_cert_add1_chain_cert(NULL, ctx, (X509 *)parg);
  3871. else
  3872. return ssl_cert_add0_chain_cert(NULL, ctx, (X509 *)parg);
  3873. case SSL_CTRL_GET_CHAIN_CERTS:
  3874. *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
  3875. break;
  3876. case SSL_CTRL_SELECT_CURRENT_CERT:
  3877. return ssl_cert_select_current(ctx->cert, (X509 *)parg);
  3878. case SSL_CTRL_SET_CURRENT_CERT:
  3879. return ssl_cert_set_current(ctx->cert, larg);
  3880. default:
  3881. return 0;
  3882. }
  3883. return 1;
  3884. }
  3885. long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void))
  3886. {
  3887. switch (cmd) {
  3888. #ifndef OPENSSL_NO_DH
  3889. case SSL_CTRL_SET_TMP_DH_CB:
  3890. {
  3891. ctx->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
  3892. }
  3893. break;
  3894. #endif
  3895. case SSL_CTRL_SET_TLSEXT_SERVERNAME_CB:
  3896. ctx->ext.servername_cb = (int (*)(SSL *, int *, void *))fp;
  3897. break;
  3898. case SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB:
  3899. ctx->ext.status_cb = (int (*)(SSL *, void *))fp;
  3900. break;
  3901. case SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB:
  3902. ctx->ext.ticket_key_cb = (int (*)(SSL *, unsigned char *,
  3903. unsigned char *,
  3904. EVP_CIPHER_CTX *,
  3905. HMAC_CTX *, int))fp;
  3906. break;
  3907. #ifndef OPENSSL_NO_SRP
  3908. case SSL_CTRL_SET_SRP_VERIFY_PARAM_CB:
  3909. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3910. ctx->srp_ctx.SRP_verify_param_callback = (int (*)(SSL *, void *))fp;
  3911. break;
  3912. case SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB:
  3913. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3914. ctx->srp_ctx.TLS_ext_srp_username_callback =
  3915. (int (*)(SSL *, int *, void *))fp;
  3916. break;
  3917. case SSL_CTRL_SET_SRP_GIVE_CLIENT_PWD_CB:
  3918. ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  3919. ctx->srp_ctx.SRP_give_srp_client_pwd_callback =
  3920. (char *(*)(SSL *, void *))fp;
  3921. break;
  3922. #endif
  3923. case SSL_CTRL_SET_NOT_RESUMABLE_SESS_CB:
  3924. {
  3925. ctx->not_resumable_session_cb = (int (*)(SSL *, int))fp;
  3926. }
  3927. break;
  3928. default:
  3929. return 0;
  3930. }
  3931. return 1;
  3932. }
  3933. const SSL_CIPHER *ssl3_get_cipher_by_id(uint32_t id)
  3934. {
  3935. SSL_CIPHER c;
  3936. const SSL_CIPHER *cp;
  3937. c.id = id;
  3938. cp = OBJ_bsearch_ssl_cipher_id(&c, tls13_ciphers, TLS13_NUM_CIPHERS);
  3939. if (cp != NULL)
  3940. return cp;
  3941. cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
  3942. if (cp != NULL)
  3943. return cp;
  3944. return OBJ_bsearch_ssl_cipher_id(&c, ssl3_scsvs, SSL3_NUM_SCSVS);
  3945. }
  3946. const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname)
  3947. {
  3948. SSL_CIPHER *tbl;
  3949. SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers, ssl3_scsvs};
  3950. size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS,
  3951. SSL3_NUM_SCSVS};
  3952. /* this is not efficient, necessary to optimize this? */
  3953. for (j = 0; j < OSSL_NELEM(alltabs); j++) {
  3954. for (i = 0, tbl = alltabs[j]; i < tblsize[j]; i++, tbl++) {
  3955. if (tbl->stdname == NULL)
  3956. continue;
  3957. if (strcmp(stdname, tbl->stdname) == 0) {
  3958. return tbl;
  3959. }
  3960. }
  3961. }
  3962. return NULL;
  3963. }
  3964. /*
  3965. * This function needs to check if the ciphers required are actually
  3966. * available
  3967. */
  3968. const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p)
  3969. {
  3970. return ssl3_get_cipher_by_id(SSL3_CK_CIPHERSUITE_FLAG
  3971. | ((uint32_t)p[0] << 8L)
  3972. | (uint32_t)p[1]);
  3973. }
  3974. int ssl3_put_cipher_by_char(const SSL_CIPHER *c, WPACKET *pkt, size_t *len)
  3975. {
  3976. if ((c->id & 0xff000000) != SSL3_CK_CIPHERSUITE_FLAG) {
  3977. *len = 0;
  3978. return 1;
  3979. }
  3980. if (!WPACKET_put_bytes_u16(pkt, c->id & 0xffff))
  3981. return 0;
  3982. *len = 2;
  3983. return 1;
  3984. }
  3985. /*
  3986. * ssl3_choose_cipher - choose a cipher from those offered by the client
  3987. * @s: SSL connection
  3988. * @clnt: ciphers offered by the client
  3989. * @srvr: ciphers enabled on the server?
  3990. *
  3991. * Returns the selected cipher or NULL when no common ciphers.
  3992. */
  3993. const SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
  3994. STACK_OF(SSL_CIPHER) *srvr)
  3995. {
  3996. const SSL_CIPHER *c, *ret = NULL;
  3997. STACK_OF(SSL_CIPHER) *prio, *allow;
  3998. int i, ii, ok, prefer_sha256 = 0;
  3999. unsigned long alg_k = 0, alg_a = 0, mask_k = 0, mask_a = 0;
  4000. const EVP_MD *mdsha256 = EVP_sha256();
  4001. #ifndef OPENSSL_NO_CHACHA
  4002. STACK_OF(SSL_CIPHER) *prio_chacha = NULL;
  4003. #endif
  4004. /* Let's see which ciphers we can support */
  4005. /*
  4006. * Do not set the compare functions, because this may lead to a
  4007. * reordering by "id". We want to keep the original ordering. We may pay
  4008. * a price in performance during sk_SSL_CIPHER_find(), but would have to
  4009. * pay with the price of sk_SSL_CIPHER_dup().
  4010. */
  4011. #ifdef CIPHER_DEBUG
  4012. fprintf(stderr, "Server has %d from %p:\n", sk_SSL_CIPHER_num(srvr),
  4013. (void *)srvr);
  4014. for (i = 0; i < sk_SSL_CIPHER_num(srvr); ++i) {
  4015. c = sk_SSL_CIPHER_value(srvr, i);
  4016. fprintf(stderr, "%p:%s\n", (void *)c, c->name);
  4017. }
  4018. fprintf(stderr, "Client sent %d from %p:\n", sk_SSL_CIPHER_num(clnt),
  4019. (void *)clnt);
  4020. for (i = 0; i < sk_SSL_CIPHER_num(clnt); ++i) {
  4021. c = sk_SSL_CIPHER_value(clnt, i);
  4022. fprintf(stderr, "%p:%s\n", (void *)c, c->name);
  4023. }
  4024. #endif
  4025. /* SUITE-B takes precedence over server preference and ChaCha priortiy */
  4026. if (tls1_suiteb(s)) {
  4027. prio = srvr;
  4028. allow = clnt;
  4029. } else if (s->options & SSL_OP_CIPHER_SERVER_PREFERENCE) {
  4030. prio = srvr;
  4031. allow = clnt;
  4032. #ifndef OPENSSL_NO_CHACHA
  4033. /* If ChaCha20 is at the top of the client preference list,
  4034. and there are ChaCha20 ciphers in the server list, then
  4035. temporarily prioritize all ChaCha20 ciphers in the servers list. */
  4036. if (s->options & SSL_OP_PRIORITIZE_CHACHA && sk_SSL_CIPHER_num(clnt) > 0) {
  4037. c = sk_SSL_CIPHER_value(clnt, 0);
  4038. if (c->algorithm_enc == SSL_CHACHA20POLY1305) {
  4039. /* ChaCha20 is client preferred, check server... */
  4040. int num = sk_SSL_CIPHER_num(srvr);
  4041. int found = 0;
  4042. for (i = 0; i < num; i++) {
  4043. c = sk_SSL_CIPHER_value(srvr, i);
  4044. if (c->algorithm_enc == SSL_CHACHA20POLY1305) {
  4045. found = 1;
  4046. break;
  4047. }
  4048. }
  4049. if (found) {
  4050. prio_chacha = sk_SSL_CIPHER_new_reserve(NULL, num);
  4051. /* if reserve fails, then there's likely a memory issue */
  4052. if (prio_chacha != NULL) {
  4053. /* Put all ChaCha20 at the top, starting with the one we just found */
  4054. sk_SSL_CIPHER_push(prio_chacha, c);
  4055. for (i++; i < num; i++) {
  4056. c = sk_SSL_CIPHER_value(srvr, i);
  4057. if (c->algorithm_enc == SSL_CHACHA20POLY1305)
  4058. sk_SSL_CIPHER_push(prio_chacha, c);
  4059. }
  4060. /* Pull in the rest */
  4061. for (i = 0; i < num; i++) {
  4062. c = sk_SSL_CIPHER_value(srvr, i);
  4063. if (c->algorithm_enc != SSL_CHACHA20POLY1305)
  4064. sk_SSL_CIPHER_push(prio_chacha, c);
  4065. }
  4066. prio = prio_chacha;
  4067. }
  4068. }
  4069. }
  4070. }
  4071. # endif
  4072. } else {
  4073. prio = clnt;
  4074. allow = srvr;
  4075. }
  4076. if (SSL_IS_TLS13(s)) {
  4077. #ifndef OPENSSL_NO_PSK
  4078. int j;
  4079. /*
  4080. * If we allow "old" style PSK callbacks, and we have no certificate (so
  4081. * we're not going to succeed without a PSK anyway), and we're in
  4082. * TLSv1.3 then the default hash for a PSK is SHA-256 (as per the
  4083. * TLSv1.3 spec). Therefore we should prioritise ciphersuites using
  4084. * that.
  4085. */
  4086. if (s->psk_server_callback != NULL) {
  4087. for (j = 0; j < SSL_PKEY_NUM && !ssl_has_cert(s, j); j++);
  4088. if (j == SSL_PKEY_NUM) {
  4089. /* There are no certificates */
  4090. prefer_sha256 = 1;
  4091. }
  4092. }
  4093. #endif
  4094. } else {
  4095. tls1_set_cert_validity(s);
  4096. ssl_set_masks(s);
  4097. }
  4098. for (i = 0; i < sk_SSL_CIPHER_num(prio); i++) {
  4099. c = sk_SSL_CIPHER_value(prio, i);
  4100. /* Skip ciphers not supported by the protocol version */
  4101. if (!SSL_IS_DTLS(s) &&
  4102. ((s->version < c->min_tls) || (s->version > c->max_tls)))
  4103. continue;
  4104. if (SSL_IS_DTLS(s) &&
  4105. (DTLS_VERSION_LT(s->version, c->min_dtls) ||
  4106. DTLS_VERSION_GT(s->version, c->max_dtls)))
  4107. continue;
  4108. /*
  4109. * Since TLS 1.3 ciphersuites can be used with any auth or
  4110. * key exchange scheme skip tests.
  4111. */
  4112. if (!SSL_IS_TLS13(s)) {
  4113. mask_k = s->s3->tmp.mask_k;
  4114. mask_a = s->s3->tmp.mask_a;
  4115. #ifndef OPENSSL_NO_SRP
  4116. if (s->srp_ctx.srp_Mask & SSL_kSRP) {
  4117. mask_k |= SSL_kSRP;
  4118. mask_a |= SSL_aSRP;
  4119. }
  4120. #endif
  4121. alg_k = c->algorithm_mkey;
  4122. alg_a = c->algorithm_auth;
  4123. #ifndef OPENSSL_NO_PSK
  4124. /* with PSK there must be server callback set */
  4125. if ((alg_k & SSL_PSK) && s->psk_server_callback == NULL)
  4126. continue;
  4127. #endif /* OPENSSL_NO_PSK */
  4128. ok = (alg_k & mask_k) && (alg_a & mask_a);
  4129. #ifdef CIPHER_DEBUG
  4130. fprintf(stderr, "%d:[%08lX:%08lX:%08lX:%08lX]%p:%s\n", ok, alg_k,
  4131. alg_a, mask_k, mask_a, (void *)c, c->name);
  4132. #endif
  4133. #ifndef OPENSSL_NO_EC
  4134. /*
  4135. * if we are considering an ECC cipher suite that uses an ephemeral
  4136. * EC key check it
  4137. */
  4138. if (alg_k & SSL_kECDHE)
  4139. ok = ok && tls1_check_ec_tmp_key(s, c->id);
  4140. #endif /* OPENSSL_NO_EC */
  4141. if (!ok)
  4142. continue;
  4143. }
  4144. ii = sk_SSL_CIPHER_find(allow, c);
  4145. if (ii >= 0) {
  4146. /* Check security callback permits this cipher */
  4147. if (!ssl_security(s, SSL_SECOP_CIPHER_SHARED,
  4148. c->strength_bits, 0, (void *)c))
  4149. continue;
  4150. #if !defined(OPENSSL_NO_EC)
  4151. if ((alg_k & SSL_kECDHE) && (alg_a & SSL_aECDSA)
  4152. && s->s3->is_probably_safari) {
  4153. if (!ret)
  4154. ret = sk_SSL_CIPHER_value(allow, ii);
  4155. continue;
  4156. }
  4157. #endif
  4158. if (prefer_sha256) {
  4159. const SSL_CIPHER *tmp = sk_SSL_CIPHER_value(allow, ii);
  4160. if (ssl_md(tmp->algorithm2) == mdsha256) {
  4161. ret = tmp;
  4162. break;
  4163. }
  4164. if (ret == NULL)
  4165. ret = tmp;
  4166. continue;
  4167. }
  4168. ret = sk_SSL_CIPHER_value(allow, ii);
  4169. break;
  4170. }
  4171. }
  4172. #ifndef OPENSSL_NO_CHACHA
  4173. sk_SSL_CIPHER_free(prio_chacha);
  4174. #endif
  4175. return ret;
  4176. }
  4177. int ssl3_get_req_cert_type(SSL *s, WPACKET *pkt)
  4178. {
  4179. uint32_t alg_k, alg_a = 0;
  4180. /* If we have custom certificate types set, use them */
  4181. if (s->cert->ctype)
  4182. return WPACKET_memcpy(pkt, s->cert->ctype, s->cert->ctype_len);
  4183. /* Get mask of algorithms disabled by signature list */
  4184. ssl_set_sig_mask(&alg_a, s, SSL_SECOP_SIGALG_MASK);
  4185. alg_k = s->s3->tmp.new_cipher->algorithm_mkey;
  4186. #ifndef OPENSSL_NO_GOST
  4187. if (s->version >= TLS1_VERSION && (alg_k & SSL_kGOST))
  4188. return WPACKET_put_bytes_u8(pkt, TLS_CT_GOST01_SIGN)
  4189. && WPACKET_put_bytes_u8(pkt, TLS_CT_GOST12_SIGN)
  4190. && WPACKET_put_bytes_u8(pkt, TLS_CT_GOST12_512_SIGN);
  4191. #endif
  4192. if ((s->version == SSL3_VERSION) && (alg_k & SSL_kDHE)) {
  4193. #ifndef OPENSSL_NO_DH
  4194. # ifndef OPENSSL_NO_RSA
  4195. if (!WPACKET_put_bytes_u8(pkt, SSL3_CT_RSA_EPHEMERAL_DH))
  4196. return 0;
  4197. # endif
  4198. # ifndef OPENSSL_NO_DSA
  4199. if (!WPACKET_put_bytes_u8(pkt, SSL3_CT_DSS_EPHEMERAL_DH))
  4200. return 0;
  4201. # endif
  4202. #endif /* !OPENSSL_NO_DH */
  4203. }
  4204. #ifndef OPENSSL_NO_RSA
  4205. if (!(alg_a & SSL_aRSA) && !WPACKET_put_bytes_u8(pkt, SSL3_CT_RSA_SIGN))
  4206. return 0;
  4207. #endif
  4208. #ifndef OPENSSL_NO_DSA
  4209. if (!(alg_a & SSL_aDSS) && !WPACKET_put_bytes_u8(pkt, SSL3_CT_DSS_SIGN))
  4210. return 0;
  4211. #endif
  4212. #ifndef OPENSSL_NO_EC
  4213. /*
  4214. * ECDSA certs can be used with RSA cipher suites too so we don't
  4215. * need to check for SSL_kECDH or SSL_kECDHE
  4216. */
  4217. if (s->version >= TLS1_VERSION
  4218. && !(alg_a & SSL_aECDSA)
  4219. && !WPACKET_put_bytes_u8(pkt, TLS_CT_ECDSA_SIGN))
  4220. return 0;
  4221. #endif
  4222. return 1;
  4223. }
  4224. static int ssl3_set_req_cert_type(CERT *c, const unsigned char *p, size_t len)
  4225. {
  4226. OPENSSL_free(c->ctype);
  4227. c->ctype = NULL;
  4228. c->ctype_len = 0;
  4229. if (p == NULL || len == 0)
  4230. return 1;
  4231. if (len > 0xff)
  4232. return 0;
  4233. c->ctype = OPENSSL_memdup(p, len);
  4234. if (c->ctype == NULL)
  4235. return 0;
  4236. c->ctype_len = len;
  4237. return 1;
  4238. }
  4239. int ssl3_shutdown(SSL *s)
  4240. {
  4241. int ret;
  4242. /*
  4243. * Don't do anything much if we have not done the handshake or we don't
  4244. * want to send messages :-)
  4245. */
  4246. if (s->quiet_shutdown || SSL_in_before(s)) {
  4247. s->shutdown = (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
  4248. return 1;
  4249. }
  4250. if (!(s->shutdown & SSL_SENT_SHUTDOWN)) {
  4251. s->shutdown |= SSL_SENT_SHUTDOWN;
  4252. ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_CLOSE_NOTIFY);
  4253. /*
  4254. * our shutdown alert has been sent now, and if it still needs to be
  4255. * written, s->s3->alert_dispatch will be true
  4256. */
  4257. if (s->s3->alert_dispatch)
  4258. return -1; /* return WANT_WRITE */
  4259. } else if (s->s3->alert_dispatch) {
  4260. /* resend it if not sent */
  4261. ret = s->method->ssl_dispatch_alert(s);
  4262. if (ret == -1) {
  4263. /*
  4264. * we only get to return -1 here the 2nd/Nth invocation, we must
  4265. * have already signalled return 0 upon a previous invocation,
  4266. * return WANT_WRITE
  4267. */
  4268. return ret;
  4269. }
  4270. } else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) {
  4271. size_t readbytes;
  4272. /*
  4273. * If we are waiting for a close from our peer, we are closed
  4274. */
  4275. s->method->ssl_read_bytes(s, 0, NULL, NULL, 0, 0, &readbytes);
  4276. if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) {
  4277. return -1; /* return WANT_READ */
  4278. }
  4279. }
  4280. if ((s->shutdown == (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN)) &&
  4281. !s->s3->alert_dispatch)
  4282. return 1;
  4283. else
  4284. return 0;
  4285. }
  4286. int ssl3_write(SSL *s, const void *buf, size_t len, size_t *written)
  4287. {
  4288. clear_sys_error();
  4289. if (s->s3->renegotiate)
  4290. ssl3_renegotiate_check(s, 0);
  4291. return s->method->ssl_write_bytes(s, SSL3_RT_APPLICATION_DATA, buf, len,
  4292. written);
  4293. }
  4294. static int ssl3_read_internal(SSL *s, void *buf, size_t len, int peek,
  4295. size_t *readbytes)
  4296. {
  4297. int ret;
  4298. clear_sys_error();
  4299. if (s->s3->renegotiate)
  4300. ssl3_renegotiate_check(s, 0);
  4301. s->s3->in_read_app_data = 1;
  4302. ret =
  4303. s->method->ssl_read_bytes(s, SSL3_RT_APPLICATION_DATA, NULL, buf, len,
  4304. peek, readbytes);
  4305. if ((ret == -1) && (s->s3->in_read_app_data == 2)) {
  4306. /*
  4307. * ssl3_read_bytes decided to call s->handshake_func, which called
  4308. * ssl3_read_bytes to read handshake data. However, ssl3_read_bytes
  4309. * actually found application data and thinks that application data
  4310. * makes sense here; so disable handshake processing and try to read
  4311. * application data again.
  4312. */
  4313. ossl_statem_set_in_handshake(s, 1);
  4314. ret =
  4315. s->method->ssl_read_bytes(s, SSL3_RT_APPLICATION_DATA, NULL, buf,
  4316. len, peek, readbytes);
  4317. ossl_statem_set_in_handshake(s, 0);
  4318. } else
  4319. s->s3->in_read_app_data = 0;
  4320. return ret;
  4321. }
  4322. int ssl3_read(SSL *s, void *buf, size_t len, size_t *readbytes)
  4323. {
  4324. return ssl3_read_internal(s, buf, len, 0, readbytes);
  4325. }
  4326. int ssl3_peek(SSL *s, void *buf, size_t len, size_t *readbytes)
  4327. {
  4328. return ssl3_read_internal(s, buf, len, 1, readbytes);
  4329. }
  4330. int ssl3_renegotiate(SSL *s)
  4331. {
  4332. if (s->handshake_func == NULL)
  4333. return 1;
  4334. s->s3->renegotiate = 1;
  4335. return 1;
  4336. }
  4337. /*
  4338. * Check if we are waiting to do a renegotiation and if so whether now is a
  4339. * good time to do it. If |initok| is true then we are being called from inside
  4340. * the state machine so ignore the result of SSL_in_init(s). Otherwise we
  4341. * should not do a renegotiation if SSL_in_init(s) is true. Returns 1 if we
  4342. * should do a renegotiation now and sets up the state machine for it. Otherwise
  4343. * returns 0.
  4344. */
  4345. int ssl3_renegotiate_check(SSL *s, int initok)
  4346. {
  4347. int ret = 0;
  4348. if (s->s3->renegotiate) {
  4349. if (!RECORD_LAYER_read_pending(&s->rlayer)
  4350. && !RECORD_LAYER_write_pending(&s->rlayer)
  4351. && (initok || !SSL_in_init(s))) {
  4352. /*
  4353. * if we are the server, and we have sent a 'RENEGOTIATE'
  4354. * message, we need to set the state machine into the renegotiate
  4355. * state.
  4356. */
  4357. ossl_statem_set_renegotiate(s);
  4358. s->s3->renegotiate = 0;
  4359. s->s3->num_renegotiations++;
  4360. s->s3->total_renegotiations++;
  4361. ret = 1;
  4362. }
  4363. }
  4364. return ret;
  4365. }
  4366. /*
  4367. * If we are using default SHA1+MD5 algorithms switch to new SHA256 PRF and
  4368. * handshake macs if required.
  4369. *
  4370. * If PSK and using SHA384 for TLS < 1.2 switch to default.
  4371. */
  4372. long ssl_get_algorithm2(SSL *s)
  4373. {
  4374. long alg2;
  4375. if (s->s3 == NULL || s->s3->tmp.new_cipher == NULL)
  4376. return -1;
  4377. alg2 = s->s3->tmp.new_cipher->algorithm2;
  4378. if (s->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SHA256_PRF) {
  4379. if (alg2 == (SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF))
  4380. return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256;
  4381. } else if (s->s3->tmp.new_cipher->algorithm_mkey & SSL_PSK) {
  4382. if (alg2 == (SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384))
  4383. return SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF;
  4384. }
  4385. return alg2;
  4386. }
  4387. /*
  4388. * Fill a ClientRandom or ServerRandom field of length len. Returns <= 0 on
  4389. * failure, 1 on success.
  4390. */
  4391. int ssl_fill_hello_random(SSL *s, int server, unsigned char *result, size_t len,
  4392. DOWNGRADE dgrd)
  4393. {
  4394. int send_time = 0, ret;
  4395. if (len < 4)
  4396. return 0;
  4397. if (server)
  4398. send_time = (s->mode & SSL_MODE_SEND_SERVERHELLO_TIME) != 0;
  4399. else
  4400. send_time = (s->mode & SSL_MODE_SEND_CLIENTHELLO_TIME) != 0;
  4401. if (send_time) {
  4402. unsigned long Time = (unsigned long)time(NULL);
  4403. unsigned char *p = result;
  4404. l2n(Time, p);
  4405. ret = RAND_bytes(p, len - 4);
  4406. } else {
  4407. ret = RAND_bytes(result, len);
  4408. }
  4409. if (ret > 0) {
  4410. if (!ossl_assert(sizeof(tls11downgrade) < len)
  4411. || !ossl_assert(sizeof(tls12downgrade) < len))
  4412. return 0;
  4413. if (dgrd == DOWNGRADE_TO_1_2)
  4414. memcpy(result + len - sizeof(tls12downgrade), tls12downgrade,
  4415. sizeof(tls12downgrade));
  4416. else if (dgrd == DOWNGRADE_TO_1_1)
  4417. memcpy(result + len - sizeof(tls11downgrade), tls11downgrade,
  4418. sizeof(tls11downgrade));
  4419. }
  4420. return ret;
  4421. }
  4422. int ssl_generate_master_secret(SSL *s, unsigned char *pms, size_t pmslen,
  4423. int free_pms)
  4424. {
  4425. unsigned long alg_k = s->s3->tmp.new_cipher->algorithm_mkey;
  4426. int ret = 0;
  4427. if (alg_k & SSL_PSK) {
  4428. #ifndef OPENSSL_NO_PSK
  4429. unsigned char *pskpms, *t;
  4430. size_t psklen = s->s3->tmp.psklen;
  4431. size_t pskpmslen;
  4432. /* create PSK premaster_secret */
  4433. /* For plain PSK "other_secret" is psklen zeroes */
  4434. if (alg_k & SSL_kPSK)
  4435. pmslen = psklen;
  4436. pskpmslen = 4 + pmslen + psklen;
  4437. pskpms = OPENSSL_malloc(pskpmslen);
  4438. if (pskpms == NULL)
  4439. goto err;
  4440. t = pskpms;
  4441. s2n(pmslen, t);
  4442. if (alg_k & SSL_kPSK)
  4443. memset(t, 0, pmslen);
  4444. else
  4445. memcpy(t, pms, pmslen);
  4446. t += pmslen;
  4447. s2n(psklen, t);
  4448. memcpy(t, s->s3->tmp.psk, psklen);
  4449. OPENSSL_clear_free(s->s3->tmp.psk, psklen);
  4450. s->s3->tmp.psk = NULL;
  4451. s->s3->tmp.psklen = 0;
  4452. if (!s->method->ssl3_enc->generate_master_secret(s,
  4453. s->session->master_key, pskpms, pskpmslen,
  4454. &s->session->master_key_length)) {
  4455. OPENSSL_clear_free(pskpms, pskpmslen);
  4456. /* SSLfatal() already called */
  4457. goto err;
  4458. }
  4459. OPENSSL_clear_free(pskpms, pskpmslen);
  4460. #else
  4461. /* Should never happen */
  4462. goto err;
  4463. #endif
  4464. } else {
  4465. if (!s->method->ssl3_enc->generate_master_secret(s,
  4466. s->session->master_key, pms, pmslen,
  4467. &s->session->master_key_length)) {
  4468. /* SSLfatal() already called */
  4469. goto err;
  4470. }
  4471. }
  4472. ret = 1;
  4473. err:
  4474. if (pms) {
  4475. if (free_pms)
  4476. OPENSSL_clear_free(pms, pmslen);
  4477. else
  4478. OPENSSL_cleanse(pms, pmslen);
  4479. }
  4480. if (s->server == 0) {
  4481. s->s3->tmp.pms = NULL;
  4482. s->s3->tmp.pmslen = 0;
  4483. }
  4484. return ret;
  4485. }
  4486. /* Generate a private key from parameters */
  4487. EVP_PKEY *ssl_generate_pkey(EVP_PKEY *pm)
  4488. {
  4489. EVP_PKEY_CTX *pctx = NULL;
  4490. EVP_PKEY *pkey = NULL;
  4491. if (pm == NULL)
  4492. return NULL;
  4493. pctx = EVP_PKEY_CTX_new(pm, NULL);
  4494. if (pctx == NULL)
  4495. goto err;
  4496. if (EVP_PKEY_keygen_init(pctx) <= 0)
  4497. goto err;
  4498. if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
  4499. EVP_PKEY_free(pkey);
  4500. pkey = NULL;
  4501. }
  4502. err:
  4503. EVP_PKEY_CTX_free(pctx);
  4504. return pkey;
  4505. }
  4506. #ifndef OPENSSL_NO_EC
  4507. /* Generate a private key from a group ID */
  4508. EVP_PKEY *ssl_generate_pkey_group(SSL *s, uint16_t id)
  4509. {
  4510. EVP_PKEY_CTX *pctx = NULL;
  4511. EVP_PKEY *pkey = NULL;
  4512. const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(id);
  4513. uint16_t gtype;
  4514. if (ginf == NULL) {
  4515. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4516. ERR_R_INTERNAL_ERROR);
  4517. goto err;
  4518. }
  4519. gtype = ginf->flags & TLS_CURVE_TYPE;
  4520. if (gtype == TLS_CURVE_CUSTOM)
  4521. pctx = EVP_PKEY_CTX_new_id(ginf->nid, NULL);
  4522. else
  4523. pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, NULL);
  4524. if (pctx == NULL) {
  4525. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4526. ERR_R_MALLOC_FAILURE);
  4527. goto err;
  4528. }
  4529. if (EVP_PKEY_keygen_init(pctx) <= 0) {
  4530. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4531. ERR_R_EVP_LIB);
  4532. goto err;
  4533. }
  4534. if (gtype != TLS_CURVE_CUSTOM
  4535. && EVP_PKEY_CTX_set_ec_paramgen_curve_nid(pctx, ginf->nid) <= 0) {
  4536. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4537. ERR_R_EVP_LIB);
  4538. goto err;
  4539. }
  4540. if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
  4541. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_GENERATE_PKEY_GROUP,
  4542. ERR_R_EVP_LIB);
  4543. EVP_PKEY_free(pkey);
  4544. pkey = NULL;
  4545. }
  4546. err:
  4547. EVP_PKEY_CTX_free(pctx);
  4548. return pkey;
  4549. }
  4550. /*
  4551. * Generate parameters from a group ID
  4552. */
  4553. EVP_PKEY *ssl_generate_param_group(uint16_t id)
  4554. {
  4555. EVP_PKEY_CTX *pctx = NULL;
  4556. EVP_PKEY *pkey = NULL;
  4557. const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(id);
  4558. if (ginf == NULL)
  4559. goto err;
  4560. if ((ginf->flags & TLS_CURVE_TYPE) == TLS_CURVE_CUSTOM) {
  4561. pkey = EVP_PKEY_new();
  4562. if (pkey != NULL && EVP_PKEY_set_type(pkey, ginf->nid))
  4563. return pkey;
  4564. EVP_PKEY_free(pkey);
  4565. return NULL;
  4566. }
  4567. pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, NULL);
  4568. if (pctx == NULL)
  4569. goto err;
  4570. if (EVP_PKEY_paramgen_init(pctx) <= 0)
  4571. goto err;
  4572. if (EVP_PKEY_CTX_set_ec_paramgen_curve_nid(pctx, ginf->nid) <= 0)
  4573. goto err;
  4574. if (EVP_PKEY_paramgen(pctx, &pkey) <= 0) {
  4575. EVP_PKEY_free(pkey);
  4576. pkey = NULL;
  4577. }
  4578. err:
  4579. EVP_PKEY_CTX_free(pctx);
  4580. return pkey;
  4581. }
  4582. #endif
  4583. /* Derive secrets for ECDH/DH */
  4584. int ssl_derive(SSL *s, EVP_PKEY *privkey, EVP_PKEY *pubkey, int gensecret)
  4585. {
  4586. int rv = 0;
  4587. unsigned char *pms = NULL;
  4588. size_t pmslen = 0;
  4589. EVP_PKEY_CTX *pctx;
  4590. if (privkey == NULL || pubkey == NULL) {
  4591. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_DERIVE,
  4592. ERR_R_INTERNAL_ERROR);
  4593. return 0;
  4594. }
  4595. pctx = EVP_PKEY_CTX_new(privkey, NULL);
  4596. if (EVP_PKEY_derive_init(pctx) <= 0
  4597. || EVP_PKEY_derive_set_peer(pctx, pubkey) <= 0
  4598. || EVP_PKEY_derive(pctx, NULL, &pmslen) <= 0) {
  4599. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_DERIVE,
  4600. ERR_R_INTERNAL_ERROR);
  4601. goto err;
  4602. }
  4603. pms = OPENSSL_malloc(pmslen);
  4604. if (pms == NULL) {
  4605. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_DERIVE,
  4606. ERR_R_MALLOC_FAILURE);
  4607. goto err;
  4608. }
  4609. if (EVP_PKEY_derive(pctx, pms, &pmslen) <= 0) {
  4610. SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_DERIVE,
  4611. ERR_R_INTERNAL_ERROR);
  4612. goto err;
  4613. }
  4614. if (gensecret) {
  4615. /* SSLfatal() called as appropriate in the below functions */
  4616. if (SSL_IS_TLS13(s)) {
  4617. /*
  4618. * If we are resuming then we already generated the early secret
  4619. * when we created the ClientHello, so don't recreate it.
  4620. */
  4621. if (!s->hit)
  4622. rv = tls13_generate_secret(s, ssl_handshake_md(s), NULL, NULL,
  4623. 0,
  4624. (unsigned char *)&s->early_secret);
  4625. else
  4626. rv = 1;
  4627. rv = rv && tls13_generate_handshake_secret(s, pms, pmslen);
  4628. } else {
  4629. rv = ssl_generate_master_secret(s, pms, pmslen, 0);
  4630. }
  4631. } else {
  4632. /* Save premaster secret */
  4633. s->s3->tmp.pms = pms;
  4634. s->s3->tmp.pmslen = pmslen;
  4635. pms = NULL;
  4636. rv = 1;
  4637. }
  4638. err:
  4639. OPENSSL_clear_free(pms, pmslen);
  4640. EVP_PKEY_CTX_free(pctx);
  4641. return rv;
  4642. }
  4643. #ifndef OPENSSL_NO_DH
  4644. EVP_PKEY *ssl_dh_to_pkey(DH *dh)
  4645. {
  4646. EVP_PKEY *ret;
  4647. if (dh == NULL)
  4648. return NULL;
  4649. ret = EVP_PKEY_new();
  4650. if (EVP_PKEY_set1_DH(ret, dh) <= 0) {
  4651. EVP_PKEY_free(ret);
  4652. return NULL;
  4653. }
  4654. return ret;
  4655. }
  4656. #endif