Jean-Paul Calderone | e0fcf51 | 2012-02-13 09:10:15 -0500 | [diff] [blame] | 1 | /* |
| 2 | * session.h |
| 3 | * Copyright (C) Jean-Paul Calderone |
| 4 | * See LICENSE for details. |
| 5 | * |
| 6 | * Defined here is the Python type which represents an SSL session by wrapping |
| 7 | * an OpenSSL SSL_SESSION*. |
| 8 | * |
| 9 | */ |
| 10 | |
| 11 | #ifndef PyOpenSSL_SSL_SESSION_H_ |
| 12 | #define PyOpenSSL_SSL_SESSION_H_ |
| 13 | |
| 14 | #include <Python.h> |
| 15 | #include <openssl/ssl.h> |
| 16 | |
| 17 | typedef struct { |
| 18 | PyObject_HEAD |
Jean-Paul Calderone | 64eaffc | 2012-02-13 11:53:49 -0500 | [diff] [blame] | 19 | SSL_SESSION *session; |
Jean-Paul Calderone | e0fcf51 | 2012-02-13 09:10:15 -0500 | [diff] [blame] | 20 | } ssl_SessionObj; |
| 21 | |
| 22 | extern PyTypeObject ssl_Session_Type; |
| 23 | |
| 24 | extern int init_ssl_session(PyObject *); |
Jean-Paul Calderone | 64eaffc | 2012-02-13 11:53:49 -0500 | [diff] [blame] | 25 | extern ssl_SessionObj *ssl_Session_from_SSL_SESSION(SSL_SESSION *native_session); |
Jean-Paul Calderone | e0fcf51 | 2012-02-13 09:10:15 -0500 | [diff] [blame] | 26 | |
| 27 | #endif |