summaryrefslogtreecommitdiff
path: root/OpenSSL/ssl/session.h
blob: 4e8de111e5a497668061f0c1e0138c1a2a00c165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * session.h
 * Copyright (C) Jean-Paul Calderone
 * See LICENSE for details.
 *
 * Defined here is the Python type which represents an SSL session by wrapping
 * an OpenSSL SSL_SESSION*.
 *
 */

#ifndef PyOpenSSL_SSL_SESSION_H_
#define PyOpenSSL_SSL_SESSION_H_

#include <Python.h>
#include <openssl/ssl.h>

typedef struct {
    PyObject_HEAD
    SSL_SESSION *session;
} ssl_SessionObj;

extern PyTypeObject ssl_Session_Type;

extern int init_ssl_session(PyObject *);
extern ssl_SessionObj *ssl_Session_from_SSL_SESSION(SSL_SESSION *native_session);

#endif