2
0

s3_lib.c 124 KB

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