PageRenderTime 120ms CodeModel.GetById 22ms app.highlight 84ms RepoModel.GetById 1ms app.codeStats 1ms

/Lib/lib2to3/tests/data/infinite_recursion.py

http://unladen-swallow.googlecode.com/
Python | 2669 lines | 2659 code | 5 blank | 5 comment | 0 complexity | 1814d487c988fd5798c42a2f0cd95ddf MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1# This file is used to verify that 2to3 falls back to a slower, iterative pattern matching
   2# scheme in the event that the faster recursive system fails due to infinite recursion.
   3from ctypes import *
   4STRING = c_char_p
   5
   6
   7OSUnknownByteOrder = 0
   8UIT_PROMPT = 1
   9P_PGID = 2
  10P_PID = 1
  11UIT_ERROR = 5
  12UIT_INFO = 4
  13UIT_NONE = 0
  14P_ALL = 0
  15UIT_VERIFY = 2
  16OSBigEndian = 2
  17UIT_BOOLEAN = 3
  18OSLittleEndian = 1
  19__darwin_nl_item = c_int
  20__darwin_wctrans_t = c_int
  21__darwin_wctype_t = c_ulong
  22__int8_t = c_byte
  23__uint8_t = c_ubyte
  24__int16_t = c_short
  25__uint16_t = c_ushort
  26__int32_t = c_int
  27__uint32_t = c_uint
  28__int64_t = c_longlong
  29__uint64_t = c_ulonglong
  30__darwin_intptr_t = c_long
  31__darwin_natural_t = c_uint
  32__darwin_ct_rune_t = c_int
  33class __mbstate_t(Union):
  34    pass
  35__mbstate_t._pack_ = 4
  36__mbstate_t._fields_ = [
  37    ('__mbstate8', c_char * 128),
  38    ('_mbstateL', c_longlong),
  39]
  40assert sizeof(__mbstate_t) == 128, sizeof(__mbstate_t)
  41assert alignment(__mbstate_t) == 4, alignment(__mbstate_t)
  42__darwin_mbstate_t = __mbstate_t
  43__darwin_ptrdiff_t = c_int
  44__darwin_size_t = c_ulong
  45__darwin_va_list = STRING
  46__darwin_wchar_t = c_int
  47__darwin_rune_t = __darwin_wchar_t
  48__darwin_wint_t = c_int
  49__darwin_clock_t = c_ulong
  50__darwin_socklen_t = __uint32_t
  51__darwin_ssize_t = c_long
  52__darwin_time_t = c_long
  53sig_atomic_t = c_int
  54class sigcontext(Structure):
  55    pass
  56sigcontext._fields_ = [
  57    ('sc_onstack', c_int),
  58    ('sc_mask', c_int),
  59    ('sc_eax', c_uint),
  60    ('sc_ebx', c_uint),
  61    ('sc_ecx', c_uint),
  62    ('sc_edx', c_uint),
  63    ('sc_edi', c_uint),
  64    ('sc_esi', c_uint),
  65    ('sc_ebp', c_uint),
  66    ('sc_esp', c_uint),
  67    ('sc_ss', c_uint),
  68    ('sc_eflags', c_uint),
  69    ('sc_eip', c_uint),
  70    ('sc_cs', c_uint),
  71    ('sc_ds', c_uint),
  72    ('sc_es', c_uint),
  73    ('sc_fs', c_uint),
  74    ('sc_gs', c_uint),
  75]
  76assert sizeof(sigcontext) == 72, sizeof(sigcontext)
  77assert alignment(sigcontext) == 4, alignment(sigcontext)
  78u_int8_t = c_ubyte
  79u_int16_t = c_ushort
  80u_int32_t = c_uint
  81u_int64_t = c_ulonglong
  82int32_t = c_int
  83register_t = int32_t
  84user_addr_t = u_int64_t
  85user_size_t = u_int64_t
  86int64_t = c_longlong
  87user_ssize_t = int64_t
  88user_long_t = int64_t
  89user_ulong_t = u_int64_t
  90user_time_t = int64_t
  91syscall_arg_t = u_int64_t
  92
  93# values for unnamed enumeration
  94class aes_key_st(Structure):
  95    pass
  96aes_key_st._fields_ = [
  97    ('rd_key', c_ulong * 60),
  98    ('rounds', c_int),
  99]
 100assert sizeof(aes_key_st) == 244, sizeof(aes_key_st)
 101assert alignment(aes_key_st) == 4, alignment(aes_key_st)
 102AES_KEY = aes_key_st
 103class asn1_ctx_st(Structure):
 104    pass
 105asn1_ctx_st._fields_ = [
 106    ('p', POINTER(c_ubyte)),
 107    ('eos', c_int),
 108    ('error', c_int),
 109    ('inf', c_int),
 110    ('tag', c_int),
 111    ('xclass', c_int),
 112    ('slen', c_long),
 113    ('max', POINTER(c_ubyte)),
 114    ('q', POINTER(c_ubyte)),
 115    ('pp', POINTER(POINTER(c_ubyte))),
 116    ('line', c_int),
 117]
 118assert sizeof(asn1_ctx_st) == 44, sizeof(asn1_ctx_st)
 119assert alignment(asn1_ctx_st) == 4, alignment(asn1_ctx_st)
 120ASN1_CTX = asn1_ctx_st
 121class asn1_object_st(Structure):
 122    pass
 123asn1_object_st._fields_ = [
 124    ('sn', STRING),
 125    ('ln', STRING),
 126    ('nid', c_int),
 127    ('length', c_int),
 128    ('data', POINTER(c_ubyte)),
 129    ('flags', c_int),
 130]
 131assert sizeof(asn1_object_st) == 24, sizeof(asn1_object_st)
 132assert alignment(asn1_object_st) == 4, alignment(asn1_object_st)
 133ASN1_OBJECT = asn1_object_st
 134class asn1_string_st(Structure):
 135    pass
 136asn1_string_st._fields_ = [
 137    ('length', c_int),
 138    ('type', c_int),
 139    ('data', POINTER(c_ubyte)),
 140    ('flags', c_long),
 141]
 142assert sizeof(asn1_string_st) == 16, sizeof(asn1_string_st)
 143assert alignment(asn1_string_st) == 4, alignment(asn1_string_st)
 144ASN1_STRING = asn1_string_st
 145class ASN1_ENCODING_st(Structure):
 146    pass
 147ASN1_ENCODING_st._fields_ = [
 148    ('enc', POINTER(c_ubyte)),
 149    ('len', c_long),
 150    ('modified', c_int),
 151]
 152assert sizeof(ASN1_ENCODING_st) == 12, sizeof(ASN1_ENCODING_st)
 153assert alignment(ASN1_ENCODING_st) == 4, alignment(ASN1_ENCODING_st)
 154ASN1_ENCODING = ASN1_ENCODING_st
 155class asn1_string_table_st(Structure):
 156    pass
 157asn1_string_table_st._fields_ = [
 158    ('nid', c_int),
 159    ('minsize', c_long),
 160    ('maxsize', c_long),
 161    ('mask', c_ulong),
 162    ('flags', c_ulong),
 163]
 164assert sizeof(asn1_string_table_st) == 20, sizeof(asn1_string_table_st)
 165assert alignment(asn1_string_table_st) == 4, alignment(asn1_string_table_st)
 166ASN1_STRING_TABLE = asn1_string_table_st
 167class ASN1_TEMPLATE_st(Structure):
 168    pass
 169ASN1_TEMPLATE_st._fields_ = [
 170]
 171ASN1_TEMPLATE = ASN1_TEMPLATE_st
 172class ASN1_ITEM_st(Structure):
 173    pass
 174ASN1_ITEM = ASN1_ITEM_st
 175ASN1_ITEM_st._fields_ = [
 176]
 177class ASN1_TLC_st(Structure):
 178    pass
 179ASN1_TLC = ASN1_TLC_st
 180ASN1_TLC_st._fields_ = [
 181]
 182class ASN1_VALUE_st(Structure):
 183    pass
 184ASN1_VALUE_st._fields_ = [
 185]
 186ASN1_VALUE = ASN1_VALUE_st
 187ASN1_ITEM_EXP = ASN1_ITEM
 188class asn1_type_st(Structure):
 189    pass
 190class N12asn1_type_st4DOLLAR_11E(Union):
 191    pass
 192ASN1_BOOLEAN = c_int
 193ASN1_INTEGER = asn1_string_st
 194ASN1_ENUMERATED = asn1_string_st
 195ASN1_BIT_STRING = asn1_string_st
 196ASN1_OCTET_STRING = asn1_string_st
 197ASN1_PRINTABLESTRING = asn1_string_st
 198ASN1_T61STRING = asn1_string_st
 199ASN1_IA5STRING = asn1_string_st
 200ASN1_GENERALSTRING = asn1_string_st
 201ASN1_BMPSTRING = asn1_string_st
 202ASN1_UNIVERSALSTRING = asn1_string_st
 203ASN1_UTCTIME = asn1_string_st
 204ASN1_GENERALIZEDTIME = asn1_string_st
 205ASN1_VISIBLESTRING = asn1_string_st
 206ASN1_UTF8STRING = asn1_string_st
 207N12asn1_type_st4DOLLAR_11E._fields_ = [
 208    ('ptr', STRING),
 209    ('boolean', ASN1_BOOLEAN),
 210    ('asn1_string', POINTER(ASN1_STRING)),
 211    ('object', POINTER(ASN1_OBJECT)),
 212    ('integer', POINTER(ASN1_INTEGER)),
 213    ('enumerated', POINTER(ASN1_ENUMERATED)),
 214    ('bit_string', POINTER(ASN1_BIT_STRING)),
 215    ('octet_string', POINTER(ASN1_OCTET_STRING)),
 216    ('printablestring', POINTER(ASN1_PRINTABLESTRING)),
 217    ('t61string', POINTER(ASN1_T61STRING)),
 218    ('ia5string', POINTER(ASN1_IA5STRING)),
 219    ('generalstring', POINTER(ASN1_GENERALSTRING)),
 220    ('bmpstring', POINTER(ASN1_BMPSTRING)),
 221    ('universalstring', POINTER(ASN1_UNIVERSALSTRING)),
 222    ('utctime', POINTER(ASN1_UTCTIME)),
 223    ('generalizedtime', POINTER(ASN1_GENERALIZEDTIME)),
 224    ('visiblestring', POINTER(ASN1_VISIBLESTRING)),
 225    ('utf8string', POINTER(ASN1_UTF8STRING)),
 226    ('set', POINTER(ASN1_STRING)),
 227    ('sequence', POINTER(ASN1_STRING)),
 228]
 229assert sizeof(N12asn1_type_st4DOLLAR_11E) == 4, sizeof(N12asn1_type_st4DOLLAR_11E)
 230assert alignment(N12asn1_type_st4DOLLAR_11E) == 4, alignment(N12asn1_type_st4DOLLAR_11E)
 231asn1_type_st._fields_ = [
 232    ('type', c_int),
 233    ('value', N12asn1_type_st4DOLLAR_11E),
 234]
 235assert sizeof(asn1_type_st) == 8, sizeof(asn1_type_st)
 236assert alignment(asn1_type_st) == 4, alignment(asn1_type_st)
 237ASN1_TYPE = asn1_type_st
 238class asn1_method_st(Structure):
 239    pass
 240asn1_method_st._fields_ = [
 241    ('i2d', CFUNCTYPE(c_int)),
 242    ('d2i', CFUNCTYPE(STRING)),
 243    ('create', CFUNCTYPE(STRING)),
 244    ('destroy', CFUNCTYPE(None)),
 245]
 246assert sizeof(asn1_method_st) == 16, sizeof(asn1_method_st)
 247assert alignment(asn1_method_st) == 4, alignment(asn1_method_st)
 248ASN1_METHOD = asn1_method_st
 249class asn1_header_st(Structure):
 250    pass
 251asn1_header_st._fields_ = [
 252    ('header', POINTER(ASN1_OCTET_STRING)),
 253    ('data', STRING),
 254    ('meth', POINTER(ASN1_METHOD)),
 255]
 256assert sizeof(asn1_header_st) == 12, sizeof(asn1_header_st)
 257assert alignment(asn1_header_st) == 4, alignment(asn1_header_st)
 258ASN1_HEADER = asn1_header_st
 259class BIT_STRING_BITNAME_st(Structure):
 260    pass
 261BIT_STRING_BITNAME_st._fields_ = [
 262    ('bitnum', c_int),
 263    ('lname', STRING),
 264    ('sname', STRING),
 265]
 266assert sizeof(BIT_STRING_BITNAME_st) == 12, sizeof(BIT_STRING_BITNAME_st)
 267assert alignment(BIT_STRING_BITNAME_st) == 4, alignment(BIT_STRING_BITNAME_st)
 268BIT_STRING_BITNAME = BIT_STRING_BITNAME_st
 269class bio_st(Structure):
 270    pass
 271BIO = bio_st
 272bio_info_cb = CFUNCTYPE(None, POINTER(bio_st), c_int, STRING, c_int, c_long, c_long)
 273class bio_method_st(Structure):
 274    pass
 275bio_method_st._fields_ = [
 276    ('type', c_int),
 277    ('name', STRING),
 278    ('bwrite', CFUNCTYPE(c_int, POINTER(BIO), STRING, c_int)),
 279    ('bread', CFUNCTYPE(c_int, POINTER(BIO), STRING, c_int)),
 280    ('bputs', CFUNCTYPE(c_int, POINTER(BIO), STRING)),
 281    ('bgets', CFUNCTYPE(c_int, POINTER(BIO), STRING, c_int)),
 282    ('ctrl', CFUNCTYPE(c_long, POINTER(BIO), c_int, c_long, c_void_p)),
 283    ('create', CFUNCTYPE(c_int, POINTER(BIO))),
 284    ('destroy', CFUNCTYPE(c_int, POINTER(BIO))),
 285    ('callback_ctrl', CFUNCTYPE(c_long, POINTER(BIO), c_int, POINTER(bio_info_cb))),
 286]
 287assert sizeof(bio_method_st) == 40, sizeof(bio_method_st)
 288assert alignment(bio_method_st) == 4, alignment(bio_method_st)
 289BIO_METHOD = bio_method_st
 290class crypto_ex_data_st(Structure):
 291    pass
 292class stack_st(Structure):
 293    pass
 294STACK = stack_st
 295crypto_ex_data_st._fields_ = [
 296    ('sk', POINTER(STACK)),
 297    ('dummy', c_int),
 298]
 299assert sizeof(crypto_ex_data_st) == 8, sizeof(crypto_ex_data_st)
 300assert alignment(crypto_ex_data_st) == 4, alignment(crypto_ex_data_st)
 301CRYPTO_EX_DATA = crypto_ex_data_st
 302bio_st._fields_ = [
 303    ('method', POINTER(BIO_METHOD)),
 304    ('callback', CFUNCTYPE(c_long, POINTER(bio_st), c_int, STRING, c_int, c_long, c_long)),
 305    ('cb_arg', STRING),
 306    ('init', c_int),
 307    ('shutdown', c_int),
 308    ('flags', c_int),
 309    ('retry_reason', c_int),
 310    ('num', c_int),
 311    ('ptr', c_void_p),
 312    ('next_bio', POINTER(bio_st)),
 313    ('prev_bio', POINTER(bio_st)),
 314    ('references', c_int),
 315    ('num_read', c_ulong),
 316    ('num_write', c_ulong),
 317    ('ex_data', CRYPTO_EX_DATA),
 318]
 319assert sizeof(bio_st) == 64, sizeof(bio_st)
 320assert alignment(bio_st) == 4, alignment(bio_st)
 321class bio_f_buffer_ctx_struct(Structure):
 322    pass
 323bio_f_buffer_ctx_struct._fields_ = [
 324    ('ibuf_size', c_int),
 325    ('obuf_size', c_int),
 326    ('ibuf', STRING),
 327    ('ibuf_len', c_int),
 328    ('ibuf_off', c_int),
 329    ('obuf', STRING),
 330    ('obuf_len', c_int),
 331    ('obuf_off', c_int),
 332]
 333assert sizeof(bio_f_buffer_ctx_struct) == 32, sizeof(bio_f_buffer_ctx_struct)
 334assert alignment(bio_f_buffer_ctx_struct) == 4, alignment(bio_f_buffer_ctx_struct)
 335BIO_F_BUFFER_CTX = bio_f_buffer_ctx_struct
 336class hostent(Structure):
 337    pass
 338hostent._fields_ = [
 339]
 340class bf_key_st(Structure):
 341    pass
 342bf_key_st._fields_ = [
 343    ('P', c_uint * 18),
 344    ('S', c_uint * 1024),
 345]
 346assert sizeof(bf_key_st) == 4168, sizeof(bf_key_st)
 347assert alignment(bf_key_st) == 4, alignment(bf_key_st)
 348BF_KEY = bf_key_st
 349class bignum_st(Structure):
 350    pass
 351bignum_st._fields_ = [
 352    ('d', POINTER(c_ulong)),
 353    ('top', c_int),
 354    ('dmax', c_int),
 355    ('neg', c_int),
 356    ('flags', c_int),
 357]
 358assert sizeof(bignum_st) == 20, sizeof(bignum_st)
 359assert alignment(bignum_st) == 4, alignment(bignum_st)
 360BIGNUM = bignum_st
 361class bignum_ctx(Structure):
 362    pass
 363bignum_ctx._fields_ = [
 364]
 365BN_CTX = bignum_ctx
 366class bn_blinding_st(Structure):
 367    pass
 368bn_blinding_st._fields_ = [
 369    ('init', c_int),
 370    ('A', POINTER(BIGNUM)),
 371    ('Ai', POINTER(BIGNUM)),
 372    ('mod', POINTER(BIGNUM)),
 373    ('thread_id', c_ulong),
 374]
 375assert sizeof(bn_blinding_st) == 20, sizeof(bn_blinding_st)
 376assert alignment(bn_blinding_st) == 4, alignment(bn_blinding_st)
 377BN_BLINDING = bn_blinding_st
 378class bn_mont_ctx_st(Structure):
 379    pass
 380bn_mont_ctx_st._fields_ = [
 381    ('ri', c_int),
 382    ('RR', BIGNUM),
 383    ('N', BIGNUM),
 384    ('Ni', BIGNUM),
 385    ('n0', c_ulong),
 386    ('flags', c_int),
 387]
 388assert sizeof(bn_mont_ctx_st) == 72, sizeof(bn_mont_ctx_st)
 389assert alignment(bn_mont_ctx_st) == 4, alignment(bn_mont_ctx_st)
 390BN_MONT_CTX = bn_mont_ctx_st
 391class bn_recp_ctx_st(Structure):
 392    pass
 393bn_recp_ctx_st._fields_ = [
 394    ('N', BIGNUM),
 395    ('Nr', BIGNUM),
 396    ('num_bits', c_int),
 397    ('shift', c_int),
 398    ('flags', c_int),
 399]
 400assert sizeof(bn_recp_ctx_st) == 52, sizeof(bn_recp_ctx_st)
 401assert alignment(bn_recp_ctx_st) == 4, alignment(bn_recp_ctx_st)
 402BN_RECP_CTX = bn_recp_ctx_st
 403class buf_mem_st(Structure):
 404    pass
 405buf_mem_st._fields_ = [
 406    ('length', c_int),
 407    ('data', STRING),
 408    ('max', c_int),
 409]
 410assert sizeof(buf_mem_st) == 12, sizeof(buf_mem_st)
 411assert alignment(buf_mem_st) == 4, alignment(buf_mem_st)
 412BUF_MEM = buf_mem_st
 413class cast_key_st(Structure):
 414    pass
 415cast_key_st._fields_ = [
 416    ('data', c_ulong * 32),
 417    ('short_key', c_int),
 418]
 419assert sizeof(cast_key_st) == 132, sizeof(cast_key_st)
 420assert alignment(cast_key_st) == 4, alignment(cast_key_st)
 421CAST_KEY = cast_key_st
 422class comp_method_st(Structure):
 423    pass
 424comp_method_st._fields_ = [
 425    ('type', c_int),
 426    ('name', STRING),
 427    ('init', CFUNCTYPE(c_int)),
 428    ('finish', CFUNCTYPE(None)),
 429    ('compress', CFUNCTYPE(c_int)),
 430    ('expand', CFUNCTYPE(c_int)),
 431    ('ctrl', CFUNCTYPE(c_long)),
 432    ('callback_ctrl', CFUNCTYPE(c_long)),
 433]
 434assert sizeof(comp_method_st) == 32, sizeof(comp_method_st)
 435assert alignment(comp_method_st) == 4, alignment(comp_method_st)
 436COMP_METHOD = comp_method_st
 437class comp_ctx_st(Structure):
 438    pass
 439comp_ctx_st._fields_ = [
 440    ('meth', POINTER(COMP_METHOD)),
 441    ('compress_in', c_ulong),
 442    ('compress_out', c_ulong),
 443    ('expand_in', c_ulong),
 444    ('expand_out', c_ulong),
 445    ('ex_data', CRYPTO_EX_DATA),
 446]
 447assert sizeof(comp_ctx_st) == 28, sizeof(comp_ctx_st)
 448assert alignment(comp_ctx_st) == 4, alignment(comp_ctx_st)
 449COMP_CTX = comp_ctx_st
 450class CRYPTO_dynlock_value(Structure):
 451    pass
 452CRYPTO_dynlock_value._fields_ = [
 453]
 454class CRYPTO_dynlock(Structure):
 455    pass
 456CRYPTO_dynlock._fields_ = [
 457    ('references', c_int),
 458    ('data', POINTER(CRYPTO_dynlock_value)),
 459]
 460assert sizeof(CRYPTO_dynlock) == 8, sizeof(CRYPTO_dynlock)
 461assert alignment(CRYPTO_dynlock) == 4, alignment(CRYPTO_dynlock)
 462BIO_dummy = bio_st
 463CRYPTO_EX_new = CFUNCTYPE(c_int, c_void_p, c_void_p, POINTER(CRYPTO_EX_DATA), c_int, c_long, c_void_p)
 464CRYPTO_EX_free = CFUNCTYPE(None, c_void_p, c_void_p, POINTER(CRYPTO_EX_DATA), c_int, c_long, c_void_p)
 465CRYPTO_EX_dup = CFUNCTYPE(c_int, POINTER(CRYPTO_EX_DATA), POINTER(CRYPTO_EX_DATA), c_void_p, c_int, c_long, c_void_p)
 466class crypto_ex_data_func_st(Structure):
 467    pass
 468crypto_ex_data_func_st._fields_ = [
 469    ('argl', c_long),
 470    ('argp', c_void_p),
 471    ('new_func', POINTER(CRYPTO_EX_new)),
 472    ('free_func', POINTER(CRYPTO_EX_free)),
 473    ('dup_func', POINTER(CRYPTO_EX_dup)),
 474]
 475assert sizeof(crypto_ex_data_func_st) == 20, sizeof(crypto_ex_data_func_st)
 476assert alignment(crypto_ex_data_func_st) == 4, alignment(crypto_ex_data_func_st)
 477CRYPTO_EX_DATA_FUNCS = crypto_ex_data_func_st
 478class st_CRYPTO_EX_DATA_IMPL(Structure):
 479    pass
 480CRYPTO_EX_DATA_IMPL = st_CRYPTO_EX_DATA_IMPL
 481st_CRYPTO_EX_DATA_IMPL._fields_ = [
 482]
 483CRYPTO_MEM_LEAK_CB = CFUNCTYPE(c_void_p, c_ulong, STRING, c_int, c_int, c_void_p)
 484DES_cblock = c_ubyte * 8
 485const_DES_cblock = c_ubyte * 8
 486class DES_ks(Structure):
 487    pass
 488class N6DES_ks3DOLLAR_9E(Union):
 489    pass
 490N6DES_ks3DOLLAR_9E._fields_ = [
 491    ('cblock', DES_cblock),
 492    ('deslong', c_ulong * 2),
 493]
 494assert sizeof(N6DES_ks3DOLLAR_9E) == 8, sizeof(N6DES_ks3DOLLAR_9E)
 495assert alignment(N6DES_ks3DOLLAR_9E) == 4, alignment(N6DES_ks3DOLLAR_9E)
 496DES_ks._fields_ = [
 497    ('ks', N6DES_ks3DOLLAR_9E * 16),
 498]
 499assert sizeof(DES_ks) == 128, sizeof(DES_ks)
 500assert alignment(DES_ks) == 4, alignment(DES_ks)
 501DES_key_schedule = DES_ks
 502_ossl_old_des_cblock = c_ubyte * 8
 503class _ossl_old_des_ks_struct(Structure):
 504    pass
 505class N23_ossl_old_des_ks_struct4DOLLAR_10E(Union):
 506    pass
 507N23_ossl_old_des_ks_struct4DOLLAR_10E._fields_ = [
 508    ('_', _ossl_old_des_cblock),
 509    ('pad', c_ulong * 2),
 510]
 511assert sizeof(N23_ossl_old_des_ks_struct4DOLLAR_10E) == 8, sizeof(N23_ossl_old_des_ks_struct4DOLLAR_10E)
 512assert alignment(N23_ossl_old_des_ks_struct4DOLLAR_10E) == 4, alignment(N23_ossl_old_des_ks_struct4DOLLAR_10E)
 513_ossl_old_des_ks_struct._fields_ = [
 514    ('ks', N23_ossl_old_des_ks_struct4DOLLAR_10E),
 515]
 516assert sizeof(_ossl_old_des_ks_struct) == 8, sizeof(_ossl_old_des_ks_struct)
 517assert alignment(_ossl_old_des_ks_struct) == 4, alignment(_ossl_old_des_ks_struct)
 518_ossl_old_des_key_schedule = _ossl_old_des_ks_struct * 16
 519class dh_st(Structure):
 520    pass
 521DH = dh_st
 522class dh_method(Structure):
 523    pass
 524dh_method._fields_ = [
 525    ('name', STRING),
 526    ('generate_key', CFUNCTYPE(c_int, POINTER(DH))),
 527    ('compute_key', CFUNCTYPE(c_int, POINTER(c_ubyte), POINTER(BIGNUM), POINTER(DH))),
 528    ('bn_mod_exp', CFUNCTYPE(c_int, POINTER(DH), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
 529    ('init', CFUNCTYPE(c_int, POINTER(DH))),
 530    ('finish', CFUNCTYPE(c_int, POINTER(DH))),
 531    ('flags', c_int),
 532    ('app_data', STRING),
 533]
 534assert sizeof(dh_method) == 32, sizeof(dh_method)
 535assert alignment(dh_method) == 4, alignment(dh_method)
 536DH_METHOD = dh_method
 537class engine_st(Structure):
 538    pass
 539ENGINE = engine_st
 540dh_st._fields_ = [
 541    ('pad', c_int),
 542    ('version', c_int),
 543    ('p', POINTER(BIGNUM)),
 544    ('g', POINTER(BIGNUM)),
 545    ('length', c_long),
 546    ('pub_key', POINTER(BIGNUM)),
 547    ('priv_key', POINTER(BIGNUM)),
 548    ('flags', c_int),
 549    ('method_mont_p', STRING),
 550    ('q', POINTER(BIGNUM)),
 551    ('j', POINTER(BIGNUM)),
 552    ('seed', POINTER(c_ubyte)),
 553    ('seedlen', c_int),
 554    ('counter', POINTER(BIGNUM)),
 555    ('references', c_int),
 556    ('ex_data', CRYPTO_EX_DATA),
 557    ('meth', POINTER(DH_METHOD)),
 558    ('engine', POINTER(ENGINE)),
 559]
 560assert sizeof(dh_st) == 76, sizeof(dh_st)
 561assert alignment(dh_st) == 4, alignment(dh_st)
 562class dsa_st(Structure):
 563    pass
 564DSA = dsa_st
 565class DSA_SIG_st(Structure):
 566    pass
 567DSA_SIG_st._fields_ = [
 568    ('r', POINTER(BIGNUM)),
 569    ('s', POINTER(BIGNUM)),
 570]
 571assert sizeof(DSA_SIG_st) == 8, sizeof(DSA_SIG_st)
 572assert alignment(DSA_SIG_st) == 4, alignment(DSA_SIG_st)
 573DSA_SIG = DSA_SIG_st
 574class dsa_method(Structure):
 575    pass
 576dsa_method._fields_ = [
 577    ('name', STRING),
 578    ('dsa_do_sign', CFUNCTYPE(POINTER(DSA_SIG), POINTER(c_ubyte), c_int, POINTER(DSA))),
 579    ('dsa_sign_setup', CFUNCTYPE(c_int, POINTER(DSA), POINTER(BN_CTX), POINTER(POINTER(BIGNUM)), POINTER(POINTER(BIGNUM)))),
 580    ('dsa_do_verify', CFUNCTYPE(c_int, POINTER(c_ubyte), c_int, POINTER(DSA_SIG), POINTER(DSA))),
 581    ('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))),
 582    ('bn_mod_exp', CFUNCTYPE(c_int, POINTER(DSA), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
 583    ('init', CFUNCTYPE(c_int, POINTER(DSA))),
 584    ('finish', CFUNCTYPE(c_int, POINTER(DSA))),
 585    ('flags', c_int),
 586    ('app_data', STRING),
 587]
 588assert sizeof(dsa_method) == 40, sizeof(dsa_method)
 589assert alignment(dsa_method) == 4, alignment(dsa_method)
 590DSA_METHOD = dsa_method
 591dsa_st._fields_ = [
 592    ('pad', c_int),
 593    ('version', c_long),
 594    ('write_params', c_int),
 595    ('p', POINTER(BIGNUM)),
 596    ('q', POINTER(BIGNUM)),
 597    ('g', POINTER(BIGNUM)),
 598    ('pub_key', POINTER(BIGNUM)),
 599    ('priv_key', POINTER(BIGNUM)),
 600    ('kinv', POINTER(BIGNUM)),
 601    ('r', POINTER(BIGNUM)),
 602    ('flags', c_int),
 603    ('method_mont_p', STRING),
 604    ('references', c_int),
 605    ('ex_data', CRYPTO_EX_DATA),
 606    ('meth', POINTER(DSA_METHOD)),
 607    ('engine', POINTER(ENGINE)),
 608]
 609assert sizeof(dsa_st) == 68, sizeof(dsa_st)
 610assert alignment(dsa_st) == 4, alignment(dsa_st)
 611class evp_pkey_st(Structure):
 612    pass
 613class N11evp_pkey_st4DOLLAR_12E(Union):
 614    pass
 615class rsa_st(Structure):
 616    pass
 617N11evp_pkey_st4DOLLAR_12E._fields_ = [
 618    ('ptr', STRING),
 619    ('rsa', POINTER(rsa_st)),
 620    ('dsa', POINTER(dsa_st)),
 621    ('dh', POINTER(dh_st)),
 622]
 623assert sizeof(N11evp_pkey_st4DOLLAR_12E) == 4, sizeof(N11evp_pkey_st4DOLLAR_12E)
 624assert alignment(N11evp_pkey_st4DOLLAR_12E) == 4, alignment(N11evp_pkey_st4DOLLAR_12E)
 625evp_pkey_st._fields_ = [
 626    ('type', c_int),
 627    ('save_type', c_int),
 628    ('references', c_int),
 629    ('pkey', N11evp_pkey_st4DOLLAR_12E),
 630    ('save_parameters', c_int),
 631    ('attributes', POINTER(STACK)),
 632]
 633assert sizeof(evp_pkey_st) == 24, sizeof(evp_pkey_st)
 634assert alignment(evp_pkey_st) == 4, alignment(evp_pkey_st)
 635class env_md_st(Structure):
 636    pass
 637class env_md_ctx_st(Structure):
 638    pass
 639EVP_MD_CTX = env_md_ctx_st
 640env_md_st._fields_ = [
 641    ('type', c_int),
 642    ('pkey_type', c_int),
 643    ('md_size', c_int),
 644    ('flags', c_ulong),
 645    ('init', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX))),
 646    ('update', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX), c_void_p, c_ulong)),
 647    ('final', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX), POINTER(c_ubyte))),
 648    ('copy', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX), POINTER(EVP_MD_CTX))),
 649    ('cleanup', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX))),
 650    ('sign', CFUNCTYPE(c_int)),
 651    ('verify', CFUNCTYPE(c_int)),
 652    ('required_pkey_type', c_int * 5),
 653    ('block_size', c_int),
 654    ('ctx_size', c_int),
 655]
 656assert sizeof(env_md_st) == 72, sizeof(env_md_st)
 657assert alignment(env_md_st) == 4, alignment(env_md_st)
 658EVP_MD = env_md_st
 659env_md_ctx_st._fields_ = [
 660    ('digest', POINTER(EVP_MD)),
 661    ('engine', POINTER(ENGINE)),
 662    ('flags', c_ulong),
 663    ('md_data', c_void_p),
 664]
 665assert sizeof(env_md_ctx_st) == 16, sizeof(env_md_ctx_st)
 666assert alignment(env_md_ctx_st) == 4, alignment(env_md_ctx_st)
 667class evp_cipher_st(Structure):
 668    pass
 669class evp_cipher_ctx_st(Structure):
 670    pass
 671EVP_CIPHER_CTX = evp_cipher_ctx_st
 672evp_cipher_st._fields_ = [
 673    ('nid', c_int),
 674    ('block_size', c_int),
 675    ('key_len', c_int),
 676    ('iv_len', c_int),
 677    ('flags', c_ulong),
 678    ('init', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(c_ubyte), POINTER(c_ubyte), c_int)),
 679    ('do_cipher', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(c_ubyte), POINTER(c_ubyte), c_uint)),
 680    ('cleanup', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX))),
 681    ('ctx_size', c_int),
 682    ('set_asn1_parameters', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(ASN1_TYPE))),
 683    ('get_asn1_parameters', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(ASN1_TYPE))),
 684    ('ctrl', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), c_int, c_int, c_void_p)),
 685    ('app_data', c_void_p),
 686]
 687assert sizeof(evp_cipher_st) == 52, sizeof(evp_cipher_st)
 688assert alignment(evp_cipher_st) == 4, alignment(evp_cipher_st)
 689class evp_cipher_info_st(Structure):
 690    pass
 691EVP_CIPHER = evp_cipher_st
 692evp_cipher_info_st._fields_ = [
 693    ('cipher', POINTER(EVP_CIPHER)),
 694    ('iv', c_ubyte * 16),
 695]
 696assert sizeof(evp_cipher_info_st) == 20, sizeof(evp_cipher_info_st)
 697assert alignment(evp_cipher_info_st) == 4, alignment(evp_cipher_info_st)
 698EVP_CIPHER_INFO = evp_cipher_info_st
 699evp_cipher_ctx_st._fields_ = [
 700    ('cipher', POINTER(EVP_CIPHER)),
 701    ('engine', POINTER(ENGINE)),
 702    ('encrypt', c_int),
 703    ('buf_len', c_int),
 704    ('oiv', c_ubyte * 16),
 705    ('iv', c_ubyte * 16),
 706    ('buf', c_ubyte * 32),
 707    ('num', c_int),
 708    ('app_data', c_void_p),
 709    ('key_len', c_int),
 710    ('flags', c_ulong),
 711    ('cipher_data', c_void_p),
 712    ('final_used', c_int),
 713    ('block_mask', c_int),
 714    ('final', c_ubyte * 32),
 715]
 716assert sizeof(evp_cipher_ctx_st) == 140, sizeof(evp_cipher_ctx_st)
 717assert alignment(evp_cipher_ctx_st) == 4, alignment(evp_cipher_ctx_st)
 718class evp_Encode_Ctx_st(Structure):
 719    pass
 720evp_Encode_Ctx_st._fields_ = [
 721    ('num', c_int),
 722    ('length', c_int),
 723    ('enc_data', c_ubyte * 80),
 724    ('line_num', c_int),
 725    ('expect_nl', c_int),
 726]
 727assert sizeof(evp_Encode_Ctx_st) == 96, sizeof(evp_Encode_Ctx_st)
 728assert alignment(evp_Encode_Ctx_st) == 4, alignment(evp_Encode_Ctx_st)
 729EVP_ENCODE_CTX = evp_Encode_Ctx_st
 730EVP_PBE_KEYGEN = CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), STRING, c_int, POINTER(ASN1_TYPE), POINTER(EVP_CIPHER), POINTER(EVP_MD), c_int)
 731class lhash_node_st(Structure):
 732    pass
 733lhash_node_st._fields_ = [
 734    ('data', c_void_p),
 735    ('next', POINTER(lhash_node_st)),
 736    ('hash', c_ulong),
 737]
 738assert sizeof(lhash_node_st) == 12, sizeof(lhash_node_st)
 739assert alignment(lhash_node_st) == 4, alignment(lhash_node_st)
 740LHASH_NODE = lhash_node_st
 741LHASH_COMP_FN_TYPE = CFUNCTYPE(c_int, c_void_p, c_void_p)
 742LHASH_HASH_FN_TYPE = CFUNCTYPE(c_ulong, c_void_p)
 743LHASH_DOALL_FN_TYPE = CFUNCTYPE(None, c_void_p)
 744LHASH_DOALL_ARG_FN_TYPE = CFUNCTYPE(None, c_void_p, c_void_p)
 745class lhash_st(Structure):
 746    pass
 747lhash_st._fields_ = [
 748    ('b', POINTER(POINTER(LHASH_NODE))),
 749    ('comp', LHASH_COMP_FN_TYPE),
 750    ('hash', LHASH_HASH_FN_TYPE),
 751    ('num_nodes', c_uint),
 752    ('num_alloc_nodes', c_uint),
 753    ('p', c_uint),
 754    ('pmax', c_uint),
 755    ('up_load', c_ulong),
 756    ('down_load', c_ulong),
 757    ('num_items', c_ulong),
 758    ('num_expands', c_ulong),
 759    ('num_expand_reallocs', c_ulong),
 760    ('num_contracts', c_ulong),
 761    ('num_contract_reallocs', c_ulong),
 762    ('num_hash_calls', c_ulong),
 763    ('num_comp_calls', c_ulong),
 764    ('num_insert', c_ulong),
 765    ('num_replace', c_ulong),
 766    ('num_delete', c_ulong),
 767    ('num_no_delete', c_ulong),
 768    ('num_retrieve', c_ulong),
 769    ('num_retrieve_miss', c_ulong),
 770    ('num_hash_comps', c_ulong),
 771    ('error', c_int),
 772]
 773assert sizeof(lhash_st) == 96, sizeof(lhash_st)
 774assert alignment(lhash_st) == 4, alignment(lhash_st)
 775LHASH = lhash_st
 776class MD2state_st(Structure):
 777    pass
 778MD2state_st._fields_ = [
 779    ('num', c_int),
 780    ('data', c_ubyte * 16),
 781    ('cksm', c_uint * 16),
 782    ('state', c_uint * 16),
 783]
 784assert sizeof(MD2state_st) == 148, sizeof(MD2state_st)
 785assert alignment(MD2state_st) == 4, alignment(MD2state_st)
 786MD2_CTX = MD2state_st
 787class MD4state_st(Structure):
 788    pass
 789MD4state_st._fields_ = [
 790    ('A', c_uint),
 791    ('B', c_uint),
 792    ('C', c_uint),
 793    ('D', c_uint),
 794    ('Nl', c_uint),
 795    ('Nh', c_uint),
 796    ('data', c_uint * 16),
 797    ('num', c_int),
 798]
 799assert sizeof(MD4state_st) == 92, sizeof(MD4state_st)
 800assert alignment(MD4state_st) == 4, alignment(MD4state_st)
 801MD4_CTX = MD4state_st
 802class MD5state_st(Structure):
 803    pass
 804MD5state_st._fields_ = [
 805    ('A', c_uint),
 806    ('B', c_uint),
 807    ('C', c_uint),
 808    ('D', c_uint),
 809    ('Nl', c_uint),
 810    ('Nh', c_uint),
 811    ('data', c_uint * 16),
 812    ('num', c_int),
 813]
 814assert sizeof(MD5state_st) == 92, sizeof(MD5state_st)
 815assert alignment(MD5state_st) == 4, alignment(MD5state_st)
 816MD5_CTX = MD5state_st
 817class mdc2_ctx_st(Structure):
 818    pass
 819mdc2_ctx_st._fields_ = [
 820    ('num', c_int),
 821    ('data', c_ubyte * 8),
 822    ('h', DES_cblock),
 823    ('hh', DES_cblock),
 824    ('pad_type', c_int),
 825]
 826assert sizeof(mdc2_ctx_st) == 32, sizeof(mdc2_ctx_st)
 827assert alignment(mdc2_ctx_st) == 4, alignment(mdc2_ctx_st)
 828MDC2_CTX = mdc2_ctx_st
 829class obj_name_st(Structure):
 830    pass
 831obj_name_st._fields_ = [
 832    ('type', c_int),
 833    ('alias', c_int),
 834    ('name', STRING),
 835    ('data', STRING),
 836]
 837assert sizeof(obj_name_st) == 16, sizeof(obj_name_st)
 838assert alignment(obj_name_st) == 4, alignment(obj_name_st)
 839OBJ_NAME = obj_name_st
 840ASN1_TIME = asn1_string_st
 841ASN1_NULL = c_int
 842EVP_PKEY = evp_pkey_st
 843class x509_st(Structure):
 844    pass
 845X509 = x509_st
 846class X509_algor_st(Structure):
 847    pass
 848X509_ALGOR = X509_algor_st
 849class X509_crl_st(Structure):
 850    pass
 851X509_CRL = X509_crl_st
 852class X509_name_st(Structure):
 853    pass
 854X509_NAME = X509_name_st
 855class x509_store_st(Structure):
 856    pass
 857X509_STORE = x509_store_st
 858class x509_store_ctx_st(Structure):
 859    pass
 860X509_STORE_CTX = x509_store_ctx_st
 861engine_st._fields_ = [
 862]
 863class PEM_Encode_Seal_st(Structure):
 864    pass
 865PEM_Encode_Seal_st._fields_ = [
 866    ('encode', EVP_ENCODE_CTX),
 867    ('md', EVP_MD_CTX),
 868    ('cipher', EVP_CIPHER_CTX),
 869]
 870assert sizeof(PEM_Encode_Seal_st) == 252, sizeof(PEM_Encode_Seal_st)
 871assert alignment(PEM_Encode_Seal_st) == 4, alignment(PEM_Encode_Seal_st)
 872PEM_ENCODE_SEAL_CTX = PEM_Encode_Seal_st
 873class pem_recip_st(Structure):
 874    pass
 875pem_recip_st._fields_ = [
 876    ('name', STRING),
 877    ('dn', POINTER(X509_NAME)),
 878    ('cipher', c_int),
 879    ('key_enc', c_int),
 880]
 881assert sizeof(pem_recip_st) == 16, sizeof(pem_recip_st)
 882assert alignment(pem_recip_st) == 4, alignment(pem_recip_st)
 883PEM_USER = pem_recip_st
 884class pem_ctx_st(Structure):
 885    pass
 886class N10pem_ctx_st4DOLLAR_16E(Structure):
 887    pass
 888N10pem_ctx_st4DOLLAR_16E._fields_ = [
 889    ('version', c_int),
 890    ('mode', c_int),
 891]
 892assert sizeof(N10pem_ctx_st4DOLLAR_16E) == 8, sizeof(N10pem_ctx_st4DOLLAR_16E)
 893assert alignment(N10pem_ctx_st4DOLLAR_16E) == 4, alignment(N10pem_ctx_st4DOLLAR_16E)
 894class N10pem_ctx_st4DOLLAR_17E(Structure):
 895    pass
 896N10pem_ctx_st4DOLLAR_17E._fields_ = [
 897    ('cipher', c_int),
 898]
 899assert sizeof(N10pem_ctx_st4DOLLAR_17E) == 4, sizeof(N10pem_ctx_st4DOLLAR_17E)
 900assert alignment(N10pem_ctx_st4DOLLAR_17E) == 4, alignment(N10pem_ctx_st4DOLLAR_17E)
 901pem_ctx_st._fields_ = [
 902    ('type', c_int),
 903    ('proc_type', N10pem_ctx_st4DOLLAR_16E),
 904    ('domain', STRING),
 905    ('DEK_info', N10pem_ctx_st4DOLLAR_17E),
 906    ('originator', POINTER(PEM_USER)),
 907    ('num_recipient', c_int),
 908    ('recipient', POINTER(POINTER(PEM_USER))),
 909    ('x509_chain', POINTER(STACK)),
 910    ('md', POINTER(EVP_MD)),
 911    ('md_enc', c_int),
 912    ('md_len', c_int),
 913    ('md_data', STRING),
 914    ('dec', POINTER(EVP_CIPHER)),
 915    ('key_len', c_int),
 916    ('key', POINTER(c_ubyte)),
 917    ('data_enc', c_int),
 918    ('data_len', c_int),
 919    ('data', POINTER(c_ubyte)),
 920]
 921assert sizeof(pem_ctx_st) == 76, sizeof(pem_ctx_st)
 922assert alignment(pem_ctx_st) == 4, alignment(pem_ctx_st)
 923PEM_CTX = pem_ctx_st
 924pem_password_cb = CFUNCTYPE(c_int, STRING, c_int, c_int, c_void_p)
 925class pkcs7_issuer_and_serial_st(Structure):
 926    pass
 927pkcs7_issuer_and_serial_st._fields_ = [
 928    ('issuer', POINTER(X509_NAME)),
 929    ('serial', POINTER(ASN1_INTEGER)),
 930]
 931assert sizeof(pkcs7_issuer_and_serial_st) == 8, sizeof(pkcs7_issuer_and_serial_st)
 932assert alignment(pkcs7_issuer_and_serial_st) == 4, alignment(pkcs7_issuer_and_serial_st)
 933PKCS7_ISSUER_AND_SERIAL = pkcs7_issuer_and_serial_st
 934class pkcs7_signer_info_st(Structure):
 935    pass
 936pkcs7_signer_info_st._fields_ = [
 937    ('version', POINTER(ASN1_INTEGER)),
 938    ('issuer_and_serial', POINTER(PKCS7_ISSUER_AND_SERIAL)),
 939    ('digest_alg', POINTER(X509_ALGOR)),
 940    ('auth_attr', POINTER(STACK)),
 941    ('digest_enc_alg', POINTER(X509_ALGOR)),
 942    ('enc_digest', POINTER(ASN1_OCTET_STRING)),
 943    ('unauth_attr', POINTER(STACK)),
 944    ('pkey', POINTER(EVP_PKEY)),
 945]
 946assert sizeof(pkcs7_signer_info_st) == 32, sizeof(pkcs7_signer_info_st)
 947assert alignment(pkcs7_signer_info_st) == 4, alignment(pkcs7_signer_info_st)
 948PKCS7_SIGNER_INFO = pkcs7_signer_info_st
 949class pkcs7_recip_info_st(Structure):
 950    pass
 951pkcs7_recip_info_st._fields_ = [
 952    ('version', POINTER(ASN1_INTEGER)),
 953    ('issuer_and_serial', POINTER(PKCS7_ISSUER_AND_SERIAL)),
 954    ('key_enc_algor', POINTER(X509_ALGOR)),
 955    ('enc_key', POINTER(ASN1_OCTET_STRING)),
 956    ('cert', POINTER(X509)),
 957]
 958assert sizeof(pkcs7_recip_info_st) == 20, sizeof(pkcs7_recip_info_st)
 959assert alignment(pkcs7_recip_info_st) == 4, alignment(pkcs7_recip_info_st)
 960PKCS7_RECIP_INFO = pkcs7_recip_info_st
 961class pkcs7_signed_st(Structure):
 962    pass
 963class pkcs7_st(Structure):
 964    pass
 965pkcs7_signed_st._fields_ = [
 966    ('version', POINTER(ASN1_INTEGER)),
 967    ('md_algs', POINTER(STACK)),
 968    ('cert', POINTER(STACK)),
 969    ('crl', POINTER(STACK)),
 970    ('signer_info', POINTER(STACK)),
 971    ('contents', POINTER(pkcs7_st)),
 972]
 973assert sizeof(pkcs7_signed_st) == 24, sizeof(pkcs7_signed_st)
 974assert alignment(pkcs7_signed_st) == 4, alignment(pkcs7_signed_st)
 975PKCS7_SIGNED = pkcs7_signed_st
 976class pkcs7_enc_content_st(Structure):
 977    pass
 978pkcs7_enc_content_st._fields_ = [
 979    ('content_type', POINTER(ASN1_OBJECT)),
 980    ('algorithm', POINTER(X509_ALGOR)),
 981    ('enc_data', POINTER(ASN1_OCTET_STRING)),
 982    ('cipher', POINTER(EVP_CIPHER)),
 983]
 984assert sizeof(pkcs7_enc_content_st) == 16, sizeof(pkcs7_enc_content_st)
 985assert alignment(pkcs7_enc_content_st) == 4, alignment(pkcs7_enc_content_st)
 986PKCS7_ENC_CONTENT = pkcs7_enc_content_st
 987class pkcs7_enveloped_st(Structure):
 988    pass
 989pkcs7_enveloped_st._fields_ = [
 990    ('version', POINTER(ASN1_INTEGER)),
 991    ('recipientinfo', POINTER(STACK)),
 992    ('enc_data', POINTER(PKCS7_ENC_CONTENT)),
 993]
 994assert sizeof(pkcs7_enveloped_st) == 12, sizeof(pkcs7_enveloped_st)
 995assert alignment(pkcs7_enveloped_st) == 4, alignment(pkcs7_enveloped_st)
 996PKCS7_ENVELOPE = pkcs7_enveloped_st
 997class pkcs7_signedandenveloped_st(Structure):
 998    pass
 999pkcs7_signedandenveloped_st._fields_ = [
1000    ('version', POINTER(ASN1_INTEGER)),
1001    ('md_algs', POINTER(STACK)),
1002    ('cert', POINTER(STACK)),
1003    ('crl', POINTER(STACK)),
1004    ('signer_info', POINTER(STACK)),
1005    ('enc_data', POINTER(PKCS7_ENC_CONTENT)),
1006    ('recipientinfo', POINTER(STACK)),
1007]
1008assert sizeof(pkcs7_signedandenveloped_st) == 28, sizeof(pkcs7_signedandenveloped_st)
1009assert alignment(pkcs7_signedandenveloped_st) == 4, alignment(pkcs7_signedandenveloped_st)
1010PKCS7_SIGN_ENVELOPE = pkcs7_signedandenveloped_st
1011class pkcs7_digest_st(Structure):
1012    pass
1013pkcs7_digest_st._fields_ = [
1014    ('version', POINTER(ASN1_INTEGER)),
1015    ('md', POINTER(X509_ALGOR)),
1016    ('contents', POINTER(pkcs7_st)),
1017    ('digest', POINTER(ASN1_OCTET_STRING)),
1018]
1019assert sizeof(pkcs7_digest_st) == 16, sizeof(pkcs7_digest_st)
1020assert alignment(pkcs7_digest_st) == 4, alignment(pkcs7_digest_st)
1021PKCS7_DIGEST = pkcs7_digest_st
1022class pkcs7_encrypted_st(Structure):
1023    pass
1024pkcs7_encrypted_st._fields_ = [
1025    ('version', POINTER(ASN1_INTEGER)),
1026    ('enc_data', POINTER(PKCS7_ENC_CONTENT)),
1027]
1028assert sizeof(pkcs7_encrypted_st) == 8, sizeof(pkcs7_encrypted_st)
1029assert alignment(pkcs7_encrypted_st) == 4, alignment(pkcs7_encrypted_st)
1030PKCS7_ENCRYPT = pkcs7_encrypted_st
1031class N8pkcs7_st4DOLLAR_15E(Union):
1032    pass
1033N8pkcs7_st4DOLLAR_15E._fields_ = [
1034    ('ptr', STRING),
1035    ('data', POINTER(ASN1_OCTET_STRING)),
1036    ('sign', POINTER(PKCS7_SIGNED)),
1037    ('enveloped', POINTER(PKCS7_ENVELOPE)),
1038    ('signed_and_enveloped', POINTER(PKCS7_SIGN_ENVELOPE)),
1039    ('digest', POINTER(PKCS7_DIGEST)),
1040    ('encrypted', POINTER(PKCS7_ENCRYPT)),
1041    ('other', POINTER(ASN1_TYPE)),
1042]
1043assert sizeof(N8pkcs7_st4DOLLAR_15E) == 4, sizeof(N8pkcs7_st4DOLLAR_15E)
1044assert alignment(N8pkcs7_st4DOLLAR_15E) == 4, alignment(N8pkcs7_st4DOLLAR_15E)
1045pkcs7_st._fields_ = [
1046    ('asn1', POINTER(c_ubyte)),
1047    ('length', c_long),
1048    ('state', c_int),
1049    ('detached', c_int),
1050    ('type', POINTER(ASN1_OBJECT)),
1051    ('d', N8pkcs7_st4DOLLAR_15E),
1052]
1053assert sizeof(pkcs7_st) == 24, sizeof(pkcs7_st)
1054assert alignment(pkcs7_st) == 4, alignment(pkcs7_st)
1055PKCS7 = pkcs7_st
1056class rc2_key_st(Structure):
1057    pass
1058rc2_key_st._fields_ = [
1059    ('data', c_uint * 64),
1060]
1061assert sizeof(rc2_key_st) == 256, sizeof(rc2_key_st)
1062assert alignment(rc2_key_st) == 4, alignment(rc2_key_st)
1063RC2_KEY = rc2_key_st
1064class rc4_key_st(Structure):
1065    pass
1066rc4_key_st._fields_ = [
1067    ('x', c_ubyte),
1068    ('y', c_ubyte),
1069    ('data', c_ubyte * 256),
1070]
1071assert sizeof(rc4_key_st) == 258, sizeof(rc4_key_st)
1072assert alignment(rc4_key_st) == 1, alignment(rc4_key_st)
1073RC4_KEY = rc4_key_st
1074class rc5_key_st(Structure):
1075    pass
1076rc5_key_st._fields_ = [
1077    ('rounds', c_int),
1078    ('data', c_ulong * 34),
1079]
1080assert sizeof(rc5_key_st) == 140, sizeof(rc5_key_st)
1081assert alignment(rc5_key_st) == 4, alignment(rc5_key_st)
1082RC5_32_KEY = rc5_key_st
1083class RIPEMD160state_st(Structure):
1084    pass
1085RIPEMD160state_st._fields_ = [
1086    ('A', c_uint),
1087    ('B', c_uint),
1088    ('C', c_uint),
1089    ('D', c_uint),
1090    ('E', c_uint),
1091    ('Nl', c_uint),
1092    ('Nh', c_uint),
1093    ('data', c_uint * 16),
1094    ('num', c_int),
1095]
1096assert sizeof(RIPEMD160state_st) == 96, sizeof(RIPEMD160state_st)
1097assert alignment(RIPEMD160state_st) == 4, alignment(RIPEMD160state_st)
1098RIPEMD160_CTX = RIPEMD160state_st
1099RSA = rsa_st
1100class rsa_meth_st(Structure):
1101    pass
1102rsa_meth_st._fields_ = [
1103    ('name', STRING),
1104    ('rsa_pub_enc', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
1105    ('rsa_pub_dec', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
1106    ('rsa_priv_enc', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
1107    ('rsa_priv_dec', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
1108    ('rsa_mod_exp', CFUNCTYPE(c_int, POINTER(BIGNUM), POINTER(BIGNUM), POINTER(RSA))),
1109    ('bn_mod_exp', CFUNCTYPE(c_int, POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
1110    ('init', CFUNCTYPE(c_int, POINTER(RSA))),
1111    ('finish', CFUNCTYPE(c_int, POINTER(RSA))),
1112    ('flags', c_int),
1113    ('app_data', STRING),
1114    ('rsa_sign', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), c_uint, POINTER(c_ubyte), POINTER(c_uint), POINTER(RSA))),
1115    ('rsa_verify', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), c_uint, POINTER(c_ubyte), c_uint, POINTER(RSA))),
1116]
1117assert sizeof(rsa_meth_st) == 52, sizeof(rsa_meth_st)
1118assert alignment(rsa_meth_st) == 4, alignment(rsa_meth_st)
1119RSA_METHOD = rsa_meth_st
1120rsa_st._fields_ = [
1121    ('pad', c_int),
1122    ('version', c_long),
1123    ('meth', POINTER(RSA_METHOD)),
1124    ('engine', POINTER(ENGINE)),
1125    ('n', POINTER(BIGNUM)),
1126    ('e', POINTER(BIGNUM)),
1127    ('d', POINTER(BIGNUM)),
1128    ('p', POINTER(BIGNUM)),
1129    ('q', POINTER(BIGNUM)),
1130    ('dmp1', POINTER(BIGNUM)),
1131    ('dmq1', POINTER(BIGNUM)),
1132    ('iqmp', POINTER(BIGNUM)),
1133    ('ex_data', CRYPTO_EX_DATA),
1134    ('references', c_int),
1135    ('flags', c_int),
1136    ('_method_mod_n', POINTER(BN_MONT_CTX)),
1137    ('_method_mod_p', POINTER(BN_MONT_CTX)),
1138    ('_method_mod_q', POINTER(BN_MONT_CTX)),
1139    ('bignum_data', STRING),
1140    ('blinding', POINTER(BN_BLINDING)),
1141]
1142assert sizeof(rsa_st) == 84, sizeof(rsa_st)
1143assert alignment(rsa_st) == 4, alignment(rsa_st)
1144openssl_fptr = CFUNCTYPE(None)
1145class SHAstate_st(Structure):
1146    pass
1147SHAstate_st._fields_ = [
1148    ('h0', c_uint),
1149    ('h1', c_uint),
1150    ('h2', c_uint),
1151    ('h3', c_uint),
1152    ('h4', c_uint),
1153    ('Nl', c_uint),
1154    ('Nh', c_uint),
1155    ('data', c_uint * 16),
1156    ('num', c_int),
1157]
1158assert sizeof(SHAstate_st) == 96, sizeof(SHAstate_st)
1159assert alignment(SHAstate_st) == 4, alignment(SHAstate_st)
1160SHA_CTX = SHAstate_st
1161class ssl_st(Structure):
1162    pass
1163ssl_crock_st = POINTER(ssl_st)
1164class ssl_cipher_st(Structure):
1165    pass
1166ssl_cipher_st._fields_ = [
1167    ('valid', c_int),
1168    ('name', STRING),
1169    ('id', c_ulong),
1170    ('algorithms', c_ulong),
1171    ('algo_strength', c_ulong),
1172    ('algorithm2', c_ulong),
1173    ('strength_bits', c_int),
1174    ('alg_bits', c_int),
1175    ('mask', c_ulong),
1176    ('mask_strength', c_ulong),
1177]
1178assert sizeof(ssl_cipher_st) == 40, sizeof(ssl_cipher_st)
1179assert alignment(ssl_cipher_st) == 4, alignment(ssl_cipher_st)
1180SSL_CIPHER = ssl_cipher_st
1181SSL = ssl_st
1182class ssl_ctx_st(Structure):
1183    pass
1184SSL_CTX = ssl_ctx_st
1185class ssl_method_st(Structure):
1186    pass
1187class ssl3_enc_method(Structure):
1188    pass
1189ssl_method_st._fields_ = [
1190    ('version', c_int),
1191    ('ssl_new', CFUNCTYPE(c_int, POINTER(SSL))),
1192    ('ssl_clear', CFUNCTYPE(None, POINTER(SSL))),
1193    ('ssl_free', CFUNCTYPE(None, POINTER(SSL))),
1194    ('ssl_accept', CFUNCTYPE(c_int, POINTER(SSL))),
1195    ('ssl_connect', CFUNCTYPE(c_int, POINTER(SSL))),
1196    ('ssl_read', CFUNCTYPE(c_int, POINTER(SSL), c_void_p, c_int)),
1197    ('ssl_peek', CFUNCTYPE(c_int, POINTER(SSL), c_void_p, c_int)),
1198    ('ssl_write', CFUNCTYPE(c_int, POINTER(SSL), c_void_p, c_int)),
1199    ('ssl_shutdown', CFUNCTYPE(c_int, POINTER(SSL))),
1200    ('ssl_renegotiate', CFUNCTYPE(c_int, POINTER(SSL))),
1201    ('ssl_renegotiate_check', CFUNCTYPE(c_int, POINTER(SSL))),
1202    ('ssl_ctrl', CFUNCTYPE(c_long, POINTER(SSL), c_int, c_long, c_void_p)),
1203    ('ssl_ctx_ctrl', CFUNCTYPE(c_long, POINTER(SSL_CTX), c_int, c_long, c_void_p)),
1204    ('get_cipher_by_char', CFUNCTYPE(POINTER(SSL_CIPHER), POINTER(c_ubyte))),
1205    ('put_cipher_by_char', CFUNCTYPE(c_int, POINTER(SSL_CIPHER), POINTER(c_ubyte))),
1206    ('ssl_pending', CFUNCTYPE(c_int, POINTER(SSL))),
1207    ('num_ciphers', CFUNCTYPE(c_int)),
1208    ('get_cipher', CFUNCTYPE(POINTER(SSL_CIPHER), c_uint)),
1209    ('get_ssl_method', CFUNCTYPE(POINTER(ssl_method_st), c_int)),
1210    ('get_timeout', CFUNCTYPE(c_long)),
1211    ('ssl3_enc', POINTER(ssl3_enc_method)),
1212    ('ssl_version', CFUNCTYPE(c_int)),
1213    ('ssl_callback_ctrl', CFUNCTYPE(c_long, POINTER(SSL), c_int, CFUNCTYPE(None))),
1214    ('ssl_ctx_callback_ctrl', CFUNCTYPE(c_long, POINTER(SSL_CTX), c_int, CFUNCTYPE(None))),
1215]
1216assert sizeof(ssl_method_st) == 100, sizeof(ssl_method_st)
1217assert alignment(ssl_method_st) == 4, alignment(ssl_method_st)
1218ssl3_enc_method._fields_ = [
1219]
1220SSL_METHOD = ssl_method_st
1221class ssl_session_st(Structure):
1222    pass
1223class sess_cert_st(Structure):
1224    pass
1225ssl_session_st._fields_ = [
1226    ('ssl_version', c_int),
1227    ('key_arg_length', c_uint),
1228    ('key_arg', c_ubyte * 8),
1229    ('master_key_length', c_int),
1230    ('master_key', c_ubyte * 48),
1231    ('session_id_length', c_uint),
1232    ('session_id', c_ubyte * 32),
1233    ('sid_ctx_length', c_uint),
1234    ('sid_ctx', c_ubyte * 32),
1235    ('not_resumable', c_int),
1236    ('sess_cert', POINTER(sess_cert_st)),
1237    ('peer', POINTER(X509)),
1238    ('verify_result', c_long),
1239    ('references', c_int),
1240    ('timeout', c_long),
1241    ('time', c_long),
1242    ('compress_meth', c_int),
1243    ('cipher', POINTER(SSL_CIPHER)),
1244    ('cipher_id', c_ulong),
1245    ('ciphers', POINTER(STACK)),
1246    ('ex_data', CRYPTO_EX_DATA),
1247    ('prev', POINTER(ssl_session_st)),
1248    ('next', POINTER(ssl_session_st)),
1249]
1250assert sizeof(ssl_session_st) == 200, sizeof(ssl_session_st)
1251assert alignment(ssl_session_st) == 4, alignment(ssl_session_st)
1252sess_cert_st._fields_ = [
1253]
1254SSL_SESSION = ssl_session_st
1255GEN_SESSION_CB = CFUNCTYPE(c_int, POINTER(SSL), POINTER(c_ubyte), POINTER(c_uint))
1256class ssl_comp_st(Structure):
1257    pass
1258ssl_comp_st._fields_ = [
1259    ('id', c_int),
1260    ('name', STRING),
1261    ('method', POINTER(COMP_METHOD)),
1262]
1263assert sizeof(ssl_comp_st) == 12, sizeof(ssl_comp_st)
1264assert alignment(ssl_comp_st) == 4, alignment(ssl_comp_st)
1265SSL_COMP = ssl_comp_st
1266class N10ssl_ctx_st4DOLLAR_18E(Structure):
1267    pass
1268N10ssl_ctx_st4DOLLAR_18E._fields_ = [
1269    ('sess_connect', c_int),
1270    ('sess_connect_renegotiate', c_int),
1271    ('sess_connect_good', c_int),
1272    ('sess_accept', c_int),
1273    ('sess_accept_renegotiate', c_int),
1274    ('sess_accept_good', c_int),
1275    ('sess_miss', c_int),
1276    ('sess_timeout', c_int),
1277    ('sess_cache_full', c_int),
1278    ('sess_hit', c_int),
1279    ('sess_cb_hit', c_int),
1280]
1281assert sizeof(N10ssl_ctx_st4DOLLAR_18E) == 44, sizeof(N10ssl_ctx_st4DOLLAR_18E)
1282assert alignment(N10ssl_ctx_st4DOLLAR_18E) == 4, alignment(N10ssl_ctx_st4DOLLAR_18E)
1283class cert_st(Structure):
1284    pass
1285ssl_ctx_st._fields_ = [
1286    ('method', POINTER(SSL_METHOD)),
1287    ('cipher_list', POINTER(STACK)),
1288    ('cipher_list_by_id', POINTER(STACK)),
1289    ('cert_store', POINTER(x509_store_st)),
1290    ('sessions', POINTER(lhash_st)),
1291    ('session_cache_size', c_ulong),
1292    ('session_cache_head', POINTER(ssl_session_st)),
1293    ('session_cache_tail', POINTER(ssl_session_st)),
1294    ('session_cache_mode', c_int),
1295    ('session_timeout', c_long),
1296    ('new_session_cb', CFUNCTYPE(c_int, POINTER(ssl_st), POINTER(SSL_SESSION))),
1297    ('remove_session_cb', CFUNCTYPE(None, POINTER(ssl_ctx_st), POINTER(SSL_SESSION))),
1298    ('get_session_cb', CFUNCTYPE(POINTER(SSL_SESSION), POINTER(ssl_st), POINTER(c_ubyte), c_int, POINTER(c_int))),
1299    ('stats', N10ssl_ctx_st4DOLLAR_18E),
1300    ('references', c_int),
1301    ('app_verify_callback', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), c_void_p)),
1302    ('app_verify_arg', c_void_p),
1303    ('default_passwd_callback', POINTER(pem_password_cb)),
1304    ('default_passwd_callback_userdata', c_void_p),
1305    ('client_cert_cb', CFUNCTYPE(c_int, POINTER(SSL), POINTER(POINTER(X509)), POINTER(POINTER(EVP_PKEY)))),
1306    ('ex_data', CRYPTO_EX_DATA),
1307    ('rsa_md5', POINTER(EVP_MD)),
1308    ('md5', POINTER(EVP_MD)),
1309    ('sha1', POINTER(EVP_MD)),
1310    ('extra_certs', POINTER(STACK)),
1311    ('comp_methods', POINTER(STACK)),
1312    ('info_callback', CFUNCTYPE(None, POINTER(SSL), c_int, c_int)),
1313    ('client_CA', POINTER(STACK)),
1314    ('options', c_ulong),
1315    ('mode', c_ulong),
1316    ('max_cert_list', c_long),
1317    ('cert', POINTER(cert_st)),
1318    ('read_ahead', c_int),
1319    ('msg_callback', CFUNCTYPE(None, c_int, c_int, c_int, c_void_p, c_ulong, POINTER(SSL), c_void_p)),
1320    ('msg_callback_arg', c_void_p),
1321    ('verify_mode', c_int),
1322    ('verify_depth', c_int),
1323    ('sid_ctx_length', c_uint),
1324    ('sid_ctx', c_ubyte * 32),
1325    ('default_verify_callback', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
1326    ('generate_session_id', GEN_SESSION_CB),
1327    ('purpose', c_int),
1328    ('trust', c_int),
1329    ('quiet_shutdown', c_int),
1330]
1331assert sizeof(ssl_ctx_st) == 248, sizeof(ssl_ctx_st)
1332assert alignment(ssl_ctx_st) == 4, alignment(ssl_ctx_st)
1333cert_st._fields_ = [
1334]
1335class ssl2_state_st(Structure):
1336    pass
1337class ssl3_state_st(Structure):
1338    pass
1339ssl_st._fields_ = [
1340    ('version', c_int),
1341    ('type', c_int),
1342    ('method', POINTER(SSL_METHOD)),
1343    ('rbio', POINTER(BIO)),
1344    ('wbio', POINTER(BIO)),
1345    ('bbio', POINTER(BIO)),
1346    ('rwstate', c_int),
1347    ('in_handshake', c_int),
1348    ('handshake_func', CFUNCTYPE(c_int)),
1349    ('server', c_int),
1350    ('new_session', c_int),
1351    ('quiet_shutdown', c_int),
1352    ('shutdown', c_int),
1353    ('state', c_int),
1354    ('rstate', c_int),
1355    ('init_buf', POINTER(BUF_MEM)),
1356    ('init_msg', c_void_p),
1357    ('init_num', c_int),
1358    ('init_off', c_int),
1359    ('packet', POINTER(c_ubyte)),
1360    ('packet_length', c_uint),
1361    ('s2', POINTER(ssl2_state_st)),
1362    ('s3', POINTER(ssl3_state_st)),
1363    ('read_ahead', c_int),
1364    ('msg_callback', CFUNCTYPE(None, c_int, c_int, c_int, c_void_p, c_ulong, POINTER(SSL), c_void_p)),
1365    ('msg_callback_arg', c_void_p),
1366    ('hit', c_int),
1367    ('purpose', c_int),
1368    ('trust', c_int),
1369    ('cipher_list', POINTER(STACK)),
1370    ('cipher_list_by_id', POINTER(STACK)),
1371    ('enc_read_ctx', POINTER(EVP_CIPHER_CTX)),
1372    ('read_hash', POINTER(EVP_MD)),
1373    ('expand', POINTER(COMP_CTX)),
1374    ('enc_write_ctx', POINTER(EVP_CIPHER_CTX)),
1375    ('write_hash', POINTER(EVP_MD)),
1376    ('compress', POINTER(COMP_CTX)),
1377    ('cert', POINTER(cert_st)),
1378    ('sid_ctx_length', c_uint),
1379    ('sid_ctx', c_ubyte * 32),
1380    ('session', POINTER(SSL_SESSION)),
1381    ('generate_session_id', GEN_SESSION_CB),
1382    ('verify_mode', c_int),
1383    ('verify_depth', c_int),
1384    ('verify_callback', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
1385    ('info_callback', CFUNCTYPE(None, POINTER(SSL), c_int, c_int)),
1386    ('error', c_int),
1387    ('error_code', c_int),
1388    ('ctx', POINTER(SSL_CTX)),
1389    ('debug', c_int),
1390    ('verify_result', c_long),
1391    ('ex_data', CRYPTO_EX_DATA),
1392    ('client_CA', POINTER(STACK)),
1393    ('references', c_int),
1394    ('options', c_ulong),
1395    ('mode', c_ulong),
1396    ('max_cert_list', c_long),
1397    ('first_packet', c_int),
1398    ('client_version', c_int),
1399]
1400assert sizeof(ssl_st) == 268, sizeof(ssl_st)
1401assert alignment(ssl_st) == 4, alignment(ssl_st)
1402class N13ssl2_state_st4DOLLAR_19E(Structure):
1403    pass
1404N13ssl2_state_st4DOLLAR_19E._fields_ = [
1405    ('conn_id_length', c_uint),
1406    ('cert_type', c_uint),
1407    ('cert_length', c_uint),
1408    ('csl', c_uint),
1409    ('clear', c_uint),
1410    ('enc', c_uint),
1411    ('ccl', c_ubyte * 32),
1412    ('cipher_spec_length', c_uint),
1413    ('session_id_length', c_uint),
1414    ('clen', c_uint),
1415    ('rlen', c_uint),
1416]
1417assert sizeof(N13ssl2_state_st4DOLLAR_19E) == 72, sizeof(N13ssl2_state_st4DOLLAR_19E)
1418assert alignment(N13ssl2_state_st4DOLLAR_19E) == 4, alignment(N13ssl2_state_st4DOLLAR_19E)
1419ssl2_state_st._fields_ = [
1420    ('three_byte_header', c_int),
1421    ('clear_text', c_int),
1422    ('escape', c_int),
1423    ('ssl2_rollback', c_int),
1424    ('wnum', c_uint),
1425    ('wpend_tot', c_int),
1426    ('wpend_buf', POINTER(c_ubyte)),
1427    ('wpend_off', c_int),
1428    ('wpend_len', c_int),
1429    ('wpend_ret', c_int),
1430    ('rbuf_left', c_int),
1431    ('rbuf_offs', c_int),
1432    ('rbuf', POINTER(c_ubyte)),
1433    ('wbuf', POINTER(c_ubyte)),
1434    ('write_ptr', POINTER(c_ubyte)),
1435    ('padding', c_uint),
1436    ('rlength', c_uint),
1437    ('ract_data_length', c_int),
1438    ('wlength', c_uint),
1439    ('wact_data_length', c_int),
1440    ('ract_data', POINTER(c_ubyte)),
1441    ('wact_data', POINTER(c_ubyte)),
1442    ('mac_data', POINTER(c_ubyte)),
1443    ('read_key', POINTER(c_ubyte)),
1444    ('write_key', POINTER(c_ubyte)),
1445    ('challenge_length', c_uint),
1446    ('challenge', c_ubyte * 32),
1447    ('conn_id_length', c_uint),
1448    ('conn_id', c_ubyte * 16),
1449    ('key_material_length', c_uint),
1450    ('key_material', c_ubyte * 48),
1451    ('read_sequence', c_ulong),
1452    ('write_sequence', c_ulong),
1453    ('tmp', N13ssl2_state_st4DOLLAR_19E),
1454]
1455assert sizeof(ssl2_state_st) == 288, sizeof(ssl2_state_st)
1456assert alignment(ssl2_state_st) == 4, alignment(ssl2_state_st)
1457SSL2_STATE = ssl2_state_st
1458class ssl3_record_st(Structure):
1459    pass
1460ssl3_record_st._fields_ = [
1461    ('type', c_int),
1462    ('length', c_uint),
1463    ('off', c_uint),
1464    ('data', POINTER(c_ubyte)),
1465    ('input', POINTER(c_ubyte)),
1466    ('comp', POINTER(c_ubyte)),
1467]
1468assert sizeof(ssl3_record_st) == 24, sizeof(ssl3_record_st)
1469assert alignment(ssl3_record_st) == 4, alignment(ssl3_record_st)
1470SSL3_RECORD = ssl3_record_st
1471class ssl3_buffer_st(Structure):
1472    pass
1473size_t = __darwin_size_t
1474ssl3_buffer_st._fields_ = [
1475    ('buf', POINTER(c_ubyte)),
1476    ('len', size_t),
1477    ('offset', c_int),
1478    ('left', c_int),
1479]
1480assert sizeof(ssl3_buffer_st) == 16, sizeof(ssl3_buffer_st)
1481assert alignment(ssl3_buffer_st) == 4, alignment(ssl3_buffer_st)
1482SSL3_BUFFER = ssl3_buffer_st
1483class N13ssl3_state_st4DOLLAR_20E(Structure):
1484    pass
1485N13ssl3_state_st4DOLLAR_20E._fields_ = [
1486    ('cert_verify_md', c_ubyte * 72),
1487    ('finish_md', c_ubyte * 72),
1488    ('finish_md_len', c_int),
1489    ('peer_finish_md', c_ubyte * 72),
1490    ('peer_finish_md_len', c_int),
1491    ('message_size', c_ulong),
1492    ('message_type', c_int),
1493    ('new_cipher', POINTER(SSL_CIPHER)),
1494    ('dh', POINTER(DH)),
1495    ('next_state', c_int),
1496    ('reuse_message', c_int),
1497    ('cert_req', c_int),
1498    ('ctype_num', c_int),
1499    ('ctype', c_char * 7),
1500    ('ca_names', POINTER(STACK)),
1501    ('use_rsa_tmp', c_int),
1502    ('key_block_length', c_int),
1503    ('key_block', POINTER(c_ubyte)),
1504    ('new_sym_enc', POINTER(EVP_CIPHER)),
1505    ('new_hash', POINTER(EVP_MD)),
1506    ('new_compression', POINTER(SSL_COMP)),
1507    ('cert_request', c_int),
1508]
1509assert sizeof(N13ssl3_state_st4DOLLAR_20E) == 296, sizeof(N13ssl3_state_st4DOLLAR_20E)
1510assert alignment(N13ssl3_state_st4DOLLAR_20E) == 4, alignment(N13ssl3_state_st4DOLLAR_20E)
1511ssl3_state_st._fields_ = [
1512    ('flags', c_long),
1513    ('delay_buf_pop_…

Large files files are truncated, but you can click here to view the full file