infinite_recursion.py 91 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669
  1. # Verify that 2to3 falls back from the recursive pattern matching scheme to a
  2. # slower, iterative scheme in the event of a RecursionError.
  3. from ctypes import *
  4. STRING = c_char_p
  5. OSUnknownByteOrder = 0
  6. UIT_PROMPT = 1
  7. P_PGID = 2
  8. P_PID = 1
  9. UIT_ERROR = 5
  10. UIT_INFO = 4
  11. UIT_NONE = 0
  12. P_ALL = 0
  13. UIT_VERIFY = 2
  14. OSBigEndian = 2
  15. UIT_BOOLEAN = 3
  16. OSLittleEndian = 1
  17. __darwin_nl_item = c_int
  18. __darwin_wctrans_t = c_int
  19. __darwin_wctype_t = c_ulong
  20. __int8_t = c_byte
  21. __uint8_t = c_ubyte
  22. __int16_t = c_short
  23. __uint16_t = c_ushort
  24. __int32_t = c_int
  25. __uint32_t = c_uint
  26. __int64_t = c_longlong
  27. __uint64_t = c_ulonglong
  28. __darwin_intptr_t = c_long
  29. __darwin_natural_t = c_uint
  30. __darwin_ct_rune_t = c_int
  31. class __mbstate_t(Union):
  32. pass
  33. __mbstate_t._pack_ = 4
  34. __mbstate_t._fields_ = [
  35. ('__mbstate8', c_char * 128),
  36. ('_mbstateL', c_longlong),
  37. ]
  38. assert sizeof(__mbstate_t) == 128, sizeof(__mbstate_t)
  39. assert alignment(__mbstate_t) == 4, alignment(__mbstate_t)
  40. __darwin_mbstate_t = __mbstate_t
  41. __darwin_ptrdiff_t = c_int
  42. __darwin_size_t = c_ulong
  43. __darwin_va_list = STRING
  44. __darwin_wchar_t = c_int
  45. __darwin_rune_t = __darwin_wchar_t
  46. __darwin_wint_t = c_int
  47. __darwin_clock_t = c_ulong
  48. __darwin_socklen_t = __uint32_t
  49. __darwin_ssize_t = c_long
  50. __darwin_time_t = c_long
  51. sig_atomic_t = c_int
  52. class sigcontext(Structure):
  53. pass
  54. sigcontext._fields_ = [
  55. ('sc_onstack', c_int),
  56. ('sc_mask', c_int),
  57. ('sc_eax', c_uint),
  58. ('sc_ebx', c_uint),
  59. ('sc_ecx', c_uint),
  60. ('sc_edx', c_uint),
  61. ('sc_edi', c_uint),
  62. ('sc_esi', c_uint),
  63. ('sc_ebp', c_uint),
  64. ('sc_esp', c_uint),
  65. ('sc_ss', c_uint),
  66. ('sc_eflags', c_uint),
  67. ('sc_eip', c_uint),
  68. ('sc_cs', c_uint),
  69. ('sc_ds', c_uint),
  70. ('sc_es', c_uint),
  71. ('sc_fs', c_uint),
  72. ('sc_gs', c_uint),
  73. ]
  74. assert sizeof(sigcontext) == 72, sizeof(sigcontext)
  75. assert alignment(sigcontext) == 4, alignment(sigcontext)
  76. u_int8_t = c_ubyte
  77. u_int16_t = c_ushort
  78. u_int32_t = c_uint
  79. u_int64_t = c_ulonglong
  80. int32_t = c_int
  81. register_t = int32_t
  82. user_addr_t = u_int64_t
  83. user_size_t = u_int64_t
  84. int64_t = c_longlong
  85. user_ssize_t = int64_t
  86. user_long_t = int64_t
  87. user_ulong_t = u_int64_t
  88. user_time_t = int64_t
  89. syscall_arg_t = u_int64_t
  90. # values for unnamed enumeration
  91. class aes_key_st(Structure):
  92. pass
  93. aes_key_st._fields_ = [
  94. ('rd_key', c_ulong * 60),
  95. ('rounds', c_int),
  96. ]
  97. assert sizeof(aes_key_st) == 244, sizeof(aes_key_st)
  98. assert alignment(aes_key_st) == 4, alignment(aes_key_st)
  99. AES_KEY = aes_key_st
  100. class asn1_ctx_st(Structure):
  101. pass
  102. asn1_ctx_st._fields_ = [
  103. ('p', POINTER(c_ubyte)),
  104. ('eos', c_int),
  105. ('error', c_int),
  106. ('inf', c_int),
  107. ('tag', c_int),
  108. ('xclass', c_int),
  109. ('slen', c_long),
  110. ('max', POINTER(c_ubyte)),
  111. ('q', POINTER(c_ubyte)),
  112. ('pp', POINTER(POINTER(c_ubyte))),
  113. ('line', c_int),
  114. ]
  115. assert sizeof(asn1_ctx_st) == 44, sizeof(asn1_ctx_st)
  116. assert alignment(asn1_ctx_st) == 4, alignment(asn1_ctx_st)
  117. ASN1_CTX = asn1_ctx_st
  118. class asn1_object_st(Structure):
  119. pass
  120. asn1_object_st._fields_ = [
  121. ('sn', STRING),
  122. ('ln', STRING),
  123. ('nid', c_int),
  124. ('length', c_int),
  125. ('data', POINTER(c_ubyte)),
  126. ('flags', c_int),
  127. ]
  128. assert sizeof(asn1_object_st) == 24, sizeof(asn1_object_st)
  129. assert alignment(asn1_object_st) == 4, alignment(asn1_object_st)
  130. ASN1_OBJECT = asn1_object_st
  131. class asn1_string_st(Structure):
  132. pass
  133. asn1_string_st._fields_ = [
  134. ('length', c_int),
  135. ('type', c_int),
  136. ('data', POINTER(c_ubyte)),
  137. ('flags', c_long),
  138. ]
  139. assert sizeof(asn1_string_st) == 16, sizeof(asn1_string_st)
  140. assert alignment(asn1_string_st) == 4, alignment(asn1_string_st)
  141. ASN1_STRING = asn1_string_st
  142. class ASN1_ENCODING_st(Structure):
  143. pass
  144. ASN1_ENCODING_st._fields_ = [
  145. ('enc', POINTER(c_ubyte)),
  146. ('len', c_long),
  147. ('modified', c_int),
  148. ]
  149. assert sizeof(ASN1_ENCODING_st) == 12, sizeof(ASN1_ENCODING_st)
  150. assert alignment(ASN1_ENCODING_st) == 4, alignment(ASN1_ENCODING_st)
  151. ASN1_ENCODING = ASN1_ENCODING_st
  152. class asn1_string_table_st(Structure):
  153. pass
  154. asn1_string_table_st._fields_ = [
  155. ('nid', c_int),
  156. ('minsize', c_long),
  157. ('maxsize', c_long),
  158. ('mask', c_ulong),
  159. ('flags', c_ulong),
  160. ]
  161. assert sizeof(asn1_string_table_st) == 20, sizeof(asn1_string_table_st)
  162. assert alignment(asn1_string_table_st) == 4, alignment(asn1_string_table_st)
  163. ASN1_STRING_TABLE = asn1_string_table_st
  164. class ASN1_TEMPLATE_st(Structure):
  165. pass
  166. ASN1_TEMPLATE_st._fields_ = [
  167. ]
  168. ASN1_TEMPLATE = ASN1_TEMPLATE_st
  169. class ASN1_ITEM_st(Structure):
  170. pass
  171. ASN1_ITEM = ASN1_ITEM_st
  172. ASN1_ITEM_st._fields_ = [
  173. ]
  174. class ASN1_TLC_st(Structure):
  175. pass
  176. ASN1_TLC = ASN1_TLC_st
  177. ASN1_TLC_st._fields_ = [
  178. ]
  179. class ASN1_VALUE_st(Structure):
  180. pass
  181. ASN1_VALUE_st._fields_ = [
  182. ]
  183. ASN1_VALUE = ASN1_VALUE_st
  184. ASN1_ITEM_EXP = ASN1_ITEM
  185. class asn1_type_st(Structure):
  186. pass
  187. class N12asn1_type_st4DOLLAR_11E(Union):
  188. pass
  189. ASN1_BOOLEAN = c_int
  190. ASN1_INTEGER = asn1_string_st
  191. ASN1_ENUMERATED = asn1_string_st
  192. ASN1_BIT_STRING = asn1_string_st
  193. ASN1_OCTET_STRING = asn1_string_st
  194. ASN1_PRINTABLESTRING = asn1_string_st
  195. ASN1_T61STRING = asn1_string_st
  196. ASN1_IA5STRING = asn1_string_st
  197. ASN1_GENERALSTRING = asn1_string_st
  198. ASN1_BMPSTRING = asn1_string_st
  199. ASN1_UNIVERSALSTRING = asn1_string_st
  200. ASN1_UTCTIME = asn1_string_st
  201. ASN1_GENERALIZEDTIME = asn1_string_st
  202. ASN1_VISIBLESTRING = asn1_string_st
  203. ASN1_UTF8STRING = asn1_string_st
  204. N12asn1_type_st4DOLLAR_11E._fields_ = [
  205. ('ptr', STRING),
  206. ('boolean', ASN1_BOOLEAN),
  207. ('asn1_string', POINTER(ASN1_STRING)),
  208. ('object', POINTER(ASN1_OBJECT)),
  209. ('integer', POINTER(ASN1_INTEGER)),
  210. ('enumerated', POINTER(ASN1_ENUMERATED)),
  211. ('bit_string', POINTER(ASN1_BIT_STRING)),
  212. ('octet_string', POINTER(ASN1_OCTET_STRING)),
  213. ('printablestring', POINTER(ASN1_PRINTABLESTRING)),
  214. ('t61string', POINTER(ASN1_T61STRING)),
  215. ('ia5string', POINTER(ASN1_IA5STRING)),
  216. ('generalstring', POINTER(ASN1_GENERALSTRING)),
  217. ('bmpstring', POINTER(ASN1_BMPSTRING)),
  218. ('universalstring', POINTER(ASN1_UNIVERSALSTRING)),
  219. ('utctime', POINTER(ASN1_UTCTIME)),
  220. ('generalizedtime', POINTER(ASN1_GENERALIZEDTIME)),
  221. ('visiblestring', POINTER(ASN1_VISIBLESTRING)),
  222. ('utf8string', POINTER(ASN1_UTF8STRING)),
  223. ('set', POINTER(ASN1_STRING)),
  224. ('sequence', POINTER(ASN1_STRING)),
  225. ]
  226. assert sizeof(N12asn1_type_st4DOLLAR_11E) == 4, sizeof(N12asn1_type_st4DOLLAR_11E)
  227. assert alignment(N12asn1_type_st4DOLLAR_11E) == 4, alignment(N12asn1_type_st4DOLLAR_11E)
  228. asn1_type_st._fields_ = [
  229. ('type', c_int),
  230. ('value', N12asn1_type_st4DOLLAR_11E),
  231. ]
  232. assert sizeof(asn1_type_st) == 8, sizeof(asn1_type_st)
  233. assert alignment(asn1_type_st) == 4, alignment(asn1_type_st)
  234. ASN1_TYPE = asn1_type_st
  235. class asn1_method_st(Structure):
  236. pass
  237. asn1_method_st._fields_ = [
  238. ('i2d', CFUNCTYPE(c_int)),
  239. ('d2i', CFUNCTYPE(STRING)),
  240. ('create', CFUNCTYPE(STRING)),
  241. ('destroy', CFUNCTYPE(None)),
  242. ]
  243. assert sizeof(asn1_method_st) == 16, sizeof(asn1_method_st)
  244. assert alignment(asn1_method_st) == 4, alignment(asn1_method_st)
  245. ASN1_METHOD = asn1_method_st
  246. class asn1_header_st(Structure):
  247. pass
  248. asn1_header_st._fields_ = [
  249. ('header', POINTER(ASN1_OCTET_STRING)),
  250. ('data', STRING),
  251. ('meth', POINTER(ASN1_METHOD)),
  252. ]
  253. assert sizeof(asn1_header_st) == 12, sizeof(asn1_header_st)
  254. assert alignment(asn1_header_st) == 4, alignment(asn1_header_st)
  255. ASN1_HEADER = asn1_header_st
  256. class BIT_STRING_BITNAME_st(Structure):
  257. pass
  258. BIT_STRING_BITNAME_st._fields_ = [
  259. ('bitnum', c_int),
  260. ('lname', STRING),
  261. ('sname', STRING),
  262. ]
  263. assert sizeof(BIT_STRING_BITNAME_st) == 12, sizeof(BIT_STRING_BITNAME_st)
  264. assert alignment(BIT_STRING_BITNAME_st) == 4, alignment(BIT_STRING_BITNAME_st)
  265. BIT_STRING_BITNAME = BIT_STRING_BITNAME_st
  266. class bio_st(Structure):
  267. pass
  268. BIO = bio_st
  269. bio_info_cb = CFUNCTYPE(None, POINTER(bio_st), c_int, STRING, c_int, c_long, c_long)
  270. class bio_method_st(Structure):
  271. pass
  272. bio_method_st._fields_ = [
  273. ('type', c_int),
  274. ('name', STRING),
  275. ('bwrite', CFUNCTYPE(c_int, POINTER(BIO), STRING, c_int)),
  276. ('bread', CFUNCTYPE(c_int, POINTER(BIO), STRING, c_int)),
  277. ('bputs', CFUNCTYPE(c_int, POINTER(BIO), STRING)),
  278. ('bgets', CFUNCTYPE(c_int, POINTER(BIO), STRING, c_int)),
  279. ('ctrl', CFUNCTYPE(c_long, POINTER(BIO), c_int, c_long, c_void_p)),
  280. ('create', CFUNCTYPE(c_int, POINTER(BIO))),
  281. ('destroy', CFUNCTYPE(c_int, POINTER(BIO))),
  282. ('callback_ctrl', CFUNCTYPE(c_long, POINTER(BIO), c_int, POINTER(bio_info_cb))),
  283. ]
  284. assert sizeof(bio_method_st) == 40, sizeof(bio_method_st)
  285. assert alignment(bio_method_st) == 4, alignment(bio_method_st)
  286. BIO_METHOD = bio_method_st
  287. class crypto_ex_data_st(Structure):
  288. pass
  289. class stack_st(Structure):
  290. pass
  291. STACK = stack_st
  292. crypto_ex_data_st._fields_ = [
  293. ('sk', POINTER(STACK)),
  294. ('dummy', c_int),
  295. ]
  296. assert sizeof(crypto_ex_data_st) == 8, sizeof(crypto_ex_data_st)
  297. assert alignment(crypto_ex_data_st) == 4, alignment(crypto_ex_data_st)
  298. CRYPTO_EX_DATA = crypto_ex_data_st
  299. bio_st._fields_ = [
  300. ('method', POINTER(BIO_METHOD)),
  301. ('callback', CFUNCTYPE(c_long, POINTER(bio_st), c_int, STRING, c_int, c_long, c_long)),
  302. ('cb_arg', STRING),
  303. ('init', c_int),
  304. ('shutdown', c_int),
  305. ('flags', c_int),
  306. ('retry_reason', c_int),
  307. ('num', c_int),
  308. ('ptr', c_void_p),
  309. ('next_bio', POINTER(bio_st)),
  310. ('prev_bio', POINTER(bio_st)),
  311. ('references', c_int),
  312. ('num_read', c_ulong),
  313. ('num_write', c_ulong),
  314. ('ex_data', CRYPTO_EX_DATA),
  315. ]
  316. assert sizeof(bio_st) == 64, sizeof(bio_st)
  317. assert alignment(bio_st) == 4, alignment(bio_st)
  318. class bio_f_buffer_ctx_struct(Structure):
  319. pass
  320. bio_f_buffer_ctx_struct._fields_ = [
  321. ('ibuf_size', c_int),
  322. ('obuf_size', c_int),
  323. ('ibuf', STRING),
  324. ('ibuf_len', c_int),
  325. ('ibuf_off', c_int),
  326. ('obuf', STRING),
  327. ('obuf_len', c_int),
  328. ('obuf_off', c_int),
  329. ]
  330. assert sizeof(bio_f_buffer_ctx_struct) == 32, sizeof(bio_f_buffer_ctx_struct)
  331. assert alignment(bio_f_buffer_ctx_struct) == 4, alignment(bio_f_buffer_ctx_struct)
  332. BIO_F_BUFFER_CTX = bio_f_buffer_ctx_struct
  333. class hostent(Structure):
  334. pass
  335. hostent._fields_ = [
  336. ]
  337. class bf_key_st(Structure):
  338. pass
  339. bf_key_st._fields_ = [
  340. ('P', c_uint * 18),
  341. ('S', c_uint * 1024),
  342. ]
  343. assert sizeof(bf_key_st) == 4168, sizeof(bf_key_st)
  344. assert alignment(bf_key_st) == 4, alignment(bf_key_st)
  345. BF_KEY = bf_key_st
  346. class bignum_st(Structure):
  347. pass
  348. bignum_st._fields_ = [
  349. ('d', POINTER(c_ulong)),
  350. ('top', c_int),
  351. ('dmax', c_int),
  352. ('neg', c_int),
  353. ('flags', c_int),
  354. ]
  355. assert sizeof(bignum_st) == 20, sizeof(bignum_st)
  356. assert alignment(bignum_st) == 4, alignment(bignum_st)
  357. BIGNUM = bignum_st
  358. class bignum_ctx(Structure):
  359. pass
  360. bignum_ctx._fields_ = [
  361. ]
  362. BN_CTX = bignum_ctx
  363. class bn_blinding_st(Structure):
  364. pass
  365. bn_blinding_st._fields_ = [
  366. ('init', c_int),
  367. ('A', POINTER(BIGNUM)),
  368. ('Ai', POINTER(BIGNUM)),
  369. ('mod', POINTER(BIGNUM)),
  370. ('thread_id', c_ulong),
  371. ]
  372. assert sizeof(bn_blinding_st) == 20, sizeof(bn_blinding_st)
  373. assert alignment(bn_blinding_st) == 4, alignment(bn_blinding_st)
  374. BN_BLINDING = bn_blinding_st
  375. class bn_mont_ctx_st(Structure):
  376. pass
  377. bn_mont_ctx_st._fields_ = [
  378. ('ri', c_int),
  379. ('RR', BIGNUM),
  380. ('N', BIGNUM),
  381. ('Ni', BIGNUM),
  382. ('n0', c_ulong),
  383. ('flags', c_int),
  384. ]
  385. assert sizeof(bn_mont_ctx_st) == 72, sizeof(bn_mont_ctx_st)
  386. assert alignment(bn_mont_ctx_st) == 4, alignment(bn_mont_ctx_st)
  387. BN_MONT_CTX = bn_mont_ctx_st
  388. class bn_recp_ctx_st(Structure):
  389. pass
  390. bn_recp_ctx_st._fields_ = [
  391. ('N', BIGNUM),
  392. ('Nr', BIGNUM),
  393. ('num_bits', c_int),
  394. ('shift', c_int),
  395. ('flags', c_int),
  396. ]
  397. assert sizeof(bn_recp_ctx_st) == 52, sizeof(bn_recp_ctx_st)
  398. assert alignment(bn_recp_ctx_st) == 4, alignment(bn_recp_ctx_st)
  399. BN_RECP_CTX = bn_recp_ctx_st
  400. class buf_mem_st(Structure):
  401. pass
  402. buf_mem_st._fields_ = [
  403. ('length', c_int),
  404. ('data', STRING),
  405. ('max', c_int),
  406. ]
  407. assert sizeof(buf_mem_st) == 12, sizeof(buf_mem_st)
  408. assert alignment(buf_mem_st) == 4, alignment(buf_mem_st)
  409. BUF_MEM = buf_mem_st
  410. class cast_key_st(Structure):
  411. pass
  412. cast_key_st._fields_ = [
  413. ('data', c_ulong * 32),
  414. ('short_key', c_int),
  415. ]
  416. assert sizeof(cast_key_st) == 132, sizeof(cast_key_st)
  417. assert alignment(cast_key_st) == 4, alignment(cast_key_st)
  418. CAST_KEY = cast_key_st
  419. class comp_method_st(Structure):
  420. pass
  421. comp_method_st._fields_ = [
  422. ('type', c_int),
  423. ('name', STRING),
  424. ('init', CFUNCTYPE(c_int)),
  425. ('finish', CFUNCTYPE(None)),
  426. ('compress', CFUNCTYPE(c_int)),
  427. ('expand', CFUNCTYPE(c_int)),
  428. ('ctrl', CFUNCTYPE(c_long)),
  429. ('callback_ctrl', CFUNCTYPE(c_long)),
  430. ]
  431. assert sizeof(comp_method_st) == 32, sizeof(comp_method_st)
  432. assert alignment(comp_method_st) == 4, alignment(comp_method_st)
  433. COMP_METHOD = comp_method_st
  434. class comp_ctx_st(Structure):
  435. pass
  436. comp_ctx_st._fields_ = [
  437. ('meth', POINTER(COMP_METHOD)),
  438. ('compress_in', c_ulong),
  439. ('compress_out', c_ulong),
  440. ('expand_in', c_ulong),
  441. ('expand_out', c_ulong),
  442. ('ex_data', CRYPTO_EX_DATA),
  443. ]
  444. assert sizeof(comp_ctx_st) == 28, sizeof(comp_ctx_st)
  445. assert alignment(comp_ctx_st) == 4, alignment(comp_ctx_st)
  446. COMP_CTX = comp_ctx_st
  447. class CRYPTO_dynlock_value(Structure):
  448. pass
  449. CRYPTO_dynlock_value._fields_ = [
  450. ]
  451. class CRYPTO_dynlock(Structure):
  452. pass
  453. CRYPTO_dynlock._fields_ = [
  454. ('references', c_int),
  455. ('data', POINTER(CRYPTO_dynlock_value)),
  456. ]
  457. assert sizeof(CRYPTO_dynlock) == 8, sizeof(CRYPTO_dynlock)
  458. assert alignment(CRYPTO_dynlock) == 4, alignment(CRYPTO_dynlock)
  459. BIO_dummy = bio_st
  460. CRYPTO_EX_new = CFUNCTYPE(c_int, c_void_p, c_void_p, POINTER(CRYPTO_EX_DATA), c_int, c_long, c_void_p)
  461. CRYPTO_EX_free = CFUNCTYPE(None, c_void_p, c_void_p, POINTER(CRYPTO_EX_DATA), c_int, c_long, c_void_p)
  462. CRYPTO_EX_dup = CFUNCTYPE(c_int, POINTER(CRYPTO_EX_DATA), POINTER(CRYPTO_EX_DATA), c_void_p, c_int, c_long, c_void_p)
  463. class crypto_ex_data_func_st(Structure):
  464. pass
  465. crypto_ex_data_func_st._fields_ = [
  466. ('argl', c_long),
  467. ('argp', c_void_p),
  468. ('new_func', POINTER(CRYPTO_EX_new)),
  469. ('free_func', POINTER(CRYPTO_EX_free)),
  470. ('dup_func', POINTER(CRYPTO_EX_dup)),
  471. ]
  472. assert sizeof(crypto_ex_data_func_st) == 20, sizeof(crypto_ex_data_func_st)
  473. assert alignment(crypto_ex_data_func_st) == 4, alignment(crypto_ex_data_func_st)
  474. CRYPTO_EX_DATA_FUNCS = crypto_ex_data_func_st
  475. class st_CRYPTO_EX_DATA_IMPL(Structure):
  476. pass
  477. CRYPTO_EX_DATA_IMPL = st_CRYPTO_EX_DATA_IMPL
  478. st_CRYPTO_EX_DATA_IMPL._fields_ = [
  479. ]
  480. CRYPTO_MEM_LEAK_CB = CFUNCTYPE(c_void_p, c_ulong, STRING, c_int, c_int, c_void_p)
  481. DES_cblock = c_ubyte * 8
  482. const_DES_cblock = c_ubyte * 8
  483. class DES_ks(Structure):
  484. pass
  485. class N6DES_ks3DOLLAR_9E(Union):
  486. pass
  487. N6DES_ks3DOLLAR_9E._fields_ = [
  488. ('cblock', DES_cblock),
  489. ('deslong', c_ulong * 2),
  490. ]
  491. assert sizeof(N6DES_ks3DOLLAR_9E) == 8, sizeof(N6DES_ks3DOLLAR_9E)
  492. assert alignment(N6DES_ks3DOLLAR_9E) == 4, alignment(N6DES_ks3DOLLAR_9E)
  493. DES_ks._fields_ = [
  494. ('ks', N6DES_ks3DOLLAR_9E * 16),
  495. ]
  496. assert sizeof(DES_ks) == 128, sizeof(DES_ks)
  497. assert alignment(DES_ks) == 4, alignment(DES_ks)
  498. DES_key_schedule = DES_ks
  499. _ossl_old_des_cblock = c_ubyte * 8
  500. class _ossl_old_des_ks_struct(Structure):
  501. pass
  502. class N23_ossl_old_des_ks_struct4DOLLAR_10E(Union):
  503. pass
  504. N23_ossl_old_des_ks_struct4DOLLAR_10E._fields_ = [
  505. ('_', _ossl_old_des_cblock),
  506. ('pad', c_ulong * 2),
  507. ]
  508. assert sizeof(N23_ossl_old_des_ks_struct4DOLLAR_10E) == 8, sizeof(N23_ossl_old_des_ks_struct4DOLLAR_10E)
  509. assert alignment(N23_ossl_old_des_ks_struct4DOLLAR_10E) == 4, alignment(N23_ossl_old_des_ks_struct4DOLLAR_10E)
  510. _ossl_old_des_ks_struct._fields_ = [
  511. ('ks', N23_ossl_old_des_ks_struct4DOLLAR_10E),
  512. ]
  513. assert sizeof(_ossl_old_des_ks_struct) == 8, sizeof(_ossl_old_des_ks_struct)
  514. assert alignment(_ossl_old_des_ks_struct) == 4, alignment(_ossl_old_des_ks_struct)
  515. _ossl_old_des_key_schedule = _ossl_old_des_ks_struct * 16
  516. class dh_st(Structure):
  517. pass
  518. DH = dh_st
  519. class dh_method(Structure):
  520. pass
  521. dh_method._fields_ = [
  522. ('name', STRING),
  523. ('generate_key', CFUNCTYPE(c_int, POINTER(DH))),
  524. ('compute_key', CFUNCTYPE(c_int, POINTER(c_ubyte), POINTER(BIGNUM), POINTER(DH))),
  525. ('bn_mod_exp', CFUNCTYPE(c_int, POINTER(DH), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
  526. ('init', CFUNCTYPE(c_int, POINTER(DH))),
  527. ('finish', CFUNCTYPE(c_int, POINTER(DH))),
  528. ('flags', c_int),
  529. ('app_data', STRING),
  530. ]
  531. assert sizeof(dh_method) == 32, sizeof(dh_method)
  532. assert alignment(dh_method) == 4, alignment(dh_method)
  533. DH_METHOD = dh_method
  534. class engine_st(Structure):
  535. pass
  536. ENGINE = engine_st
  537. dh_st._fields_ = [
  538. ('pad', c_int),
  539. ('version', c_int),
  540. ('p', POINTER(BIGNUM)),
  541. ('g', POINTER(BIGNUM)),
  542. ('length', c_long),
  543. ('pub_key', POINTER(BIGNUM)),
  544. ('priv_key', POINTER(BIGNUM)),
  545. ('flags', c_int),
  546. ('method_mont_p', STRING),
  547. ('q', POINTER(BIGNUM)),
  548. ('j', POINTER(BIGNUM)),
  549. ('seed', POINTER(c_ubyte)),
  550. ('seedlen', c_int),
  551. ('counter', POINTER(BIGNUM)),
  552. ('references', c_int),
  553. ('ex_data', CRYPTO_EX_DATA),
  554. ('meth', POINTER(DH_METHOD)),
  555. ('engine', POINTER(ENGINE)),
  556. ]
  557. assert sizeof(dh_st) == 76, sizeof(dh_st)
  558. assert alignment(dh_st) == 4, alignment(dh_st)
  559. class dsa_st(Structure):
  560. pass
  561. DSA = dsa_st
  562. class DSA_SIG_st(Structure):
  563. pass
  564. DSA_SIG_st._fields_ = [
  565. ('r', POINTER(BIGNUM)),
  566. ('s', POINTER(BIGNUM)),
  567. ]
  568. assert sizeof(DSA_SIG_st) == 8, sizeof(DSA_SIG_st)
  569. assert alignment(DSA_SIG_st) == 4, alignment(DSA_SIG_st)
  570. DSA_SIG = DSA_SIG_st
  571. class dsa_method(Structure):
  572. pass
  573. dsa_method._fields_ = [
  574. ('name', STRING),
  575. ('dsa_do_sign', CFUNCTYPE(POINTER(DSA_SIG), POINTER(c_ubyte), c_int, POINTER(DSA))),
  576. ('dsa_sign_setup', CFUNCTYPE(c_int, POINTER(DSA), POINTER(BN_CTX), POINTER(POINTER(BIGNUM)), POINTER(POINTER(BIGNUM)))),
  577. ('dsa_do_verify', CFUNCTYPE(c_int, POINTER(c_ubyte), c_int, POINTER(DSA_SIG), POINTER(DSA))),
  578. ('dsa_mod_exp', CFUNCTYPE(c_int, POINTER(DSA), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
  579. ('bn_mod_exp', CFUNCTYPE(c_int, POINTER(DSA), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
  580. ('init', CFUNCTYPE(c_int, POINTER(DSA))),
  581. ('finish', CFUNCTYPE(c_int, POINTER(DSA))),
  582. ('flags', c_int),
  583. ('app_data', STRING),
  584. ]
  585. assert sizeof(dsa_method) == 40, sizeof(dsa_method)
  586. assert alignment(dsa_method) == 4, alignment(dsa_method)
  587. DSA_METHOD = dsa_method
  588. dsa_st._fields_ = [
  589. ('pad', c_int),
  590. ('version', c_long),
  591. ('write_params', c_int),
  592. ('p', POINTER(BIGNUM)),
  593. ('q', POINTER(BIGNUM)),
  594. ('g', POINTER(BIGNUM)),
  595. ('pub_key', POINTER(BIGNUM)),
  596. ('priv_key', POINTER(BIGNUM)),
  597. ('kinv', POINTER(BIGNUM)),
  598. ('r', POINTER(BIGNUM)),
  599. ('flags', c_int),
  600. ('method_mont_p', STRING),
  601. ('references', c_int),
  602. ('ex_data', CRYPTO_EX_DATA),
  603. ('meth', POINTER(DSA_METHOD)),
  604. ('engine', POINTER(ENGINE)),
  605. ]
  606. assert sizeof(dsa_st) == 68, sizeof(dsa_st)
  607. assert alignment(dsa_st) == 4, alignment(dsa_st)
  608. class evp_pkey_st(Structure):
  609. pass
  610. class N11evp_pkey_st4DOLLAR_12E(Union):
  611. pass
  612. class rsa_st(Structure):
  613. pass
  614. N11evp_pkey_st4DOLLAR_12E._fields_ = [
  615. ('ptr', STRING),
  616. ('rsa', POINTER(rsa_st)),
  617. ('dsa', POINTER(dsa_st)),
  618. ('dh', POINTER(dh_st)),
  619. ]
  620. assert sizeof(N11evp_pkey_st4DOLLAR_12E) == 4, sizeof(N11evp_pkey_st4DOLLAR_12E)
  621. assert alignment(N11evp_pkey_st4DOLLAR_12E) == 4, alignment(N11evp_pkey_st4DOLLAR_12E)
  622. evp_pkey_st._fields_ = [
  623. ('type', c_int),
  624. ('save_type', c_int),
  625. ('references', c_int),
  626. ('pkey', N11evp_pkey_st4DOLLAR_12E),
  627. ('save_parameters', c_int),
  628. ('attributes', POINTER(STACK)),
  629. ]
  630. assert sizeof(evp_pkey_st) == 24, sizeof(evp_pkey_st)
  631. assert alignment(evp_pkey_st) == 4, alignment(evp_pkey_st)
  632. class env_md_st(Structure):
  633. pass
  634. class env_md_ctx_st(Structure):
  635. pass
  636. EVP_MD_CTX = env_md_ctx_st
  637. env_md_st._fields_ = [
  638. ('type', c_int),
  639. ('pkey_type', c_int),
  640. ('md_size', c_int),
  641. ('flags', c_ulong),
  642. ('init', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX))),
  643. ('update', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX), c_void_p, c_ulong)),
  644. ('final', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX), POINTER(c_ubyte))),
  645. ('copy', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX), POINTER(EVP_MD_CTX))),
  646. ('cleanup', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX))),
  647. ('sign', CFUNCTYPE(c_int)),
  648. ('verify', CFUNCTYPE(c_int)),
  649. ('required_pkey_type', c_int * 5),
  650. ('block_size', c_int),
  651. ('ctx_size', c_int),
  652. ]
  653. assert sizeof(env_md_st) == 72, sizeof(env_md_st)
  654. assert alignment(env_md_st) == 4, alignment(env_md_st)
  655. EVP_MD = env_md_st
  656. env_md_ctx_st._fields_ = [
  657. ('digest', POINTER(EVP_MD)),
  658. ('engine', POINTER(ENGINE)),
  659. ('flags', c_ulong),
  660. ('md_data', c_void_p),
  661. ]
  662. assert sizeof(env_md_ctx_st) == 16, sizeof(env_md_ctx_st)
  663. assert alignment(env_md_ctx_st) == 4, alignment(env_md_ctx_st)
  664. class evp_cipher_st(Structure):
  665. pass
  666. class evp_cipher_ctx_st(Structure):
  667. pass
  668. EVP_CIPHER_CTX = evp_cipher_ctx_st
  669. evp_cipher_st._fields_ = [
  670. ('nid', c_int),
  671. ('block_size', c_int),
  672. ('key_len', c_int),
  673. ('iv_len', c_int),
  674. ('flags', c_ulong),
  675. ('init', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(c_ubyte), POINTER(c_ubyte), c_int)),
  676. ('do_cipher', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(c_ubyte), POINTER(c_ubyte), c_uint)),
  677. ('cleanup', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX))),
  678. ('ctx_size', c_int),
  679. ('set_asn1_parameters', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(ASN1_TYPE))),
  680. ('get_asn1_parameters', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(ASN1_TYPE))),
  681. ('ctrl', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), c_int, c_int, c_void_p)),
  682. ('app_data', c_void_p),
  683. ]
  684. assert sizeof(evp_cipher_st) == 52, sizeof(evp_cipher_st)
  685. assert alignment(evp_cipher_st) == 4, alignment(evp_cipher_st)
  686. class evp_cipher_info_st(Structure):
  687. pass
  688. EVP_CIPHER = evp_cipher_st
  689. evp_cipher_info_st._fields_ = [
  690. ('cipher', POINTER(EVP_CIPHER)),
  691. ('iv', c_ubyte * 16),
  692. ]
  693. assert sizeof(evp_cipher_info_st) == 20, sizeof(evp_cipher_info_st)
  694. assert alignment(evp_cipher_info_st) == 4, alignment(evp_cipher_info_st)
  695. EVP_CIPHER_INFO = evp_cipher_info_st
  696. evp_cipher_ctx_st._fields_ = [
  697. ('cipher', POINTER(EVP_CIPHER)),
  698. ('engine', POINTER(ENGINE)),
  699. ('encrypt', c_int),
  700. ('buf_len', c_int),
  701. ('oiv', c_ubyte * 16),
  702. ('iv', c_ubyte * 16),
  703. ('buf', c_ubyte * 32),
  704. ('num', c_int),
  705. ('app_data', c_void_p),
  706. ('key_len', c_int),
  707. ('flags', c_ulong),
  708. ('cipher_data', c_void_p),
  709. ('final_used', c_int),
  710. ('block_mask', c_int),
  711. ('final', c_ubyte * 32),
  712. ]
  713. assert sizeof(evp_cipher_ctx_st) == 140, sizeof(evp_cipher_ctx_st)
  714. assert alignment(evp_cipher_ctx_st) == 4, alignment(evp_cipher_ctx_st)
  715. class evp_Encode_Ctx_st(Structure):
  716. pass
  717. evp_Encode_Ctx_st._fields_ = [
  718. ('num', c_int),
  719. ('length', c_int),
  720. ('enc_data', c_ubyte * 80),
  721. ('line_num', c_int),
  722. ('expect_nl', c_int),
  723. ]
  724. assert sizeof(evp_Encode_Ctx_st) == 96, sizeof(evp_Encode_Ctx_st)
  725. assert alignment(evp_Encode_Ctx_st) == 4, alignment(evp_Encode_Ctx_st)
  726. EVP_ENCODE_CTX = evp_Encode_Ctx_st
  727. EVP_PBE_KEYGEN = CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), STRING, c_int, POINTER(ASN1_TYPE), POINTER(EVP_CIPHER), POINTER(EVP_MD), c_int)
  728. class lhash_node_st(Structure):
  729. pass
  730. lhash_node_st._fields_ = [
  731. ('data', c_void_p),
  732. ('next', POINTER(lhash_node_st)),
  733. ('hash', c_ulong),
  734. ]
  735. assert sizeof(lhash_node_st) == 12, sizeof(lhash_node_st)
  736. assert alignment(lhash_node_st) == 4, alignment(lhash_node_st)
  737. LHASH_NODE = lhash_node_st
  738. LHASH_COMP_FN_TYPE = CFUNCTYPE(c_int, c_void_p, c_void_p)
  739. LHASH_HASH_FN_TYPE = CFUNCTYPE(c_ulong, c_void_p)
  740. LHASH_DOALL_FN_TYPE = CFUNCTYPE(None, c_void_p)
  741. LHASH_DOALL_ARG_FN_TYPE = CFUNCTYPE(None, c_void_p, c_void_p)
  742. class lhash_st(Structure):
  743. pass
  744. lhash_st._fields_ = [
  745. ('b', POINTER(POINTER(LHASH_NODE))),
  746. ('comp', LHASH_COMP_FN_TYPE),
  747. ('hash', LHASH_HASH_FN_TYPE),
  748. ('num_nodes', c_uint),
  749. ('num_alloc_nodes', c_uint),
  750. ('p', c_uint),
  751. ('pmax', c_uint),
  752. ('up_load', c_ulong),
  753. ('down_load', c_ulong),
  754. ('num_items', c_ulong),
  755. ('num_expands', c_ulong),
  756. ('num_expand_reallocs', c_ulong),
  757. ('num_contracts', c_ulong),
  758. ('num_contract_reallocs', c_ulong),
  759. ('num_hash_calls', c_ulong),
  760. ('num_comp_calls', c_ulong),
  761. ('num_insert', c_ulong),
  762. ('num_replace', c_ulong),
  763. ('num_delete', c_ulong),
  764. ('num_no_delete', c_ulong),
  765. ('num_retrieve', c_ulong),
  766. ('num_retrieve_miss', c_ulong),
  767. ('num_hash_comps', c_ulong),
  768. ('error', c_int),
  769. ]
  770. assert sizeof(lhash_st) == 96, sizeof(lhash_st)
  771. assert alignment(lhash_st) == 4, alignment(lhash_st)
  772. LHASH = lhash_st
  773. class MD2state_st(Structure):
  774. pass
  775. MD2state_st._fields_ = [
  776. ('num', c_int),
  777. ('data', c_ubyte * 16),
  778. ('cksm', c_uint * 16),
  779. ('state', c_uint * 16),
  780. ]
  781. assert sizeof(MD2state_st) == 148, sizeof(MD2state_st)
  782. assert alignment(MD2state_st) == 4, alignment(MD2state_st)
  783. MD2_CTX = MD2state_st
  784. class MD4state_st(Structure):
  785. pass
  786. MD4state_st._fields_ = [
  787. ('A', c_uint),
  788. ('B', c_uint),
  789. ('C', c_uint),
  790. ('D', c_uint),
  791. ('Nl', c_uint),
  792. ('Nh', c_uint),
  793. ('data', c_uint * 16),
  794. ('num', c_int),
  795. ]
  796. assert sizeof(MD4state_st) == 92, sizeof(MD4state_st)
  797. assert alignment(MD4state_st) == 4, alignment(MD4state_st)
  798. MD4_CTX = MD4state_st
  799. class MD5state_st(Structure):
  800. pass
  801. MD5state_st._fields_ = [
  802. ('A', c_uint),
  803. ('B', c_uint),
  804. ('C', c_uint),
  805. ('D', c_uint),
  806. ('Nl', c_uint),
  807. ('Nh', c_uint),
  808. ('data', c_uint * 16),
  809. ('num', c_int),
  810. ]
  811. assert sizeof(MD5state_st) == 92, sizeof(MD5state_st)
  812. assert alignment(MD5state_st) == 4, alignment(MD5state_st)
  813. MD5_CTX = MD5state_st
  814. class mdc2_ctx_st(Structure):
  815. pass
  816. mdc2_ctx_st._fields_ = [
  817. ('num', c_int),
  818. ('data', c_ubyte * 8),
  819. ('h', DES_cblock),
  820. ('hh', DES_cblock),
  821. ('pad_type', c_int),
  822. ]
  823. assert sizeof(mdc2_ctx_st) == 32, sizeof(mdc2_ctx_st)
  824. assert alignment(mdc2_ctx_st) == 4, alignment(mdc2_ctx_st)
  825. MDC2_CTX = mdc2_ctx_st
  826. class obj_name_st(Structure):
  827. pass
  828. obj_name_st._fields_ = [
  829. ('type', c_int),
  830. ('alias', c_int),
  831. ('name', STRING),
  832. ('data', STRING),
  833. ]
  834. assert sizeof(obj_name_st) == 16, sizeof(obj_name_st)
  835. assert alignment(obj_name_st) == 4, alignment(obj_name_st)
  836. OBJ_NAME = obj_name_st
  837. ASN1_TIME = asn1_string_st
  838. ASN1_NULL = c_int
  839. EVP_PKEY = evp_pkey_st
  840. class x509_st(Structure):
  841. pass
  842. X509 = x509_st
  843. class X509_algor_st(Structure):
  844. pass
  845. X509_ALGOR = X509_algor_st
  846. class X509_crl_st(Structure):
  847. pass
  848. X509_CRL = X509_crl_st
  849. class X509_name_st(Structure):
  850. pass
  851. X509_NAME = X509_name_st
  852. class x509_store_st(Structure):
  853. pass
  854. X509_STORE = x509_store_st
  855. class x509_store_ctx_st(Structure):
  856. pass
  857. X509_STORE_CTX = x509_store_ctx_st
  858. engine_st._fields_ = [
  859. ]
  860. class PEM_Encode_Seal_st(Structure):
  861. pass
  862. PEM_Encode_Seal_st._fields_ = [
  863. ('encode', EVP_ENCODE_CTX),
  864. ('md', EVP_MD_CTX),
  865. ('cipher', EVP_CIPHER_CTX),
  866. ]
  867. assert sizeof(PEM_Encode_Seal_st) == 252, sizeof(PEM_Encode_Seal_st)
  868. assert alignment(PEM_Encode_Seal_st) == 4, alignment(PEM_Encode_Seal_st)
  869. PEM_ENCODE_SEAL_CTX = PEM_Encode_Seal_st
  870. class pem_recip_st(Structure):
  871. pass
  872. pem_recip_st._fields_ = [
  873. ('name', STRING),
  874. ('dn', POINTER(X509_NAME)),
  875. ('cipher', c_int),
  876. ('key_enc', c_int),
  877. ]
  878. assert sizeof(pem_recip_st) == 16, sizeof(pem_recip_st)
  879. assert alignment(pem_recip_st) == 4, alignment(pem_recip_st)
  880. PEM_USER = pem_recip_st
  881. class pem_ctx_st(Structure):
  882. pass
  883. class N10pem_ctx_st4DOLLAR_16E(Structure):
  884. pass
  885. N10pem_ctx_st4DOLLAR_16E._fields_ = [
  886. ('version', c_int),
  887. ('mode', c_int),
  888. ]
  889. assert sizeof(N10pem_ctx_st4DOLLAR_16E) == 8, sizeof(N10pem_ctx_st4DOLLAR_16E)
  890. assert alignment(N10pem_ctx_st4DOLLAR_16E) == 4, alignment(N10pem_ctx_st4DOLLAR_16E)
  891. class N10pem_ctx_st4DOLLAR_17E(Structure):
  892. pass
  893. N10pem_ctx_st4DOLLAR_17E._fields_ = [
  894. ('cipher', c_int),
  895. ]
  896. assert sizeof(N10pem_ctx_st4DOLLAR_17E) == 4, sizeof(N10pem_ctx_st4DOLLAR_17E)
  897. assert alignment(N10pem_ctx_st4DOLLAR_17E) == 4, alignment(N10pem_ctx_st4DOLLAR_17E)
  898. pem_ctx_st._fields_ = [
  899. ('type', c_int),
  900. ('proc_type', N10pem_ctx_st4DOLLAR_16E),
  901. ('domain', STRING),
  902. ('DEK_info', N10pem_ctx_st4DOLLAR_17E),
  903. ('originator', POINTER(PEM_USER)),
  904. ('num_recipient', c_int),
  905. ('recipient', POINTER(POINTER(PEM_USER))),
  906. ('x509_chain', POINTER(STACK)),
  907. ('md', POINTER(EVP_MD)),
  908. ('md_enc', c_int),
  909. ('md_len', c_int),
  910. ('md_data', STRING),
  911. ('dec', POINTER(EVP_CIPHER)),
  912. ('key_len', c_int),
  913. ('key', POINTER(c_ubyte)),
  914. ('data_enc', c_int),
  915. ('data_len', c_int),
  916. ('data', POINTER(c_ubyte)),
  917. ]
  918. assert sizeof(pem_ctx_st) == 76, sizeof(pem_ctx_st)
  919. assert alignment(pem_ctx_st) == 4, alignment(pem_ctx_st)
  920. PEM_CTX = pem_ctx_st
  921. pem_password_cb = CFUNCTYPE(c_int, STRING, c_int, c_int, c_void_p)
  922. class pkcs7_issuer_and_serial_st(Structure):
  923. pass
  924. pkcs7_issuer_and_serial_st._fields_ = [
  925. ('issuer', POINTER(X509_NAME)),
  926. ('serial', POINTER(ASN1_INTEGER)),
  927. ]
  928. assert sizeof(pkcs7_issuer_and_serial_st) == 8, sizeof(pkcs7_issuer_and_serial_st)
  929. assert alignment(pkcs7_issuer_and_serial_st) == 4, alignment(pkcs7_issuer_and_serial_st)
  930. PKCS7_ISSUER_AND_SERIAL = pkcs7_issuer_and_serial_st
  931. class pkcs7_signer_info_st(Structure):
  932. pass
  933. pkcs7_signer_info_st._fields_ = [
  934. ('version', POINTER(ASN1_INTEGER)),
  935. ('issuer_and_serial', POINTER(PKCS7_ISSUER_AND_SERIAL)),
  936. ('digest_alg', POINTER(X509_ALGOR)),
  937. ('auth_attr', POINTER(STACK)),
  938. ('digest_enc_alg', POINTER(X509_ALGOR)),
  939. ('enc_digest', POINTER(ASN1_OCTET_STRING)),
  940. ('unauth_attr', POINTER(STACK)),
  941. ('pkey', POINTER(EVP_PKEY)),
  942. ]
  943. assert sizeof(pkcs7_signer_info_st) == 32, sizeof(pkcs7_signer_info_st)
  944. assert alignment(pkcs7_signer_info_st) == 4, alignment(pkcs7_signer_info_st)
  945. PKCS7_SIGNER_INFO = pkcs7_signer_info_st
  946. class pkcs7_recip_info_st(Structure):
  947. pass
  948. pkcs7_recip_info_st._fields_ = [
  949. ('version', POINTER(ASN1_INTEGER)),
  950. ('issuer_and_serial', POINTER(PKCS7_ISSUER_AND_SERIAL)),
  951. ('key_enc_algor', POINTER(X509_ALGOR)),
  952. ('enc_key', POINTER(ASN1_OCTET_STRING)),
  953. ('cert', POINTER(X509)),
  954. ]
  955. assert sizeof(pkcs7_recip_info_st) == 20, sizeof(pkcs7_recip_info_st)
  956. assert alignment(pkcs7_recip_info_st) == 4, alignment(pkcs7_recip_info_st)
  957. PKCS7_RECIP_INFO = pkcs7_recip_info_st
  958. class pkcs7_signed_st(Structure):
  959. pass
  960. class pkcs7_st(Structure):
  961. pass
  962. pkcs7_signed_st._fields_ = [
  963. ('version', POINTER(ASN1_INTEGER)),
  964. ('md_algs', POINTER(STACK)),
  965. ('cert', POINTER(STACK)),
  966. ('crl', POINTER(STACK)),
  967. ('signer_info', POINTER(STACK)),
  968. ('contents', POINTER(pkcs7_st)),
  969. ]
  970. assert sizeof(pkcs7_signed_st) == 24, sizeof(pkcs7_signed_st)
  971. assert alignment(pkcs7_signed_st) == 4, alignment(pkcs7_signed_st)
  972. PKCS7_SIGNED = pkcs7_signed_st
  973. class pkcs7_enc_content_st(Structure):
  974. pass
  975. pkcs7_enc_content_st._fields_ = [
  976. ('content_type', POINTER(ASN1_OBJECT)),
  977. ('algorithm', POINTER(X509_ALGOR)),
  978. ('enc_data', POINTER(ASN1_OCTET_STRING)),
  979. ('cipher', POINTER(EVP_CIPHER)),
  980. ]
  981. assert sizeof(pkcs7_enc_content_st) == 16, sizeof(pkcs7_enc_content_st)
  982. assert alignment(pkcs7_enc_content_st) == 4, alignment(pkcs7_enc_content_st)
  983. PKCS7_ENC_CONTENT = pkcs7_enc_content_st
  984. class pkcs7_enveloped_st(Structure):
  985. pass
  986. pkcs7_enveloped_st._fields_ = [
  987. ('version', POINTER(ASN1_INTEGER)),
  988. ('recipientinfo', POINTER(STACK)),
  989. ('enc_data', POINTER(PKCS7_ENC_CONTENT)),
  990. ]
  991. assert sizeof(pkcs7_enveloped_st) == 12, sizeof(pkcs7_enveloped_st)
  992. assert alignment(pkcs7_enveloped_st) == 4, alignment(pkcs7_enveloped_st)
  993. PKCS7_ENVELOPE = pkcs7_enveloped_st
  994. class pkcs7_signedandenveloped_st(Structure):
  995. pass
  996. pkcs7_signedandenveloped_st._fields_ = [
  997. ('version', POINTER(ASN1_INTEGER)),
  998. ('md_algs', POINTER(STACK)),
  999. ('cert', POINTER(STACK)),
  1000. ('crl', POINTER(STACK)),
  1001. ('signer_info', POINTER(STACK)),
  1002. ('enc_data', POINTER(PKCS7_ENC_CONTENT)),
  1003. ('recipientinfo', POINTER(STACK)),
  1004. ]
  1005. assert sizeof(pkcs7_signedandenveloped_st) == 28, sizeof(pkcs7_signedandenveloped_st)
  1006. assert alignment(pkcs7_signedandenveloped_st) == 4, alignment(pkcs7_signedandenveloped_st)
  1007. PKCS7_SIGN_ENVELOPE = pkcs7_signedandenveloped_st
  1008. class pkcs7_digest_st(Structure):
  1009. pass
  1010. pkcs7_digest_st._fields_ = [
  1011. ('version', POINTER(ASN1_INTEGER)),
  1012. ('md', POINTER(X509_ALGOR)),
  1013. ('contents', POINTER(pkcs7_st)),
  1014. ('digest', POINTER(ASN1_OCTET_STRING)),
  1015. ]
  1016. assert sizeof(pkcs7_digest_st) == 16, sizeof(pkcs7_digest_st)
  1017. assert alignment(pkcs7_digest_st) == 4, alignment(pkcs7_digest_st)
  1018. PKCS7_DIGEST = pkcs7_digest_st
  1019. class pkcs7_encrypted_st(Structure):
  1020. pass
  1021. pkcs7_encrypted_st._fields_ = [
  1022. ('version', POINTER(ASN1_INTEGER)),
  1023. ('enc_data', POINTER(PKCS7_ENC_CONTENT)),
  1024. ]
  1025. assert sizeof(pkcs7_encrypted_st) == 8, sizeof(pkcs7_encrypted_st)
  1026. assert alignment(pkcs7_encrypted_st) == 4, alignment(pkcs7_encrypted_st)
  1027. PKCS7_ENCRYPT = pkcs7_encrypted_st
  1028. class N8pkcs7_st4DOLLAR_15E(Union):
  1029. pass
  1030. N8pkcs7_st4DOLLAR_15E._fields_ = [
  1031. ('ptr', STRING),
  1032. ('data', POINTER(ASN1_OCTET_STRING)),
  1033. ('sign', POINTER(PKCS7_SIGNED)),
  1034. ('enveloped', POINTER(PKCS7_ENVELOPE)),
  1035. ('signed_and_enveloped', POINTER(PKCS7_SIGN_ENVELOPE)),
  1036. ('digest', POINTER(PKCS7_DIGEST)),
  1037. ('encrypted', POINTER(PKCS7_ENCRYPT)),
  1038. ('other', POINTER(ASN1_TYPE)),
  1039. ]
  1040. assert sizeof(N8pkcs7_st4DOLLAR_15E) == 4, sizeof(N8pkcs7_st4DOLLAR_15E)
  1041. assert alignment(N8pkcs7_st4DOLLAR_15E) == 4, alignment(N8pkcs7_st4DOLLAR_15E)
  1042. pkcs7_st._fields_ = [
  1043. ('asn1', POINTER(c_ubyte)),
  1044. ('length', c_long),
  1045. ('state', c_int),
  1046. ('detached', c_int),
  1047. ('type', POINTER(ASN1_OBJECT)),
  1048. ('d', N8pkcs7_st4DOLLAR_15E),
  1049. ]
  1050. assert sizeof(pkcs7_st) == 24, sizeof(pkcs7_st)
  1051. assert alignment(pkcs7_st) == 4, alignment(pkcs7_st)
  1052. PKCS7 = pkcs7_st
  1053. class rc2_key_st(Structure):
  1054. pass
  1055. rc2_key_st._fields_ = [
  1056. ('data', c_uint * 64),
  1057. ]
  1058. assert sizeof(rc2_key_st) == 256, sizeof(rc2_key_st)
  1059. assert alignment(rc2_key_st) == 4, alignment(rc2_key_st)
  1060. RC2_KEY = rc2_key_st
  1061. class rc4_key_st(Structure):
  1062. pass
  1063. rc4_key_st._fields_ = [
  1064. ('x', c_ubyte),
  1065. ('y', c_ubyte),
  1066. ('data', c_ubyte * 256),
  1067. ]
  1068. assert sizeof(rc4_key_st) == 258, sizeof(rc4_key_st)
  1069. assert alignment(rc4_key_st) == 1, alignment(rc4_key_st)
  1070. RC4_KEY = rc4_key_st
  1071. class rc5_key_st(Structure):
  1072. pass
  1073. rc5_key_st._fields_ = [
  1074. ('rounds', c_int),
  1075. ('data', c_ulong * 34),
  1076. ]
  1077. assert sizeof(rc5_key_st) == 140, sizeof(rc5_key_st)
  1078. assert alignment(rc5_key_st) == 4, alignment(rc5_key_st)
  1079. RC5_32_KEY = rc5_key_st
  1080. class RIPEMD160state_st(Structure):
  1081. pass
  1082. RIPEMD160state_st._fields_ = [
  1083. ('A', c_uint),
  1084. ('B', c_uint),
  1085. ('C', c_uint),
  1086. ('D', c_uint),
  1087. ('E', c_uint),
  1088. ('Nl', c_uint),
  1089. ('Nh', c_uint),
  1090. ('data', c_uint * 16),
  1091. ('num', c_int),
  1092. ]
  1093. assert sizeof(RIPEMD160state_st) == 96, sizeof(RIPEMD160state_st)
  1094. assert alignment(RIPEMD160state_st) == 4, alignment(RIPEMD160state_st)
  1095. RIPEMD160_CTX = RIPEMD160state_st
  1096. RSA = rsa_st
  1097. class rsa_meth_st(Structure):
  1098. pass
  1099. rsa_meth_st._fields_ = [
  1100. ('name', STRING),
  1101. ('rsa_pub_enc', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
  1102. ('rsa_pub_dec', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
  1103. ('rsa_priv_enc', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
  1104. ('rsa_priv_dec', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
  1105. ('rsa_mod_exp', CFUNCTYPE(c_int, POINTER(BIGNUM), POINTER(BIGNUM), POINTER(RSA))),
  1106. ('bn_mod_exp', CFUNCTYPE(c_int, POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
  1107. ('init', CFUNCTYPE(c_int, POINTER(RSA))),
  1108. ('finish', CFUNCTYPE(c_int, POINTER(RSA))),
  1109. ('flags', c_int),
  1110. ('app_data', STRING),
  1111. ('rsa_sign', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), c_uint, POINTER(c_ubyte), POINTER(c_uint), POINTER(RSA))),
  1112. ('rsa_verify', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), c_uint, POINTER(c_ubyte), c_uint, POINTER(RSA))),
  1113. ]
  1114. assert sizeof(rsa_meth_st) == 52, sizeof(rsa_meth_st)
  1115. assert alignment(rsa_meth_st) == 4, alignment(rsa_meth_st)
  1116. RSA_METHOD = rsa_meth_st
  1117. rsa_st._fields_ = [
  1118. ('pad', c_int),
  1119. ('version', c_long),
  1120. ('meth', POINTER(RSA_METHOD)),
  1121. ('engine', POINTER(ENGINE)),
  1122. ('n', POINTER(BIGNUM)),
  1123. ('e', POINTER(BIGNUM)),
  1124. ('d', POINTER(BIGNUM)),
  1125. ('p', POINTER(BIGNUM)),
  1126. ('q', POINTER(BIGNUM)),
  1127. ('dmp1', POINTER(BIGNUM)),
  1128. ('dmq1', POINTER(BIGNUM)),
  1129. ('iqmp', POINTER(BIGNUM)),
  1130. ('ex_data', CRYPTO_EX_DATA),
  1131. ('references', c_int),
  1132. ('flags', c_int),
  1133. ('_method_mod_n', POINTER(BN_MONT_CTX)),
  1134. ('_method_mod_p', POINTER(BN_MONT_CTX)),
  1135. ('_method_mod_q', POINTER(BN_MONT_CTX)),
  1136. ('bignum_data', STRING),
  1137. ('blinding', POINTER(BN_BLINDING)),
  1138. ]
  1139. assert sizeof(rsa_st) == 84, sizeof(rsa_st)
  1140. assert alignment(rsa_st) == 4, alignment(rsa_st)
  1141. openssl_fptr = CFUNCTYPE(None)
  1142. class SHAstate_st(Structure):
  1143. pass
  1144. SHAstate_st._fields_ = [
  1145. ('h0', c_uint),
  1146. ('h1', c_uint),
  1147. ('h2', c_uint),
  1148. ('h3', c_uint),
  1149. ('h4', c_uint),
  1150. ('Nl', c_uint),
  1151. ('Nh', c_uint),
  1152. ('data', c_uint * 16),
  1153. ('num', c_int),
  1154. ]
  1155. assert sizeof(SHAstate_st) == 96, sizeof(SHAstate_st)
  1156. assert alignment(SHAstate_st) == 4, alignment(SHAstate_st)
  1157. SHA_CTX = SHAstate_st
  1158. class ssl_st(Structure):
  1159. pass
  1160. ssl_crock_st = POINTER(ssl_st)
  1161. class ssl_cipher_st(Structure):
  1162. pass
  1163. ssl_cipher_st._fields_ = [
  1164. ('valid', c_int),
  1165. ('name', STRING),
  1166. ('id', c_ulong),
  1167. ('algorithms', c_ulong),
  1168. ('algo_strength', c_ulong),
  1169. ('algorithm2', c_ulong),
  1170. ('strength_bits', c_int),
  1171. ('alg_bits', c_int),
  1172. ('mask', c_ulong),
  1173. ('mask_strength', c_ulong),
  1174. ]
  1175. assert sizeof(ssl_cipher_st) == 40, sizeof(ssl_cipher_st)
  1176. assert alignment(ssl_cipher_st) == 4, alignment(ssl_cipher_st)
  1177. SSL_CIPHER = ssl_cipher_st
  1178. SSL = ssl_st
  1179. class ssl_ctx_st(Structure):
  1180. pass
  1181. SSL_CTX = ssl_ctx_st
  1182. class ssl_method_st(Structure):
  1183. pass
  1184. class ssl3_enc_method(Structure):
  1185. pass
  1186. ssl_method_st._fields_ = [
  1187. ('version', c_int),
  1188. ('ssl_new', CFUNCTYPE(c_int, POINTER(SSL))),
  1189. ('ssl_clear', CFUNCTYPE(None, POINTER(SSL))),
  1190. ('ssl_free', CFUNCTYPE(None, POINTER(SSL))),
  1191. ('ssl_accept', CFUNCTYPE(c_int, POINTER(SSL))),
  1192. ('ssl_connect', CFUNCTYPE(c_int, POINTER(SSL))),
  1193. ('ssl_read', CFUNCTYPE(c_int, POINTER(SSL), c_void_p, c_int)),
  1194. ('ssl_peek', CFUNCTYPE(c_int, POINTER(SSL), c_void_p, c_int)),
  1195. ('ssl_write', CFUNCTYPE(c_int, POINTER(SSL), c_void_p, c_int)),
  1196. ('ssl_shutdown', CFUNCTYPE(c_int, POINTER(SSL))),
  1197. ('ssl_renegotiate', CFUNCTYPE(c_int, POINTER(SSL))),
  1198. ('ssl_renegotiate_check', CFUNCTYPE(c_int, POINTER(SSL))),
  1199. ('ssl_ctrl', CFUNCTYPE(c_long, POINTER(SSL), c_int, c_long, c_void_p)),
  1200. ('ssl_ctx_ctrl', CFUNCTYPE(c_long, POINTER(SSL_CTX), c_int, c_long, c_void_p)),
  1201. ('get_cipher_by_char', CFUNCTYPE(POINTER(SSL_CIPHER), POINTER(c_ubyte))),
  1202. ('put_cipher_by_char', CFUNCTYPE(c_int, POINTER(SSL_CIPHER), POINTER(c_ubyte))),
  1203. ('ssl_pending', CFUNCTYPE(c_int, POINTER(SSL))),
  1204. ('num_ciphers', CFUNCTYPE(c_int)),
  1205. ('get_cipher', CFUNCTYPE(POINTER(SSL_CIPHER), c_uint)),
  1206. ('get_ssl_method', CFUNCTYPE(POINTER(ssl_method_st), c_int)),
  1207. ('get_timeout', CFUNCTYPE(c_long)),
  1208. ('ssl3_enc', POINTER(ssl3_enc_method)),
  1209. ('ssl_version', CFUNCTYPE(c_int)),
  1210. ('ssl_callback_ctrl', CFUNCTYPE(c_long, POINTER(SSL), c_int, CFUNCTYPE(None))),
  1211. ('ssl_ctx_callback_ctrl', CFUNCTYPE(c_long, POINTER(SSL_CTX), c_int, CFUNCTYPE(None))),
  1212. ]
  1213. assert sizeof(ssl_method_st) == 100, sizeof(ssl_method_st)
  1214. assert alignment(ssl_method_st) == 4, alignment(ssl_method_st)
  1215. ssl3_enc_method._fields_ = [
  1216. ]
  1217. SSL_METHOD = ssl_method_st
  1218. class ssl_session_st(Structure):
  1219. pass
  1220. class sess_cert_st(Structure):
  1221. pass
  1222. ssl_session_st._fields_ = [
  1223. ('ssl_version', c_int),
  1224. ('key_arg_length', c_uint),
  1225. ('key_arg', c_ubyte * 8),
  1226. ('master_key_length', c_int),
  1227. ('master_key', c_ubyte * 48),
  1228. ('session_id_length', c_uint),
  1229. ('session_id', c_ubyte * 32),
  1230. ('sid_ctx_length', c_uint),
  1231. ('sid_ctx', c_ubyte * 32),
  1232. ('not_resumable', c_int),
  1233. ('sess_cert', POINTER(sess_cert_st)),
  1234. ('peer', POINTER(X509)),
  1235. ('verify_result', c_long),
  1236. ('references', c_int),
  1237. ('timeout', c_long),
  1238. ('time', c_long),
  1239. ('compress_meth', c_int),
  1240. ('cipher', POINTER(SSL_CIPHER)),
  1241. ('cipher_id', c_ulong),
  1242. ('ciphers', POINTER(STACK)),
  1243. ('ex_data', CRYPTO_EX_DATA),
  1244. ('prev', POINTER(ssl_session_st)),
  1245. ('next', POINTER(ssl_session_st)),
  1246. ]
  1247. assert sizeof(ssl_session_st) == 200, sizeof(ssl_session_st)
  1248. assert alignment(ssl_session_st) == 4, alignment(ssl_session_st)
  1249. sess_cert_st._fields_ = [
  1250. ]
  1251. SSL_SESSION = ssl_session_st
  1252. GEN_SESSION_CB = CFUNCTYPE(c_int, POINTER(SSL), POINTER(c_ubyte), POINTER(c_uint))
  1253. class ssl_comp_st(Structure):
  1254. pass
  1255. ssl_comp_st._fields_ = [
  1256. ('id', c_int),
  1257. ('name', STRING),
  1258. ('method', POINTER(COMP_METHOD)),
  1259. ]
  1260. assert sizeof(ssl_comp_st) == 12, sizeof(ssl_comp_st)
  1261. assert alignment(ssl_comp_st) == 4, alignment(ssl_comp_st)
  1262. SSL_COMP = ssl_comp_st
  1263. class N10ssl_ctx_st4DOLLAR_18E(Structure):
  1264. pass
  1265. N10ssl_ctx_st4DOLLAR_18E._fields_ = [
  1266. ('sess_connect', c_int),
  1267. ('sess_connect_renegotiate', c_int),
  1268. ('sess_connect_good', c_int),
  1269. ('sess_accept', c_int),
  1270. ('sess_accept_renegotiate', c_int),
  1271. ('sess_accept_good', c_int),
  1272. ('sess_miss', c_int),
  1273. ('sess_timeout', c_int),
  1274. ('sess_cache_full', c_int),
  1275. ('sess_hit', c_int),
  1276. ('sess_cb_hit', c_int),
  1277. ]
  1278. assert sizeof(N10ssl_ctx_st4DOLLAR_18E) == 44, sizeof(N10ssl_ctx_st4DOLLAR_18E)
  1279. assert alignment(N10ssl_ctx_st4DOLLAR_18E) == 4, alignment(N10ssl_ctx_st4DOLLAR_18E)
  1280. class cert_st(Structure):
  1281. pass
  1282. ssl_ctx_st._fields_ = [
  1283. ('method', POINTER(SSL_METHOD)),
  1284. ('cipher_list', POINTER(STACK)),
  1285. ('cipher_list_by_id', POINTER(STACK)),
  1286. ('cert_store', POINTER(x509_store_st)),
  1287. ('sessions', POINTER(lhash_st)),
  1288. ('session_cache_size', c_ulong),
  1289. ('session_cache_head', POINTER(ssl_session_st)),
  1290. ('session_cache_tail', POINTER(ssl_session_st)),
  1291. ('session_cache_mode', c_int),
  1292. ('session_timeout', c_long),
  1293. ('new_session_cb', CFUNCTYPE(c_int, POINTER(ssl_st), POINTER(SSL_SESSION))),
  1294. ('remove_session_cb', CFUNCTYPE(None, POINTER(ssl_ctx_st), POINTER(SSL_SESSION))),
  1295. ('get_session_cb', CFUNCTYPE(POINTER(SSL_SESSION), POINTER(ssl_st), POINTER(c_ubyte), c_int, POINTER(c_int))),
  1296. ('stats', N10ssl_ctx_st4DOLLAR_18E),
  1297. ('references', c_int),
  1298. ('app_verify_callback', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), c_void_p)),
  1299. ('app_verify_arg', c_void_p),
  1300. ('default_passwd_callback', POINTER(pem_password_cb)),
  1301. ('default_passwd_callback_userdata', c_void_p),
  1302. ('client_cert_cb', CFUNCTYPE(c_int, POINTER(SSL), POINTER(POINTER(X509)), POINTER(POINTER(EVP_PKEY)))),
  1303. ('ex_data', CRYPTO_EX_DATA),
  1304. ('rsa_md5', POINTER(EVP_MD)),
  1305. ('md5', POINTER(EVP_MD)),
  1306. ('sha1', POINTER(EVP_MD)),
  1307. ('extra_certs', POINTER(STACK)),
  1308. ('comp_methods', POINTER(STACK)),
  1309. ('info_callback', CFUNCTYPE(None, POINTER(SSL), c_int, c_int)),
  1310. ('client_CA', POINTER(STACK)),
  1311. ('options', c_ulong),
  1312. ('mode', c_ulong),
  1313. ('max_cert_list', c_long),
  1314. ('cert', POINTER(cert_st)),
  1315. ('read_ahead', c_int),
  1316. ('msg_callback', CFUNCTYPE(None, c_int, c_int, c_int, c_void_p, c_ulong, POINTER(SSL), c_void_p)),
  1317. ('msg_callback_arg', c_void_p),
  1318. ('verify_mode', c_int),
  1319. ('verify_depth', c_int),
  1320. ('sid_ctx_length', c_uint),
  1321. ('sid_ctx', c_ubyte * 32),
  1322. ('default_verify_callback', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
  1323. ('generate_session_id', GEN_SESSION_CB),
  1324. ('purpose', c_int),
  1325. ('trust', c_int),
  1326. ('quiet_shutdown', c_int),
  1327. ]
  1328. assert sizeof(ssl_ctx_st) == 248, sizeof(ssl_ctx_st)
  1329. assert alignment(ssl_ctx_st) == 4, alignment(ssl_ctx_st)
  1330. cert_st._fields_ = [
  1331. ]
  1332. class ssl2_state_st(Structure):
  1333. pass
  1334. class ssl3_state_st(Structure):
  1335. pass
  1336. ssl_st._fields_ = [
  1337. ('version', c_int),
  1338. ('type', c_int),
  1339. ('method', POINTER(SSL_METHOD)),
  1340. ('rbio', POINTER(BIO)),
  1341. ('wbio', POINTER(BIO)),
  1342. ('bbio', POINTER(BIO)),
  1343. ('rwstate', c_int),
  1344. ('in_handshake', c_int),
  1345. ('handshake_func', CFUNCTYPE(c_int)),
  1346. ('server', c_int),
  1347. ('new_session', c_int),
  1348. ('quiet_shutdown', c_int),
  1349. ('shutdown', c_int),
  1350. ('state', c_int),
  1351. ('rstate', c_int),
  1352. ('init_buf', POINTER(BUF_MEM)),
  1353. ('init_msg', c_void_p),
  1354. ('init_num', c_int),
  1355. ('init_off', c_int),
  1356. ('packet', POINTER(c_ubyte)),
  1357. ('packet_length', c_uint),
  1358. ('s2', POINTER(ssl2_state_st)),
  1359. ('s3', POINTER(ssl3_state_st)),
  1360. ('read_ahead', c_int),
  1361. ('msg_callback', CFUNCTYPE(None, c_int, c_int, c_int, c_void_p, c_ulong, POINTER(SSL), c_void_p)),
  1362. ('msg_callback_arg', c_void_p),
  1363. ('hit', c_int),
  1364. ('purpose', c_int),
  1365. ('trust', c_int),
  1366. ('cipher_list', POINTER(STACK)),
  1367. ('cipher_list_by_id', POINTER(STACK)),
  1368. ('enc_read_ctx', POINTER(EVP_CIPHER_CTX)),
  1369. ('read_hash', POINTER(EVP_MD)),
  1370. ('expand', POINTER(COMP_CTX)),
  1371. ('enc_write_ctx', POINTER(EVP_CIPHER_CTX)),
  1372. ('write_hash', POINTER(EVP_MD)),
  1373. ('compress', POINTER(COMP_CTX)),
  1374. ('cert', POINTER(cert_st)),
  1375. ('sid_ctx_length', c_uint),
  1376. ('sid_ctx', c_ubyte * 32),
  1377. ('session', POINTER(SSL_SESSION)),
  1378. ('generate_session_id', GEN_SESSION_CB),
  1379. ('verify_mode', c_int),
  1380. ('verify_depth', c_int),
  1381. ('verify_callback', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
  1382. ('info_callback', CFUNCTYPE(None, POINTER(SSL), c_int, c_int)),
  1383. ('error', c_int),
  1384. ('error_code', c_int),
  1385. ('ctx', POINTER(SSL_CTX)),
  1386. ('debug', c_int),
  1387. ('verify_result', c_long),
  1388. ('ex_data', CRYPTO_EX_DATA),
  1389. ('client_CA', POINTER(STACK)),
  1390. ('references', c_int),
  1391. ('options', c_ulong),
  1392. ('mode', c_ulong),
  1393. ('max_cert_list', c_long),
  1394. ('first_packet', c_int),
  1395. ('client_version', c_int),
  1396. ]
  1397. assert sizeof(ssl_st) == 268, sizeof(ssl_st)
  1398. assert alignment(ssl_st) == 4, alignment(ssl_st)
  1399. class N13ssl2_state_st4DOLLAR_19E(Structure):
  1400. pass
  1401. N13ssl2_state_st4DOLLAR_19E._fields_ = [
  1402. ('conn_id_length', c_uint),
  1403. ('cert_type', c_uint),
  1404. ('cert_length', c_uint),
  1405. ('csl', c_uint),
  1406. ('clear', c_uint),
  1407. ('enc', c_uint),
  1408. ('ccl', c_ubyte * 32),
  1409. ('cipher_spec_length', c_uint),
  1410. ('session_id_length', c_uint),
  1411. ('clen', c_uint),
  1412. ('rlen', c_uint),
  1413. ]
  1414. assert sizeof(N13ssl2_state_st4DOLLAR_19E) == 72, sizeof(N13ssl2_state_st4DOLLAR_19E)
  1415. assert alignment(N13ssl2_state_st4DOLLAR_19E) == 4, alignment(N13ssl2_state_st4DOLLAR_19E)
  1416. ssl2_state_st._fields_ = [
  1417. ('three_byte_header', c_int),
  1418. ('clear_text', c_int),
  1419. ('escape', c_int),
  1420. ('ssl2_rollback', c_int),
  1421. ('wnum', c_uint),
  1422. ('wpend_tot', c_int),
  1423. ('wpend_buf', POINTER(c_ubyte)),
  1424. ('wpend_off', c_int),
  1425. ('wpend_len', c_int),
  1426. ('wpend_ret', c_int),
  1427. ('rbuf_left', c_int),
  1428. ('rbuf_offs', c_int),
  1429. ('rbuf', POINTER(c_ubyte)),
  1430. ('wbuf', POINTER(c_ubyte)),
  1431. ('write_ptr', POINTER(c_ubyte)),
  1432. ('padding', c_uint),
  1433. ('rlength', c_uint),
  1434. ('ract_data_length', c_int),
  1435. ('wlength', c_uint),
  1436. ('wact_data_length', c_int),
  1437. ('ract_data', POINTER(c_ubyte)),
  1438. ('wact_data', POINTER(c_ubyte)),
  1439. ('mac_data', POINTER(c_ubyte)),
  1440. ('read_key', POINTER(c_ubyte)),
  1441. ('write_key', POINTER(c_ubyte)),
  1442. ('challenge_length', c_uint),
  1443. ('challenge', c_ubyte * 32),
  1444. ('conn_id_length', c_uint),
  1445. ('conn_id', c_ubyte * 16),
  1446. ('key_material_length', c_uint),
  1447. ('key_material', c_ubyte * 48),
  1448. ('read_sequence', c_ulong),
  1449. ('write_sequence', c_ulong),
  1450. ('tmp', N13ssl2_state_st4DOLLAR_19E),
  1451. ]
  1452. assert sizeof(ssl2_state_st) == 288, sizeof(ssl2_state_st)
  1453. assert alignment(ssl2_state_st) == 4, alignment(ssl2_state_st)
  1454. SSL2_STATE = ssl2_state_st
  1455. class ssl3_record_st(Structure):
  1456. pass
  1457. ssl3_record_st._fields_ = [
  1458. ('type', c_int),
  1459. ('length', c_uint),
  1460. ('off', c_uint),
  1461. ('data', POINTER(c_ubyte)),
  1462. ('input', POINTER(c_ubyte)),
  1463. ('comp', POINTER(c_ubyte)),
  1464. ]
  1465. assert sizeof(ssl3_record_st) == 24, sizeof(ssl3_record_st)
  1466. assert alignment(ssl3_record_st) == 4, alignment(ssl3_record_st)
  1467. SSL3_RECORD = ssl3_record_st
  1468. class ssl3_buffer_st(Structure):
  1469. pass
  1470. size_t = __darwin_size_t
  1471. ssl3_buffer_st._fields_ = [
  1472. ('buf', POINTER(c_ubyte)),
  1473. ('len', size_t),
  1474. ('offset', c_int),
  1475. ('left', c_int),
  1476. ]
  1477. assert sizeof(ssl3_buffer_st) == 16, sizeof(ssl3_buffer_st)
  1478. assert alignment(ssl3_buffer_st) == 4, alignment(ssl3_buffer_st)
  1479. SSL3_BUFFER = ssl3_buffer_st
  1480. class N13ssl3_state_st4DOLLAR_20E(Structure):
  1481. pass
  1482. N13ssl3_state_st4DOLLAR_20E._fields_ = [
  1483. ('cert_verify_md', c_ubyte * 72),
  1484. ('finish_md', c_ubyte * 72),
  1485. ('finish_md_len', c_int),
  1486. ('peer_finish_md', c_ubyte * 72),
  1487. ('peer_finish_md_len', c_int),
  1488. ('message_size', c_ulong),
  1489. ('message_type', c_int),
  1490. ('new_cipher', POINTER(SSL_CIPHER)),
  1491. ('dh', POINTER(DH)),
  1492. ('next_state', c_int),
  1493. ('reuse_message', c_int),
  1494. ('cert_req', c_int),
  1495. ('ctype_num', c_int),
  1496. ('ctype', c_char * 7),
  1497. ('ca_names', POINTER(STACK)),
  1498. ('use_rsa_tmp', c_int),
  1499. ('key_block_length', c_int),
  1500. ('key_block', POINTER(c_ubyte)),
  1501. ('new_sym_enc', POINTER(EVP_CIPHER)),
  1502. ('new_hash', POINTER(EVP_MD)),
  1503. ('new_compression', POINTER(SSL_COMP)),
  1504. ('cert_request', c_int),
  1505. ]
  1506. assert sizeof(N13ssl3_state_st4DOLLAR_20E) == 296, sizeof(N13ssl3_state_st4DOLLAR_20E)
  1507. assert alignment(N13ssl3_state_st4DOLLAR_20E) == 4, alignment(N13ssl3_state_st4DOLLAR_20E)
  1508. ssl3_state_st._fields_ = [
  1509. ('flags', c_long),
  1510. ('delay_buf_pop_ret', c_int),
  1511. ('read_sequence', c_ubyte * 8),
  1512. ('read_mac_secret', c_ubyte * 36),
  1513. ('write_sequence', c_ubyte * 8),
  1514. ('write_mac_secret', c_ubyte * 36),
  1515. ('server_random', c_ubyte * 32),
  1516. ('client_random', c_ubyte * 32),
  1517. ('need_empty_fragments', c_int),
  1518. ('empty_fragment_done', c_int),
  1519. ('rbuf', SSL3_BUFFER),
  1520. ('wbuf', SSL3_BUFFER),
  1521. ('rrec', SSL3_RECORD),
  1522. ('wrec', SSL3_RECORD),
  1523. ('alert_fragment', c_ubyte * 2),
  1524. ('alert_fragment_len', c_uint),
  1525. ('handshake_fragment', c_ubyte * 4),
  1526. ('handshake_fragment_len', c_uint),
  1527. ('wnum', c_uint),
  1528. ('wpend_tot', c_int),
  1529. ('wpend_type', c_int),
  1530. ('wpend_ret', c_int),
  1531. ('wpend_buf', POINTER(c_ubyte)),
  1532. ('finish_dgst1', EVP_MD_CTX),
  1533. ('finish_dgst2', EVP_MD_CTX),
  1534. ('change_cipher_spec', c_int),
  1535. ('warn_alert', c_int),
  1536. ('fatal_alert', c_int),
  1537. ('alert_dispatch', c_int),
  1538. ('send_alert', c_ubyte * 2),
  1539. ('renegotiate', c_int),
  1540. ('total_renegotiations', c_int),
  1541. ('num_renegotiations', c_int),
  1542. ('in_read_app_data', c_int),
  1543. ('tmp', N13ssl3_state_st4DOLLAR_20E),
  1544. ]
  1545. assert sizeof(ssl3_state_st) == 648, sizeof(ssl3_state_st)
  1546. assert alignment(ssl3_state_st) == 4, alignment(ssl3_state_st)
  1547. SSL3_STATE = ssl3_state_st
  1548. stack_st._fields_ = [
  1549. ('num', c_int),
  1550. ('data', POINTER(STRING)),
  1551. ('sorted', c_int),
  1552. ('num_alloc', c_int),
  1553. ('comp', CFUNCTYPE(c_int, POINTER(STRING), POINTER(STRING))),
  1554. ]
  1555. assert sizeof(stack_st) == 20, sizeof(stack_st)
  1556. assert alignment(stack_st) == 4, alignment(stack_st)
  1557. class ui_st(Structure):
  1558. pass
  1559. ui_st._fields_ = [
  1560. ]
  1561. UI = ui_st
  1562. class ui_method_st(Structure):
  1563. pass
  1564. ui_method_st._fields_ = [
  1565. ]
  1566. UI_METHOD = ui_method_st
  1567. class ui_string_st(Structure):
  1568. pass
  1569. ui_string_st._fields_ = [
  1570. ]
  1571. UI_STRING = ui_string_st
  1572. # values for enumeration 'UI_string_types'
  1573. UI_string_types = c_int # enum
  1574. class X509_objects_st(Structure):
  1575. pass
  1576. X509_objects_st._fields_ = [
  1577. ('nid', c_int),
  1578. ('a2i', CFUNCTYPE(c_int)),
  1579. ('i2a', CFUNCTYPE(c_int)),
  1580. ]
  1581. assert sizeof(X509_objects_st) == 12, sizeof(X509_objects_st)
  1582. assert alignment(X509_objects_st) == 4, alignment(X509_objects_st)
  1583. X509_OBJECTS = X509_objects_st
  1584. X509_algor_st._fields_ = [
  1585. ('algorithm', POINTER(ASN1_OBJECT)),
  1586. ('parameter', POINTER(ASN1_TYPE)),
  1587. ]
  1588. assert sizeof(X509_algor_st) == 8, sizeof(X509_algor_st)
  1589. assert alignment(X509_algor_st) == 4, alignment(X509_algor_st)
  1590. class X509_val_st(Structure):
  1591. pass
  1592. X509_val_st._fields_ = [
  1593. ('notBefore', POINTER(ASN1_TIME)),
  1594. ('notAfter', POINTER(ASN1_TIME)),
  1595. ]
  1596. assert sizeof(X509_val_st) == 8, sizeof(X509_val_st)
  1597. assert alignment(X509_val_st) == 4, alignment(X509_val_st)
  1598. X509_VAL = X509_val_st
  1599. class X509_pubkey_st(Structure):
  1600. pass
  1601. X509_pubkey_st._fields_ = [
  1602. ('algor', POINTER(X509_ALGOR)),
  1603. ('public_key', POINTER(ASN1_BIT_STRING)),
  1604. ('pkey', POINTER(EVP_PKEY)),
  1605. ]
  1606. assert sizeof(X509_pubkey_st) == 12, sizeof(X509_pubkey_st)
  1607. assert alignment(X509_pubkey_st) == 4, alignment(X509_pubkey_st)
  1608. X509_PUBKEY = X509_pubkey_st
  1609. class X509_sig_st(Structure):
  1610. pass
  1611. X509_sig_st._fields_ = [
  1612. ('algor', POINTER(X509_ALGOR)),
  1613. ('digest', POINTER(ASN1_OCTET_STRING)),
  1614. ]
  1615. assert sizeof(X509_sig_st) == 8, sizeof(X509_sig_st)
  1616. assert alignment(X509_sig_st) == 4, alignment(X509_sig_st)
  1617. X509_SIG = X509_sig_st
  1618. class X509_name_entry_st(Structure):
  1619. pass
  1620. X509_name_entry_st._fields_ = [
  1621. ('object', POINTER(ASN1_OBJECT)),
  1622. ('value', POINTER(ASN1_STRING)),
  1623. ('set', c_int),
  1624. ('size', c_int),
  1625. ]
  1626. assert sizeof(X509_name_entry_st) == 16, sizeof(X509_name_entry_st)
  1627. assert alignment(X509_name_entry_st) == 4, alignment(X509_name_entry_st)
  1628. X509_NAME_ENTRY = X509_name_entry_st
  1629. X509_name_st._fields_ = [
  1630. ('entries', POINTER(STACK)),
  1631. ('modified', c_int),
  1632. ('bytes', POINTER(BUF_MEM)),
  1633. ('hash', c_ulong),
  1634. ]
  1635. assert sizeof(X509_name_st) == 16, sizeof(X509_name_st)
  1636. assert alignment(X509_name_st) == 4, alignment(X509_name_st)
  1637. class X509_extension_st(Structure):
  1638. pass
  1639. X509_extension_st._fields_ = [
  1640. ('object', POINTER(ASN1_OBJECT)),
  1641. ('critical', ASN1_BOOLEAN),
  1642. ('value', POINTER(ASN1_OCTET_STRING)),
  1643. ]
  1644. assert sizeof(X509_extension_st) == 12, sizeof(X509_extension_st)
  1645. assert alignment(X509_extension_st) == 4, alignment(X509_extension_st)
  1646. X509_EXTENSION = X509_extension_st
  1647. class x509_attributes_st(Structure):
  1648. pass
  1649. class N18x509_attributes_st4DOLLAR_13E(Union):
  1650. pass
  1651. N18x509_attributes_st4DOLLAR_13E._fields_ = [
  1652. ('ptr', STRING),
  1653. ('set', POINTER(STACK)),
  1654. ('single', POINTER(ASN1_TYPE)),
  1655. ]
  1656. assert sizeof(N18x509_attributes_st4DOLLAR_13E) == 4, sizeof(N18x509_attributes_st4DOLLAR_13E)
  1657. assert alignment(N18x509_attributes_st4DOLLAR_13E) == 4, alignment(N18x509_attributes_st4DOLLAR_13E)
  1658. x509_attributes_st._fields_ = [
  1659. ('object', POINTER(ASN1_OBJECT)),
  1660. ('single', c_int),
  1661. ('value', N18x509_attributes_st4DOLLAR_13E),
  1662. ]
  1663. assert sizeof(x509_attributes_st) == 12, sizeof(x509_attributes_st)
  1664. assert alignment(x509_attributes_st) == 4, alignment(x509_attributes_st)
  1665. X509_ATTRIBUTE = x509_attributes_st
  1666. class X509_req_info_st(Structure):
  1667. pass
  1668. X509_req_info_st._fields_ = [
  1669. ('enc', ASN1_ENCODING),
  1670. ('version', POINTER(ASN1_INTEGER)),
  1671. ('subject', POINTER(X509_NAME)),
  1672. ('pubkey', POINTER(X509_PUBKEY)),
  1673. ('attributes', POINTER(STACK)),
  1674. ]
  1675. assert sizeof(X509_req_info_st) == 28, sizeof(X509_req_info_st)
  1676. assert alignment(X509_req_info_st) == 4, alignment(X509_req_info_st)
  1677. X509_REQ_INFO = X509_req_info_st
  1678. class X509_req_st(Structure):
  1679. pass
  1680. X509_req_st._fields_ = [
  1681. ('req_info', POINTER(X509_REQ_INFO)),
  1682. ('sig_alg', POINTER(X509_ALGOR)),
  1683. ('signature', POINTER(ASN1_BIT_STRING)),
  1684. ('references', c_int),
  1685. ]
  1686. assert sizeof(X509_req_st) == 16, sizeof(X509_req_st)
  1687. assert alignment(X509_req_st) == 4, alignment(X509_req_st)
  1688. X509_REQ = X509_req_st
  1689. class x509_cinf_st(Structure):
  1690. pass
  1691. x509_cinf_st._fields_ = [
  1692. ('version', POINTER(ASN1_INTEGER)),
  1693. ('serialNumber', POINTER(ASN1_INTEGER)),
  1694. ('signature', POINTER(X509_ALGOR)),
  1695. ('issuer', POINTER(X509_NAME)),
  1696. ('validity', POINTER(X509_VAL)),
  1697. ('subject', POINTER(X509_NAME)),
  1698. ('key', POINTER(X509_PUBKEY)),
  1699. ('issuerUID', POINTER(ASN1_BIT_STRING)),
  1700. ('subjectUID', POINTER(ASN1_BIT_STRING)),
  1701. ('extensions', POINTER(STACK)),
  1702. ]
  1703. assert sizeof(x509_cinf_st) == 40, sizeof(x509_cinf_st)
  1704. assert alignment(x509_cinf_st) == 4, alignment(x509_cinf_st)
  1705. X509_CINF = x509_cinf_st
  1706. class x509_cert_aux_st(Structure):
  1707. pass
  1708. x509_cert_aux_st._fields_ = [
  1709. ('trust', POINTER(STACK)),
  1710. ('reject', POINTER(STACK)),
  1711. ('alias', POINTER(ASN1_UTF8STRING)),
  1712. ('keyid', POINTER(ASN1_OCTET_STRING)),
  1713. ('other', POINTER(STACK)),
  1714. ]
  1715. assert sizeof(x509_cert_aux_st) == 20, sizeof(x509_cert_aux_st)
  1716. assert alignment(x509_cert_aux_st) == 4, alignment(x509_cert_aux_st)
  1717. X509_CERT_AUX = x509_cert_aux_st
  1718. class AUTHORITY_KEYID_st(Structure):
  1719. pass
  1720. x509_st._fields_ = [
  1721. ('cert_info', POINTER(X509_CINF)),
  1722. ('sig_alg', POINTER(X509_ALGOR)),
  1723. ('signature', POINTER(ASN1_BIT_STRING)),
  1724. ('valid', c_int),
  1725. ('references', c_int),
  1726. ('name', STRING),
  1727. ('ex_data', CRYPTO_EX_DATA),
  1728. ('ex_pathlen', c_long),
  1729. ('ex_flags', c_ulong),
  1730. ('ex_kusage', c_ulong),
  1731. ('ex_xkusage', c_ulong),
  1732. ('ex_nscert', c_ulong),
  1733. ('skid', POINTER(ASN1_OCTET_STRING)),
  1734. ('akid', POINTER(AUTHORITY_KEYID_st)),
  1735. ('sha1_hash', c_ubyte * 20),
  1736. ('aux', POINTER(X509_CERT_AUX)),
  1737. ]
  1738. assert sizeof(x509_st) == 84, sizeof(x509_st)
  1739. assert alignment(x509_st) == 4, alignment(x509_st)
  1740. AUTHORITY_KEYID_st._fields_ = [
  1741. ]
  1742. class x509_trust_st(Structure):
  1743. pass
  1744. x509_trust_st._fields_ = [
  1745. ('trust', c_int),
  1746. ('flags', c_int),
  1747. ('check_trust', CFUNCTYPE(c_int, POINTER(x509_trust_st), POINTER(X509), c_int)),
  1748. ('name', STRING),
  1749. ('arg1', c_int),
  1750. ('arg2', c_void_p),
  1751. ]
  1752. assert sizeof(x509_trust_st) == 24, sizeof(x509_trust_st)
  1753. assert alignment(x509_trust_st) == 4, alignment(x509_trust_st)
  1754. X509_TRUST = x509_trust_st
  1755. class X509_revoked_st(Structure):
  1756. pass
  1757. X509_revoked_st._fields_ = [
  1758. ('serialNumber', POINTER(ASN1_INTEGER)),
  1759. ('revocationDate', POINTER(ASN1_TIME)),
  1760. ('extensions', POINTER(STACK)),
  1761. ('sequence', c_int),
  1762. ]
  1763. assert sizeof(X509_revoked_st) == 16, sizeof(X509_revoked_st)
  1764. assert alignment(X509_revoked_st) == 4, alignment(X509_revoked_st)
  1765. X509_REVOKED = X509_revoked_st
  1766. class X509_crl_info_st(Structure):
  1767. pass
  1768. X509_crl_info_st._fields_ = [
  1769. ('version', POINTER(ASN1_INTEGER)),
  1770. ('sig_alg', POINTER(X509_ALGOR)),
  1771. ('issuer', POINTER(X509_NAME)),
  1772. ('lastUpdate', POINTER(ASN1_TIME)),
  1773. ('nextUpdate', POINTER(ASN1_TIME)),
  1774. ('revoked', POINTER(STACK)),
  1775. ('extensions', POINTER(STACK)),
  1776. ('enc', ASN1_ENCODING),
  1777. ]
  1778. assert sizeof(X509_crl_info_st) == 40, sizeof(X509_crl_info_st)
  1779. assert alignment(X509_crl_info_st) == 4, alignment(X509_crl_info_st)
  1780. X509_CRL_INFO = X509_crl_info_st
  1781. X509_crl_st._fields_ = [
  1782. ('crl', POINTER(X509_CRL_INFO)),
  1783. ('sig_alg', POINTER(X509_ALGOR)),
  1784. ('signature', POINTER(ASN1_BIT_STRING)),
  1785. ('references', c_int),
  1786. ]
  1787. assert sizeof(X509_crl_st) == 16, sizeof(X509_crl_st)
  1788. assert alignment(X509_crl_st) == 4, alignment(X509_crl_st)
  1789. class private_key_st(Structure):
  1790. pass
  1791. private_key_st._fields_ = [
  1792. ('version', c_int),
  1793. ('enc_algor', POINTER(X509_ALGOR)),
  1794. ('enc_pkey', POINTER(ASN1_OCTET_STRING)),
  1795. ('dec_pkey', POINTER(EVP_PKEY)),
  1796. ('key_length', c_int),
  1797. ('key_data', STRING),
  1798. ('key_free', c_int),
  1799. ('cipher', EVP_CIPHER_INFO),
  1800. ('references', c_int),
  1801. ]
  1802. assert sizeof(private_key_st) == 52, sizeof(private_key_st)
  1803. assert alignment(private_key_st) == 4, alignment(private_key_st)
  1804. X509_PKEY = private_key_st
  1805. class X509_info_st(Structure):
  1806. pass
  1807. X509_info_st._fields_ = [
  1808. ('x509', POINTER(X509)),
  1809. ('crl', POINTER(X509_CRL)),
  1810. ('x_pkey', POINTER(X509_PKEY)),
  1811. ('enc_cipher', EVP_CIPHER_INFO),
  1812. ('enc_len', c_int),
  1813. ('enc_data', STRING),
  1814. ('references', c_int),
  1815. ]
  1816. assert sizeof(X509_info_st) == 44, sizeof(X509_info_st)
  1817. assert alignment(X509_info_st) == 4, alignment(X509_info_st)
  1818. X509_INFO = X509_info_st
  1819. class Netscape_spkac_st(Structure):
  1820. pass
  1821. Netscape_spkac_st._fields_ = [
  1822. ('pubkey', POINTER(X509_PUBKEY)),
  1823. ('challenge', POINTER(ASN1_IA5STRING)),
  1824. ]
  1825. assert sizeof(Netscape_spkac_st) == 8, sizeof(Netscape_spkac_st)
  1826. assert alignment(Netscape_spkac_st) == 4, alignment(Netscape_spkac_st)
  1827. NETSCAPE_SPKAC = Netscape_spkac_st
  1828. class Netscape_spki_st(Structure):
  1829. pass
  1830. Netscape_spki_st._fields_ = [
  1831. ('spkac', POINTER(NETSCAPE_SPKAC)),
  1832. ('sig_algor', POINTER(X509_ALGOR)),
  1833. ('signature', POINTER(ASN1_BIT_STRING)),
  1834. ]
  1835. assert sizeof(Netscape_spki_st) == 12, sizeof(Netscape_spki_st)
  1836. assert alignment(Netscape_spki_st) == 4, alignment(Netscape_spki_st)
  1837. NETSCAPE_SPKI = Netscape_spki_st
  1838. class Netscape_certificate_sequence(Structure):
  1839. pass
  1840. Netscape_certificate_sequence._fields_ = [
  1841. ('type', POINTER(ASN1_OBJECT)),
  1842. ('certs', POINTER(STACK)),
  1843. ]
  1844. assert sizeof(Netscape_certificate_sequence) == 8, sizeof(Netscape_certificate_sequence)
  1845. assert alignment(Netscape_certificate_sequence) == 4, alignment(Netscape_certificate_sequence)
  1846. NETSCAPE_CERT_SEQUENCE = Netscape_certificate_sequence
  1847. class PBEPARAM_st(Structure):
  1848. pass
  1849. PBEPARAM_st._fields_ = [
  1850. ('salt', POINTER(ASN1_OCTET_STRING)),
  1851. ('iter', POINTER(ASN1_INTEGER)),
  1852. ]
  1853. assert sizeof(PBEPARAM_st) == 8, sizeof(PBEPARAM_st)
  1854. assert alignment(PBEPARAM_st) == 4, alignment(PBEPARAM_st)
  1855. PBEPARAM = PBEPARAM_st
  1856. class PBE2PARAM_st(Structure):
  1857. pass
  1858. PBE2PARAM_st._fields_ = [
  1859. ('keyfunc', POINTER(X509_ALGOR)),
  1860. ('encryption', POINTER(X509_ALGOR)),
  1861. ]
  1862. assert sizeof(PBE2PARAM_st) == 8, sizeof(PBE2PARAM_st)
  1863. assert alignment(PBE2PARAM_st) == 4, alignment(PBE2PARAM_st)
  1864. PBE2PARAM = PBE2PARAM_st
  1865. class PBKDF2PARAM_st(Structure):
  1866. pass
  1867. PBKDF2PARAM_st._fields_ = [
  1868. ('salt', POINTER(ASN1_TYPE)),
  1869. ('iter', POINTER(ASN1_INTEGER)),
  1870. ('keylength', POINTER(ASN1_INTEGER)),
  1871. ('prf', POINTER(X509_ALGOR)),
  1872. ]
  1873. assert sizeof(PBKDF2PARAM_st) == 16, sizeof(PBKDF2PARAM_st)
  1874. assert alignment(PBKDF2PARAM_st) == 4, alignment(PBKDF2PARAM_st)
  1875. PBKDF2PARAM = PBKDF2PARAM_st
  1876. class pkcs8_priv_key_info_st(Structure):
  1877. pass
  1878. pkcs8_priv_key_info_st._fields_ = [
  1879. ('broken', c_int),
  1880. ('version', POINTER(ASN1_INTEGER)),
  1881. ('pkeyalg', POINTER(X509_ALGOR)),
  1882. ('pkey', POINTER(ASN1_TYPE)),
  1883. ('attributes', POINTER(STACK)),
  1884. ]
  1885. assert sizeof(pkcs8_priv_key_info_st) == 20, sizeof(pkcs8_priv_key_info_st)
  1886. assert alignment(pkcs8_priv_key_info_st) == 4, alignment(pkcs8_priv_key_info_st)
  1887. PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st
  1888. class x509_hash_dir_st(Structure):
  1889. pass
  1890. x509_hash_dir_st._fields_ = [
  1891. ('num_dirs', c_int),
  1892. ('dirs', POINTER(STRING)),
  1893. ('dirs_type', POINTER(c_int)),
  1894. ('num_dirs_alloced', c_int),
  1895. ]
  1896. assert sizeof(x509_hash_dir_st) == 16, sizeof(x509_hash_dir_st)
  1897. assert alignment(x509_hash_dir_st) == 4, alignment(x509_hash_dir_st)
  1898. X509_HASH_DIR_CTX = x509_hash_dir_st
  1899. class x509_file_st(Structure):
  1900. pass
  1901. x509_file_st._fields_ = [
  1902. ('num_paths', c_int),
  1903. ('num_alloced', c_int),
  1904. ('paths', POINTER(STRING)),
  1905. ('path_type', POINTER(c_int)),
  1906. ]
  1907. assert sizeof(x509_file_st) == 16, sizeof(x509_file_st)
  1908. assert alignment(x509_file_st) == 4, alignment(x509_file_st)
  1909. X509_CERT_FILE_CTX = x509_file_st
  1910. class x509_object_st(Structure):
  1911. pass
  1912. class N14x509_object_st4DOLLAR_14E(Union):
  1913. pass
  1914. N14x509_object_st4DOLLAR_14E._fields_ = [
  1915. ('ptr', STRING),
  1916. ('x509', POINTER(X509)),
  1917. ('crl', POINTER(X509_CRL)),
  1918. ('pkey', POINTER(EVP_PKEY)),
  1919. ]
  1920. assert sizeof(N14x509_object_st4DOLLAR_14E) == 4, sizeof(N14x509_object_st4DOLLAR_14E)
  1921. assert alignment(N14x509_object_st4DOLLAR_14E) == 4, alignment(N14x509_object_st4DOLLAR_14E)
  1922. x509_object_st._fields_ = [
  1923. ('type', c_int),
  1924. ('data', N14x509_object_st4DOLLAR_14E),
  1925. ]
  1926. assert sizeof(x509_object_st) == 8, sizeof(x509_object_st)
  1927. assert alignment(x509_object_st) == 4, alignment(x509_object_st)
  1928. X509_OBJECT = x509_object_st
  1929. class x509_lookup_st(Structure):
  1930. pass
  1931. X509_LOOKUP = x509_lookup_st
  1932. class x509_lookup_method_st(Structure):
  1933. pass
  1934. x509_lookup_method_st._fields_ = [
  1935. ('name', STRING),
  1936. ('new_item', CFUNCTYPE(c_int, POINTER(X509_LOOKUP))),
  1937. ('free', CFUNCTYPE(None, POINTER(X509_LOOKUP))),
  1938. ('init', CFUNCTYPE(c_int, POINTER(X509_LOOKUP))),
  1939. ('shutdown', CFUNCTYPE(c_int, POINTER(X509_LOOKUP))),
  1940. ('ctrl', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, STRING, c_long, POINTER(STRING))),
  1941. ('get_by_subject', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, POINTER(X509_NAME), POINTER(X509_OBJECT))),
  1942. ('get_by_issuer_serial', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, POINTER(X509_NAME), POINTER(ASN1_INTEGER), POINTER(X509_OBJECT))),
  1943. ('get_by_fingerprint', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, POINTER(c_ubyte), c_int, POINTER(X509_OBJECT))),
  1944. ('get_by_alias', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, STRING, c_int, POINTER(X509_OBJECT))),
  1945. ]
  1946. assert sizeof(x509_lookup_method_st) == 40, sizeof(x509_lookup_method_st)
  1947. assert alignment(x509_lookup_method_st) == 4, alignment(x509_lookup_method_st)
  1948. X509_LOOKUP_METHOD = x509_lookup_method_st
  1949. x509_store_st._fields_ = [
  1950. ('cache', c_int),
  1951. ('objs', POINTER(STACK)),
  1952. ('get_cert_methods', POINTER(STACK)),
  1953. ('flags', c_ulong),
  1954. ('purpose', c_int),
  1955. ('trust', c_int),
  1956. ('verify', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
  1957. ('verify_cb', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
  1958. ('get_issuer', CFUNCTYPE(c_int, POINTER(POINTER(X509)), POINTER(X509_STORE_CTX), POINTER(X509))),
  1959. ('check_issued', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509), POINTER(X509))),
  1960. ('check_revocation', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
  1961. ('get_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(POINTER(X509_CRL)), POINTER(X509))),
  1962. ('check_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509_CRL))),
  1963. ('cert_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509_CRL), POINTER(X509))),
  1964. ('cleanup', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
  1965. ('ex_data', CRYPTO_EX_DATA),
  1966. ('references', c_int),
  1967. ('depth', c_int),
  1968. ]
  1969. assert sizeof(x509_store_st) == 76, sizeof(x509_store_st)
  1970. assert alignment(x509_store_st) == 4, alignment(x509_store_st)
  1971. x509_lookup_st._fields_ = [
  1972. ('init', c_int),
  1973. ('skip', c_int),
  1974. ('method', POINTER(X509_LOOKUP_METHOD)),
  1975. ('method_data', STRING),
  1976. ('store_ctx', POINTER(X509_STORE)),
  1977. ]
  1978. assert sizeof(x509_lookup_st) == 20, sizeof(x509_lookup_st)
  1979. assert alignment(x509_lookup_st) == 4, alignment(x509_lookup_st)
  1980. time_t = __darwin_time_t
  1981. x509_store_ctx_st._fields_ = [
  1982. ('ctx', POINTER(X509_STORE)),
  1983. ('current_method', c_int),
  1984. ('cert', POINTER(X509)),
  1985. ('untrusted', POINTER(STACK)),
  1986. ('purpose', c_int),
  1987. ('trust', c_int),
  1988. ('check_time', time_t),
  1989. ('flags', c_ulong),
  1990. ('other_ctx', c_void_p),
  1991. ('verify', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
  1992. ('verify_cb', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
  1993. ('get_issuer', CFUNCTYPE(c_int, POINTER(POINTER(X509)), POINTER(X509_STORE_CTX), POINTER(X509))),
  1994. ('check_issued', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509), POINTER(X509))),
  1995. ('check_revocation', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
  1996. ('get_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(POINTER(X509_CRL)), POINTER(X509))),
  1997. ('check_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509_CRL))),
  1998. ('cert_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509_CRL), POINTER(X509))),
  1999. ('cleanup', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
  2000. ('depth', c_int),
  2001. ('valid', c_int),
  2002. ('last_untrusted', c_int),
  2003. ('chain', POINTER(STACK)),
  2004. ('error_depth', c_int),
  2005. ('error', c_int),
  2006. ('current_cert', POINTER(X509)),
  2007. ('current_issuer', POINTER(X509)),
  2008. ('current_crl', POINTER(X509_CRL)),
  2009. ('ex_data', CRYPTO_EX_DATA),
  2010. ]
  2011. assert sizeof(x509_store_ctx_st) == 116, sizeof(x509_store_ctx_st)
  2012. assert alignment(x509_store_ctx_st) == 4, alignment(x509_store_ctx_st)
  2013. va_list = __darwin_va_list
  2014. __darwin_off_t = __int64_t
  2015. fpos_t = __darwin_off_t
  2016. class __sbuf(Structure):
  2017. pass
  2018. __sbuf._fields_ = [
  2019. ('_base', POINTER(c_ubyte)),
  2020. ('_size', c_int),
  2021. ]
  2022. assert sizeof(__sbuf) == 8, sizeof(__sbuf)
  2023. assert alignment(__sbuf) == 4, alignment(__sbuf)
  2024. class __sFILEX(Structure):
  2025. pass
  2026. __sFILEX._fields_ = [
  2027. ]
  2028. class __sFILE(Structure):
  2029. pass
  2030. __sFILE._pack_ = 4
  2031. __sFILE._fields_ = [
  2032. ('_p', POINTER(c_ubyte)),
  2033. ('_r', c_int),
  2034. ('_w', c_int),
  2035. ('_flags', c_short),
  2036. ('_file', c_short),
  2037. ('_bf', __sbuf),
  2038. ('_lbfsize', c_int),
  2039. ('_cookie', c_void_p),
  2040. ('_close', CFUNCTYPE(c_int, c_void_p)),
  2041. ('_read', CFUNCTYPE(c_int, c_void_p, STRING, c_int)),
  2042. ('_seek', CFUNCTYPE(fpos_t, c_void_p, c_longlong, c_int)),
  2043. ('_write', CFUNCTYPE(c_int, c_void_p, STRING, c_int)),
  2044. ('_ub', __sbuf),
  2045. ('_extra', POINTER(__sFILEX)),
  2046. ('_ur', c_int),
  2047. ('_ubuf', c_ubyte * 3),
  2048. ('_nbuf', c_ubyte * 1),
  2049. ('_lb', __sbuf),
  2050. ('_blksize', c_int),
  2051. ('_offset', fpos_t),
  2052. ]
  2053. assert sizeof(__sFILE) == 88, sizeof(__sFILE)
  2054. assert alignment(__sFILE) == 4, alignment(__sFILE)
  2055. FILE = __sFILE
  2056. ct_rune_t = __darwin_ct_rune_t
  2057. rune_t = __darwin_rune_t
  2058. class div_t(Structure):
  2059. pass
  2060. div_t._fields_ = [
  2061. ('quot', c_int),
  2062. ('rem', c_int),
  2063. ]
  2064. assert sizeof(div_t) == 8, sizeof(div_t)
  2065. assert alignment(div_t) == 4, alignment(div_t)
  2066. class ldiv_t(Structure):
  2067. pass
  2068. ldiv_t._fields_ = [
  2069. ('quot', c_long),
  2070. ('rem', c_long),
  2071. ]
  2072. assert sizeof(ldiv_t) == 8, sizeof(ldiv_t)
  2073. assert alignment(ldiv_t) == 4, alignment(ldiv_t)
  2074. class lldiv_t(Structure):
  2075. pass
  2076. lldiv_t._pack_ = 4
  2077. lldiv_t._fields_ = [
  2078. ('quot', c_longlong),
  2079. ('rem', c_longlong),
  2080. ]
  2081. assert sizeof(lldiv_t) == 16, sizeof(lldiv_t)
  2082. assert alignment(lldiv_t) == 4, alignment(lldiv_t)
  2083. __darwin_dev_t = __int32_t
  2084. dev_t = __darwin_dev_t
  2085. __darwin_mode_t = __uint16_t
  2086. mode_t = __darwin_mode_t
  2087. class mcontext(Structure):
  2088. pass
  2089. mcontext._fields_ = [
  2090. ]
  2091. class mcontext64(Structure):
  2092. pass
  2093. mcontext64._fields_ = [
  2094. ]
  2095. class __darwin_pthread_handler_rec(Structure):
  2096. pass
  2097. __darwin_pthread_handler_rec._fields_ = [
  2098. ('__routine', CFUNCTYPE(None, c_void_p)),
  2099. ('__arg', c_void_p),
  2100. ('__next', POINTER(__darwin_pthread_handler_rec)),
  2101. ]
  2102. assert sizeof(__darwin_pthread_handler_rec) == 12, sizeof(__darwin_pthread_handler_rec)
  2103. assert alignment(__darwin_pthread_handler_rec) == 4, alignment(__darwin_pthread_handler_rec)
  2104. class _opaque_pthread_attr_t(Structure):
  2105. pass
  2106. _opaque_pthread_attr_t._fields_ = [
  2107. ('__sig', c_long),
  2108. ('__opaque', c_char * 36),
  2109. ]
  2110. assert sizeof(_opaque_pthread_attr_t) == 40, sizeof(_opaque_pthread_attr_t)
  2111. assert alignment(_opaque_pthread_attr_t) == 4, alignment(_opaque_pthread_attr_t)
  2112. class _opaque_pthread_cond_t(Structure):
  2113. pass
  2114. _opaque_pthread_cond_t._fields_ = [
  2115. ('__sig', c_long),
  2116. ('__opaque', c_char * 24),
  2117. ]
  2118. assert sizeof(_opaque_pthread_cond_t) == 28, sizeof(_opaque_pthread_cond_t)
  2119. assert alignment(_opaque_pthread_cond_t) == 4, alignment(_opaque_pthread_cond_t)
  2120. class _opaque_pthread_condattr_t(Structure):
  2121. pass
  2122. _opaque_pthread_condattr_t._fields_ = [
  2123. ('__sig', c_long),
  2124. ('__opaque', c_char * 4),
  2125. ]
  2126. assert sizeof(_opaque_pthread_condattr_t) == 8, sizeof(_opaque_pthread_condattr_t)
  2127. assert alignment(_opaque_pthread_condattr_t) == 4, alignment(_opaque_pthread_condattr_t)
  2128. class _opaque_pthread_mutex_t(Structure):
  2129. pass
  2130. _opaque_pthread_mutex_t._fields_ = [
  2131. ('__sig', c_long),
  2132. ('__opaque', c_char * 40),
  2133. ]
  2134. assert sizeof(_opaque_pthread_mutex_t) == 44, sizeof(_opaque_pthread_mutex_t)
  2135. assert alignment(_opaque_pthread_mutex_t) == 4, alignment(_opaque_pthread_mutex_t)
  2136. class _opaque_pthread_mutexattr_t(Structure):
  2137. pass
  2138. _opaque_pthread_mutexattr_t._fields_ = [
  2139. ('__sig', c_long),
  2140. ('__opaque', c_char * 8),
  2141. ]
  2142. assert sizeof(_opaque_pthread_mutexattr_t) == 12, sizeof(_opaque_pthread_mutexattr_t)
  2143. assert alignment(_opaque_pthread_mutexattr_t) == 4, alignment(_opaque_pthread_mutexattr_t)
  2144. class _opaque_pthread_once_t(Structure):
  2145. pass
  2146. _opaque_pthread_once_t._fields_ = [
  2147. ('__sig', c_long),
  2148. ('__opaque', c_char * 4),
  2149. ]
  2150. assert sizeof(_opaque_pthread_once_t) == 8, sizeof(_opaque_pthread_once_t)
  2151. assert alignment(_opaque_pthread_once_t) == 4, alignment(_opaque_pthread_once_t)
  2152. class _opaque_pthread_rwlock_t(Structure):
  2153. pass
  2154. _opaque_pthread_rwlock_t._fields_ = [
  2155. ('__sig', c_long),
  2156. ('__opaque', c_char * 124),
  2157. ]
  2158. assert sizeof(_opaque_pthread_rwlock_t) == 128, sizeof(_opaque_pthread_rwlock_t)
  2159. assert alignment(_opaque_pthread_rwlock_t) == 4, alignment(_opaque_pthread_rwlock_t)
  2160. class _opaque_pthread_rwlockattr_t(Structure):
  2161. pass
  2162. _opaque_pthread_rwlockattr_t._fields_ = [
  2163. ('__sig', c_long),
  2164. ('__opaque', c_char * 12),
  2165. ]
  2166. assert sizeof(_opaque_pthread_rwlockattr_t) == 16, sizeof(_opaque_pthread_rwlockattr_t)
  2167. assert alignment(_opaque_pthread_rwlockattr_t) == 4, alignment(_opaque_pthread_rwlockattr_t)
  2168. class _opaque_pthread_t(Structure):
  2169. pass
  2170. _opaque_pthread_t._fields_ = [
  2171. ('__sig', c_long),
  2172. ('__cleanup_stack', POINTER(__darwin_pthread_handler_rec)),
  2173. ('__opaque', c_char * 596),
  2174. ]
  2175. assert sizeof(_opaque_pthread_t) == 604, sizeof(_opaque_pthread_t)
  2176. assert alignment(_opaque_pthread_t) == 4, alignment(_opaque_pthread_t)
  2177. __darwin_blkcnt_t = __int64_t
  2178. __darwin_blksize_t = __int32_t
  2179. __darwin_fsblkcnt_t = c_uint
  2180. __darwin_fsfilcnt_t = c_uint
  2181. __darwin_gid_t = __uint32_t
  2182. __darwin_id_t = __uint32_t
  2183. __darwin_ino_t = __uint32_t
  2184. __darwin_mach_port_name_t = __darwin_natural_t
  2185. __darwin_mach_port_t = __darwin_mach_port_name_t
  2186. __darwin_mcontext_t = POINTER(mcontext)
  2187. __darwin_mcontext64_t = POINTER(mcontext64)
  2188. __darwin_pid_t = __int32_t
  2189. __darwin_pthread_attr_t = _opaque_pthread_attr_t
  2190. __darwin_pthread_cond_t = _opaque_pthread_cond_t
  2191. __darwin_pthread_condattr_t = _opaque_pthread_condattr_t
  2192. __darwin_pthread_key_t = c_ulong
  2193. __darwin_pthread_mutex_t = _opaque_pthread_mutex_t
  2194. __darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t
  2195. __darwin_pthread_once_t = _opaque_pthread_once_t
  2196. __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t
  2197. __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t
  2198. __darwin_pthread_t = POINTER(_opaque_pthread_t)
  2199. __darwin_sigset_t = __uint32_t
  2200. __darwin_suseconds_t = __int32_t
  2201. __darwin_uid_t = __uint32_t
  2202. __darwin_useconds_t = __uint32_t
  2203. __darwin_uuid_t = c_ubyte * 16
  2204. class sigaltstack(Structure):
  2205. pass
  2206. sigaltstack._fields_ = [
  2207. ('ss_sp', c_void_p),
  2208. ('ss_size', __darwin_size_t),
  2209. ('ss_flags', c_int),
  2210. ]
  2211. assert sizeof(sigaltstack) == 12, sizeof(sigaltstack)
  2212. assert alignment(sigaltstack) == 4, alignment(sigaltstack)
  2213. __darwin_stack_t = sigaltstack
  2214. class ucontext(Structure):
  2215. pass
  2216. ucontext._fields_ = [
  2217. ('uc_onstack', c_int),
  2218. ('uc_sigmask', __darwin_sigset_t),
  2219. ('uc_stack', __darwin_stack_t),
  2220. ('uc_link', POINTER(ucontext)),
  2221. ('uc_mcsize', __darwin_size_t),
  2222. ('uc_mcontext', __darwin_mcontext_t),
  2223. ]
  2224. assert sizeof(ucontext) == 32, sizeof(ucontext)
  2225. assert alignment(ucontext) == 4, alignment(ucontext)
  2226. __darwin_ucontext_t = ucontext
  2227. class ucontext64(Structure):
  2228. pass
  2229. ucontext64._fields_ = [
  2230. ('uc_onstack', c_int),
  2231. ('uc_sigmask', __darwin_sigset_t),
  2232. ('uc_stack', __darwin_stack_t),
  2233. ('uc_link', POINTER(ucontext64)),
  2234. ('uc_mcsize', __darwin_size_t),
  2235. ('uc_mcontext64', __darwin_mcontext64_t),
  2236. ]
  2237. assert sizeof(ucontext64) == 32, sizeof(ucontext64)
  2238. assert alignment(ucontext64) == 4, alignment(ucontext64)
  2239. __darwin_ucontext64_t = ucontext64
  2240. class timeval(Structure):
  2241. pass
  2242. timeval._fields_ = [
  2243. ('tv_sec', __darwin_time_t),
  2244. ('tv_usec', __darwin_suseconds_t),
  2245. ]
  2246. assert sizeof(timeval) == 8, sizeof(timeval)
  2247. assert alignment(timeval) == 4, alignment(timeval)
  2248. rlim_t = __int64_t
  2249. class rusage(Structure):
  2250. pass
  2251. rusage._fields_ = [
  2252. ('ru_utime', timeval),
  2253. ('ru_stime', timeval),
  2254. ('ru_maxrss', c_long),
  2255. ('ru_ixrss', c_long),
  2256. ('ru_idrss', c_long),
  2257. ('ru_isrss', c_long),
  2258. ('ru_minflt', c_long),
  2259. ('ru_majflt', c_long),
  2260. ('ru_nswap', c_long),
  2261. ('ru_inblock', c_long),
  2262. ('ru_oublock', c_long),
  2263. ('ru_msgsnd', c_long),
  2264. ('ru_msgrcv', c_long),
  2265. ('ru_nsignals', c_long),
  2266. ('ru_nvcsw', c_long),
  2267. ('ru_nivcsw', c_long),
  2268. ]
  2269. assert sizeof(rusage) == 72, sizeof(rusage)
  2270. assert alignment(rusage) == 4, alignment(rusage)
  2271. class rlimit(Structure):
  2272. pass
  2273. rlimit._pack_ = 4
  2274. rlimit._fields_ = [
  2275. ('rlim_cur', rlim_t),
  2276. ('rlim_max', rlim_t),
  2277. ]
  2278. assert sizeof(rlimit) == 16, sizeof(rlimit)
  2279. assert alignment(rlimit) == 4, alignment(rlimit)
  2280. mcontext_t = __darwin_mcontext_t
  2281. mcontext64_t = __darwin_mcontext64_t
  2282. pthread_attr_t = __darwin_pthread_attr_t
  2283. sigset_t = __darwin_sigset_t
  2284. ucontext_t = __darwin_ucontext_t
  2285. ucontext64_t = __darwin_ucontext64_t
  2286. uid_t = __darwin_uid_t
  2287. class sigval(Union):
  2288. pass
  2289. sigval._fields_ = [
  2290. ('sival_int', c_int),
  2291. ('sival_ptr', c_void_p),
  2292. ]
  2293. assert sizeof(sigval) == 4, sizeof(sigval)
  2294. assert alignment(sigval) == 4, alignment(sigval)
  2295. class sigevent(Structure):
  2296. pass
  2297. sigevent._fields_ = [
  2298. ('sigev_notify', c_int),
  2299. ('sigev_signo', c_int),
  2300. ('sigev_value', sigval),
  2301. ('sigev_notify_function', CFUNCTYPE(None, sigval)),
  2302. ('sigev_notify_attributes', POINTER(pthread_attr_t)),
  2303. ]
  2304. assert sizeof(sigevent) == 20, sizeof(sigevent)
  2305. assert alignment(sigevent) == 4, alignment(sigevent)
  2306. class __siginfo(Structure):
  2307. pass
  2308. pid_t = __darwin_pid_t
  2309. __siginfo._fields_ = [
  2310. ('si_signo', c_int),
  2311. ('si_errno', c_int),
  2312. ('si_code', c_int),
  2313. ('si_pid', pid_t),
  2314. ('si_uid', uid_t),
  2315. ('si_status', c_int),
  2316. ('si_addr', c_void_p),
  2317. ('si_value', sigval),
  2318. ('si_band', c_long),
  2319. ('pad', c_ulong * 7),
  2320. ]
  2321. assert sizeof(__siginfo) == 64, sizeof(__siginfo)
  2322. assert alignment(__siginfo) == 4, alignment(__siginfo)
  2323. siginfo_t = __siginfo
  2324. class __sigaction_u(Union):
  2325. pass
  2326. __sigaction_u._fields_ = [
  2327. ('__sa_handler', CFUNCTYPE(None, c_int)),
  2328. ('__sa_sigaction', CFUNCTYPE(None, c_int, POINTER(__siginfo), c_void_p)),
  2329. ]
  2330. assert sizeof(__sigaction_u) == 4, sizeof(__sigaction_u)
  2331. assert alignment(__sigaction_u) == 4, alignment(__sigaction_u)
  2332. class __sigaction(Structure):
  2333. pass
  2334. __sigaction._fields_ = [
  2335. ('__sigaction_u', __sigaction_u),
  2336. ('sa_tramp', CFUNCTYPE(None, c_void_p, c_int, c_int, POINTER(siginfo_t), c_void_p)),
  2337. ('sa_mask', sigset_t),
  2338. ('sa_flags', c_int),
  2339. ]
  2340. assert sizeof(__sigaction) == 16, sizeof(__sigaction)
  2341. assert alignment(__sigaction) == 4, alignment(__sigaction)
  2342. class sigaction(Structure):
  2343. pass
  2344. sigaction._fields_ = [
  2345. ('__sigaction_u', __sigaction_u),
  2346. ('sa_mask', sigset_t),
  2347. ('sa_flags', c_int),
  2348. ]
  2349. assert sizeof(sigaction) == 12, sizeof(sigaction)
  2350. assert alignment(sigaction) == 4, alignment(sigaction)
  2351. sig_t = CFUNCTYPE(None, c_int)
  2352. stack_t = __darwin_stack_t
  2353. class sigvec(Structure):
  2354. pass
  2355. sigvec._fields_ = [
  2356. ('sv_handler', CFUNCTYPE(None, c_int)),
  2357. ('sv_mask', c_int),
  2358. ('sv_flags', c_int),
  2359. ]
  2360. assert sizeof(sigvec) == 12, sizeof(sigvec)
  2361. assert alignment(sigvec) == 4, alignment(sigvec)
  2362. class sigstack(Structure):
  2363. pass
  2364. sigstack._fields_ = [
  2365. ('ss_sp', STRING),
  2366. ('ss_onstack', c_int),
  2367. ]
  2368. assert sizeof(sigstack) == 8, sizeof(sigstack)
  2369. assert alignment(sigstack) == 4, alignment(sigstack)
  2370. u_char = c_ubyte
  2371. u_short = c_ushort
  2372. u_int = c_uint
  2373. u_long = c_ulong
  2374. ushort = c_ushort
  2375. uint = c_uint
  2376. u_quad_t = u_int64_t
  2377. quad_t = int64_t
  2378. qaddr_t = POINTER(quad_t)
  2379. caddr_t = STRING
  2380. daddr_t = int32_t
  2381. fixpt_t = u_int32_t
  2382. blkcnt_t = __darwin_blkcnt_t
  2383. blksize_t = __darwin_blksize_t
  2384. gid_t = __darwin_gid_t
  2385. in_addr_t = __uint32_t
  2386. in_port_t = __uint16_t
  2387. ino_t = __darwin_ino_t
  2388. key_t = __int32_t
  2389. nlink_t = __uint16_t
  2390. off_t = __darwin_off_t
  2391. segsz_t = int32_t
  2392. swblk_t = int32_t
  2393. clock_t = __darwin_clock_t
  2394. ssize_t = __darwin_ssize_t
  2395. useconds_t = __darwin_useconds_t
  2396. suseconds_t = __darwin_suseconds_t
  2397. fd_mask = __int32_t
  2398. class fd_set(Structure):
  2399. pass
  2400. fd_set._fields_ = [
  2401. ('fds_bits', __int32_t * 32),
  2402. ]
  2403. assert sizeof(fd_set) == 128, sizeof(fd_set)
  2404. assert alignment(fd_set) == 4, alignment(fd_set)
  2405. pthread_cond_t = __darwin_pthread_cond_t
  2406. pthread_condattr_t = __darwin_pthread_condattr_t
  2407. pthread_mutex_t = __darwin_pthread_mutex_t
  2408. pthread_mutexattr_t = __darwin_pthread_mutexattr_t
  2409. pthread_once_t = __darwin_pthread_once_t
  2410. pthread_rwlock_t = __darwin_pthread_rwlock_t
  2411. pthread_rwlockattr_t = __darwin_pthread_rwlockattr_t
  2412. pthread_t = __darwin_pthread_t
  2413. pthread_key_t = __darwin_pthread_key_t
  2414. fsblkcnt_t = __darwin_fsblkcnt_t
  2415. fsfilcnt_t = __darwin_fsfilcnt_t
  2416. # values for enumeration 'idtype_t'
  2417. idtype_t = c_int # enum
  2418. id_t = __darwin_id_t
  2419. class wait(Union):
  2420. pass
  2421. class N4wait3DOLLAR_3E(Structure):
  2422. pass
  2423. N4wait3DOLLAR_3E._fields_ = [
  2424. ('w_Termsig', c_uint, 7),
  2425. ('w_Coredump', c_uint, 1),
  2426. ('w_Retcode', c_uint, 8),
  2427. ('w_Filler', c_uint, 16),
  2428. ]
  2429. assert sizeof(N4wait3DOLLAR_3E) == 4, sizeof(N4wait3DOLLAR_3E)
  2430. assert alignment(N4wait3DOLLAR_3E) == 4, alignment(N4wait3DOLLAR_3E)
  2431. class N4wait3DOLLAR_4E(Structure):
  2432. pass
  2433. N4wait3DOLLAR_4E._fields_ = [
  2434. ('w_Stopval', c_uint, 8),
  2435. ('w_Stopsig', c_uint, 8),
  2436. ('w_Filler', c_uint, 16),
  2437. ]
  2438. assert sizeof(N4wait3DOLLAR_4E) == 4, sizeof(N4wait3DOLLAR_4E)
  2439. assert alignment(N4wait3DOLLAR_4E) == 4, alignment(N4wait3DOLLAR_4E)
  2440. wait._fields_ = [
  2441. ('w_status', c_int),
  2442. ('w_T', N4wait3DOLLAR_3E),
  2443. ('w_S', N4wait3DOLLAR_4E),
  2444. ]
  2445. assert sizeof(wait) == 4, sizeof(wait)
  2446. assert alignment(wait) == 4, alignment(wait)
  2447. class timespec(Structure):
  2448. pass
  2449. timespec._fields_ = [
  2450. ('tv_sec', time_t),
  2451. ('tv_nsec', c_long),
  2452. ]
  2453. assert sizeof(timespec) == 8, sizeof(timespec)
  2454. assert alignment(timespec) == 4, alignment(timespec)
  2455. class tm(Structure):
  2456. pass
  2457. tm._fields_ = [
  2458. ('tm_sec', c_int),
  2459. ('tm_min', c_int),
  2460. ('tm_hour', c_int),
  2461. ('tm_mday', c_int),
  2462. ('tm_mon', c_int),
  2463. ('tm_year', c_int),
  2464. ('tm_wday', c_int),
  2465. ('tm_yday', c_int),
  2466. ('tm_isdst', c_int),
  2467. ('tm_gmtoff', c_long),
  2468. ('tm_zone', STRING),
  2469. ]
  2470. assert sizeof(tm) == 44, sizeof(tm)
  2471. assert alignment(tm) == 4, alignment(tm)
  2472. __gnuc_va_list = STRING
  2473. ptrdiff_t = c_int
  2474. int8_t = c_byte
  2475. int16_t = c_short
  2476. uint8_t = c_ubyte
  2477. uint16_t = c_ushort
  2478. uint32_t = c_uint
  2479. uint64_t = c_ulonglong
  2480. int_least8_t = int8_t
  2481. int_least16_t = int16_t
  2482. int_least32_t = int32_t
  2483. int_least64_t = int64_t
  2484. uint_least8_t = uint8_t
  2485. uint_least16_t = uint16_t
  2486. uint_least32_t = uint32_t
  2487. uint_least64_t = uint64_t
  2488. int_fast8_t = int8_t
  2489. int_fast16_t = int16_t
  2490. int_fast32_t = int32_t
  2491. int_fast64_t = int64_t
  2492. uint_fast8_t = uint8_t
  2493. uint_fast16_t = uint16_t
  2494. uint_fast32_t = uint32_t
  2495. uint_fast64_t = uint64_t
  2496. intptr_t = c_long
  2497. uintptr_t = c_ulong
  2498. intmax_t = c_longlong
  2499. uintmax_t = c_ulonglong
  2500. __all__ = ['ENGINE', 'pkcs7_enc_content_st', '__int16_t',
  2501. 'X509_REVOKED', 'SSL_CTX', 'UIT_BOOLEAN',
  2502. '__darwin_time_t', 'ucontext64_t', 'int_fast32_t',
  2503. 'pem_ctx_st', 'uint8_t', 'fpos_t', 'X509', 'COMP_CTX',
  2504. 'tm', 'N10pem_ctx_st4DOLLAR_17E', 'swblk_t',
  2505. 'ASN1_TEMPLATE', '__darwin_pthread_t', 'fixpt_t',
  2506. 'BIO_METHOD', 'ASN1_PRINTABLESTRING', 'EVP_ENCODE_CTX',
  2507. 'dh_method', 'bio_f_buffer_ctx_struct', 'in_port_t',
  2508. 'X509_SIG', '__darwin_ssize_t', '__darwin_sigset_t',
  2509. 'wait', 'uint_fast16_t', 'N12asn1_type_st4DOLLAR_11E',
  2510. 'uint_least8_t', 'pthread_rwlock_t', 'ASN1_IA5STRING',
  2511. 'fsfilcnt_t', 'ucontext', '__uint64_t', 'timespec',
  2512. 'x509_cinf_st', 'COMP_METHOD', 'MD5_CTX', 'buf_mem_st',
  2513. 'ASN1_ENCODING_st', 'PBEPARAM', 'X509_NAME_ENTRY',
  2514. '__darwin_va_list', 'ucontext_t', 'lhash_st',
  2515. 'N4wait3DOLLAR_4E', '__darwin_uuid_t',
  2516. '_ossl_old_des_ks_struct', 'id_t', 'ASN1_BIT_STRING',
  2517. 'va_list', '__darwin_wchar_t', 'pthread_key_t',
  2518. 'pkcs7_signer_info_st', 'ASN1_METHOD', 'DSA_SIG', 'DSA',
  2519. 'UIT_NONE', 'pthread_t', '__darwin_useconds_t',
  2520. 'uint_fast8_t', 'UI_STRING', 'DES_cblock',
  2521. '__darwin_mcontext64_t', 'rlim_t', 'PEM_Encode_Seal_st',
  2522. 'SHAstate_st', 'u_quad_t', 'openssl_fptr',
  2523. '_opaque_pthread_rwlockattr_t',
  2524. 'N18x509_attributes_st4DOLLAR_13E',
  2525. '__darwin_pthread_rwlock_t', 'daddr_t', 'ui_string_st',
  2526. 'x509_file_st', 'X509_req_info_st', 'int_least64_t',
  2527. 'evp_Encode_Ctx_st', 'X509_OBJECTS', 'CRYPTO_EX_DATA',
  2528. '__int8_t', 'AUTHORITY_KEYID_st', '_opaque_pthread_attr_t',
  2529. 'sigstack', 'EVP_CIPHER_CTX', 'X509_extension_st', 'pid_t',
  2530. 'RSA_METHOD', 'PEM_USER', 'pem_recip_st', 'env_md_ctx_st',
  2531. 'rc5_key_st', 'ui_st', 'X509_PUBKEY', 'u_int8_t',
  2532. 'ASN1_ITEM_st', 'pkcs7_recip_info_st', 'ssl2_state_st',
  2533. 'off_t', 'N10ssl_ctx_st4DOLLAR_18E', 'crypto_ex_data_st',
  2534. 'ui_method_st', '__darwin_pthread_rwlockattr_t',
  2535. 'CRYPTO_EX_dup', '__darwin_ino_t', '__sFILE',
  2536. 'OSUnknownByteOrder', 'BN_MONT_CTX', 'ASN1_NULL', 'time_t',
  2537. 'CRYPTO_EX_new', 'asn1_type_st', 'CRYPTO_EX_DATA_FUNCS',
  2538. 'user_time_t', 'BIGNUM', 'pthread_rwlockattr_t',
  2539. 'ASN1_VALUE_st', 'DH_METHOD', '__darwin_off_t',
  2540. '_opaque_pthread_t', 'bn_blinding_st', 'RSA', 'ssize_t',
  2541. 'mcontext64_t', 'user_long_t', 'fsblkcnt_t', 'cert_st',
  2542. '__darwin_pthread_condattr_t', 'X509_PKEY',
  2543. '__darwin_id_t', '__darwin_nl_item', 'SSL2_STATE', 'FILE',
  2544. 'pthread_mutexattr_t', 'size_t',
  2545. '_ossl_old_des_key_schedule', 'pkcs7_issuer_and_serial_st',
  2546. 'sigval', 'CRYPTO_MEM_LEAK_CB', 'X509_NAME', 'blkcnt_t',
  2547. 'uint_least16_t', '__darwin_dev_t', 'evp_cipher_info_st',
  2548. 'BN_BLINDING', 'ssl3_state_st', 'uint_least64_t',
  2549. 'user_addr_t', 'DES_key_schedule', 'RIPEMD160_CTX',
  2550. 'u_char', 'X509_algor_st', 'uid_t', 'sess_cert_st',
  2551. 'u_int64_t', 'u_int16_t', 'sigset_t', '__darwin_ptrdiff_t',
  2552. 'ASN1_CTX', 'STACK', '__int32_t', 'UI_METHOD',
  2553. 'NETSCAPE_SPKI', 'UIT_PROMPT', 'st_CRYPTO_EX_DATA_IMPL',
  2554. 'cast_key_st', 'X509_HASH_DIR_CTX', 'sigevent',
  2555. 'user_ssize_t', 'clock_t', 'aes_key_st',
  2556. '__darwin_socklen_t', '__darwin_intptr_t', 'int_fast64_t',
  2557. 'asn1_string_table_st', 'uint_fast32_t',
  2558. 'ASN1_VISIBLESTRING', 'DSA_SIG_st', 'obj_name_st',
  2559. 'X509_LOOKUP_METHOD', 'u_int32_t', 'EVP_CIPHER_INFO',
  2560. '__gnuc_va_list', 'AES_KEY', 'PKCS7_ISSUER_AND_SERIAL',
  2561. 'BN_CTX', '__darwin_blkcnt_t', 'key_t', 'SHA_CTX',
  2562. 'pkcs7_signed_st', 'SSL', 'N10pem_ctx_st4DOLLAR_16E',
  2563. 'pthread_attr_t', 'EVP_MD', 'uint', 'ASN1_BOOLEAN',
  2564. 'ino_t', '__darwin_clock_t', 'ASN1_OCTET_STRING',
  2565. 'asn1_ctx_st', 'BIO_F_BUFFER_CTX', 'bn_mont_ctx_st',
  2566. 'X509_REQ_INFO', 'PEM_CTX', 'sigvec',
  2567. '__darwin_pthread_mutexattr_t', 'x509_attributes_st',
  2568. 'stack_t', '__darwin_mode_t', '__mbstate_t',
  2569. 'asn1_object_st', 'ASN1_ENCODING', '__uint8_t',
  2570. 'LHASH_NODE', 'PKCS7_SIGNER_INFO', 'asn1_method_st',
  2571. 'stack_st', 'bio_info_cb', 'div_t', 'UIT_VERIFY',
  2572. 'PBEPARAM_st', 'N4wait3DOLLAR_3E', 'quad_t', '__siginfo',
  2573. '__darwin_mbstate_t', 'rsa_st', 'ASN1_UNIVERSALSTRING',
  2574. 'uint64_t', 'ssl_comp_st', 'X509_OBJECT', 'pthread_cond_t',
  2575. 'DH', '__darwin_wctype_t', 'PKCS7_ENVELOPE', 'ASN1_TLC_st',
  2576. 'sig_atomic_t', 'BIO', 'nlink_t', 'BUF_MEM', 'SSL3_RECORD',
  2577. 'bio_method_st', 'timeval', 'UI_string_types', 'BIO_dummy',
  2578. 'ssl_ctx_st', 'NETSCAPE_CERT_SEQUENCE',
  2579. 'BIT_STRING_BITNAME_st', '__darwin_pthread_attr_t',
  2580. 'int8_t', '__darwin_wint_t', 'OBJ_NAME',
  2581. 'PKCS8_PRIV_KEY_INFO', 'PBE2PARAM_st',
  2582. 'LHASH_DOALL_FN_TYPE', 'x509_st', 'X509_VAL', 'dev_t',
  2583. 'ASN1_TEMPLATE_st', 'MD5state_st', '__uint16_t',
  2584. 'LHASH_DOALL_ARG_FN_TYPE', 'mdc2_ctx_st', 'SSL3_STATE',
  2585. 'ssl3_buffer_st', 'ASN1_ITEM_EXP',
  2586. '_opaque_pthread_condattr_t', 'mode_t', 'ASN1_VALUE',
  2587. 'qaddr_t', '__darwin_gid_t', 'EVP_PKEY', 'CRYPTO_EX_free',
  2588. '_ossl_old_des_cblock', 'X509_INFO', 'asn1_string_st',
  2589. 'intptr_t', 'UIT_INFO', 'int_fast8_t', 'sigaltstack',
  2590. 'env_md_st', 'LHASH', '__darwin_ucontext_t',
  2591. 'PKCS7_SIGN_ENVELOPE', '__darwin_mcontext_t', 'ct_rune_t',
  2592. 'MD2_CTX', 'pthread_once_t', 'SSL3_BUFFER', 'fd_mask',
  2593. 'ASN1_TYPE', 'PKCS7_SIGNED', 'ssl3_record_st', 'BF_KEY',
  2594. 'MD4state_st', 'MD4_CTX', 'int16_t', 'SSL_CIPHER',
  2595. 'rune_t', 'X509_TRUST', 'siginfo_t', 'X509_STORE',
  2596. '__sbuf', 'X509_STORE_CTX', '__darwin_blksize_t', 'ldiv_t',
  2597. 'ASN1_TIME', 'SSL_METHOD', 'X509_LOOKUP',
  2598. 'Netscape_spki_st', 'P_PID', 'sigaction', 'sig_t',
  2599. 'hostent', 'x509_cert_aux_st', '_opaque_pthread_cond_t',
  2600. 'segsz_t', 'ushort', '__darwin_ct_rune_t', 'fd_set',
  2601. 'BN_RECP_CTX', 'x509_lookup_st', 'uint16_t', 'pkcs7_st',
  2602. 'asn1_header_st', '__darwin_pthread_key_t',
  2603. 'x509_trust_st', '__darwin_pthread_handler_rec', 'int32_t',
  2604. 'X509_CRL_INFO', 'N11evp_pkey_st4DOLLAR_12E', 'MDC2_CTX',
  2605. 'N23_ossl_old_des_ks_struct4DOLLAR_10E', 'ASN1_HEADER',
  2606. 'X509_crl_info_st', 'LHASH_HASH_FN_TYPE',
  2607. '_opaque_pthread_mutexattr_t', 'ssl_st',
  2608. 'N8pkcs7_st4DOLLAR_15E', 'evp_pkey_st',
  2609. 'pkcs7_signedandenveloped_st', '__darwin_mach_port_t',
  2610. 'EVP_PBE_KEYGEN', '_opaque_pthread_mutex_t',
  2611. 'ASN1_UTCTIME', 'mcontext', 'crypto_ex_data_func_st',
  2612. 'u_long', 'PBKDF2PARAM_st', 'rc4_key_st', 'DSA_METHOD',
  2613. 'EVP_CIPHER', 'BIT_STRING_BITNAME', 'PKCS7_RECIP_INFO',
  2614. 'ssl3_enc_method', 'X509_CERT_AUX', 'uintmax_t',
  2615. 'int_fast16_t', 'RC5_32_KEY', 'ucontext64', 'ASN1_INTEGER',
  2616. 'u_short', 'N14x509_object_st4DOLLAR_14E', 'mcontext64',
  2617. 'X509_sig_st', 'ASN1_GENERALSTRING', 'PKCS7', '__sFILEX',
  2618. 'X509_name_entry_st', 'ssl_session_st', 'caddr_t',
  2619. 'bignum_st', 'X509_CINF', '__darwin_pthread_cond_t',
  2620. 'ASN1_TLC', 'PKCS7_ENCRYPT', 'NETSCAPE_SPKAC',
  2621. 'Netscape_spkac_st', 'idtype_t', 'UIT_ERROR',
  2622. 'uint_fast64_t', 'in_addr_t', 'pthread_mutex_t',
  2623. '__int64_t', 'ASN1_BMPSTRING', 'uint32_t',
  2624. 'PEM_ENCODE_SEAL_CTX', 'suseconds_t', 'ASN1_OBJECT',
  2625. 'X509_val_st', 'private_key_st', 'CRYPTO_dynlock',
  2626. 'X509_objects_st', 'CRYPTO_EX_DATA_IMPL',
  2627. 'pthread_condattr_t', 'PKCS7_DIGEST', 'uint_least32_t',
  2628. 'ASN1_STRING', '__uint32_t', 'P_PGID', 'rsa_meth_st',
  2629. 'X509_crl_st', 'RC2_KEY', '__darwin_fsfilcnt_t',
  2630. 'X509_revoked_st', 'PBE2PARAM', 'blksize_t',
  2631. 'Netscape_certificate_sequence', 'ssl_cipher_st',
  2632. 'bignum_ctx', 'register_t', 'ASN1_UTF8STRING',
  2633. 'pkcs7_encrypted_st', 'RC4_KEY', '__darwin_ucontext64_t',
  2634. 'N13ssl2_state_st4DOLLAR_19E', 'bn_recp_ctx_st',
  2635. 'CAST_KEY', 'X509_ATTRIBUTE', '__darwin_suseconds_t',
  2636. '__sigaction', 'user_ulong_t', 'syscall_arg_t',
  2637. 'evp_cipher_ctx_st', 'X509_ALGOR', 'mcontext_t',
  2638. 'const_DES_cblock', '__darwin_fsblkcnt_t', 'dsa_st',
  2639. 'int_least8_t', 'MD2state_st', 'X509_EXTENSION',
  2640. 'GEN_SESSION_CB', 'int_least16_t', '__darwin_wctrans_t',
  2641. 'PBKDF2PARAM', 'x509_lookup_method_st', 'pem_password_cb',
  2642. 'X509_info_st', 'x509_store_st', '__darwin_natural_t',
  2643. 'X509_pubkey_st', 'pkcs7_digest_st', '__darwin_size_t',
  2644. 'ASN1_STRING_TABLE', 'OSLittleEndian', 'RIPEMD160state_st',
  2645. 'pkcs7_enveloped_st', 'UI', 'ptrdiff_t', 'X509_REQ',
  2646. 'CRYPTO_dynlock_value', 'X509_req_st', 'x509_store_ctx_st',
  2647. 'N13ssl3_state_st4DOLLAR_20E', 'lhash_node_st',
  2648. '__darwin_pthread_mutex_t', 'LHASH_COMP_FN_TYPE',
  2649. '__darwin_rune_t', 'rlimit', '__darwin_pthread_once_t',
  2650. 'OSBigEndian', 'uintptr_t', '__darwin_uid_t', 'u_int',
  2651. 'ASN1_T61STRING', 'gid_t', 'ssl_method_st', 'ASN1_ITEM',
  2652. 'ASN1_ENUMERATED', '_opaque_pthread_rwlock_t',
  2653. 'pkcs8_priv_key_info_st', 'intmax_t', 'sigcontext',
  2654. 'X509_CRL', 'rc2_key_st', 'engine_st', 'x509_object_st',
  2655. '_opaque_pthread_once_t', 'DES_ks', 'SSL_COMP',
  2656. 'dsa_method', 'int64_t', 'bio_st', 'bf_key_st',
  2657. 'ASN1_GENERALIZEDTIME', 'PKCS7_ENC_CONTENT',
  2658. '__darwin_pid_t', 'lldiv_t', 'comp_method_st',
  2659. 'EVP_MD_CTX', 'evp_cipher_st', 'X509_name_st',
  2660. 'x509_hash_dir_st', '__darwin_mach_port_name_t',
  2661. 'useconds_t', 'user_size_t', 'SSL_SESSION', 'rusage',
  2662. 'ssl_crock_st', 'int_least32_t', '__sigaction_u', 'dh_st',
  2663. 'P_ALL', '__darwin_stack_t', 'N6DES_ks3DOLLAR_9E',
  2664. 'comp_ctx_st', 'X509_CERT_FILE_CTX']