Initial import to Tizen
[profile/ivi/python-pyOpenSSL.git] / OpenSSL / ssl / context.h
1 /*
2  * context.h
3  *
4  * Copyright (C) AB Strakt
5  * See LICENSE for details.
6  *
7  * Export SSL Context object data structures and functions.
8  * See the file RATIONALE for a short explanation of why this module was written.
9  *
10  * Reviewed 2001-07-23
11  *
12  */
13 #ifndef PyOpenSSL_SSL_CONTEXT_H_
14 #define PyOpenSSL_SSL_CONTEXT_H_
15
16 #include <Python.h>
17 #include <openssl/ssl.h>
18
19 extern  int                   init_ssl_context      (PyObject *);
20
21 extern  PyTypeObject      ssl_Context_Type;
22
23 #define ssl_Context_Check(v) ((v)->ob_type == &ssl_Context_Type)
24
25 typedef struct {
26     PyObject_HEAD
27     SSL_CTX             *ctx;
28     PyObject            *passphrase_callback,
29                         *passphrase_userdata,
30                         *verify_callback,
31                         *info_callback,
32                         *app_data;
33     PyThreadState       *tstate;
34 } ssl_ContextObj;
35
36 #define ssl_SSLv2_METHOD      (1)
37 #define ssl_SSLv3_METHOD      (2)
38 #define ssl_SSLv23_METHOD     (3)
39 #define ssl_TLSv1_METHOD      (4)
40
41
42 #endif