4 * Copyright (C) AB Strakt
5 * See LICENSE for details.
7 * Export SSL Connection data structures and functions.
8 * See the file RATIONALE for a short explanation of why this module was written.
13 #ifndef PyOpenSSL_SSL_CONNECTION_H_
14 #define PyOpenSSL_SSL_CONNECTION_H_
17 #include <openssl/ssl.h>
19 /* shamelessly stolen from socketmodule.c */
22 typedef SOCKET SOCKET_T;
24 # define SIZEOF_SOCKET_T 8
26 # define SIZEOF_SOCKET_T 4
30 # define SIZEOF_SOCKET_T SIZEOF_INT
34 extern int init_ssl_connection (PyObject *);
36 extern PyTypeObject ssl_Connection_Type;
38 #define ssl_Connection_Check(v) ((v)->ob_type == &ssl_Connection_Type)
43 ssl_ContextObj *context;
45 PyThreadState *tstate; /* This field is no longer used. */
47 BIO *into_ssl, *from_ssl; /* for connections without file descriptors */