aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl/cryptography.py
blob: c3b0a1dc03c46cfd41260832886931d30f524603 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

from __future__ import absolute_import, division, print_function

INCLUDES = """
#include <openssl/opensslv.h>
/*
    LibreSSL removed e_os2.h from the public headers so we'll only include it
    if we're using vanilla OpenSSL.
*/
#if !defined(LIBRESSL_VERSION_NUMBER)
#include <openssl/e_os2.h>
#endif
#if defined(_WIN32)
#include <windows.h>
#endif

#define CRYPTOGRAPHY_OPENSSL_101_OR_GREATER \
    (OPENSSL_VERSION_NUMBER >= 0x10001000)
#define CRYPTOGRAPHY_OPENSSL_102_OR_GREATER \
    (OPENSSL_VERSION_NUMBER >= 0x10002000)
#define CRYPTOGRAPHY_OPENSSL_102BETA2_OR_GREATER \
    (OPENSSL_VERSION_NUMBER >= 0x10002002)
#define CRYPTOGRAPHY_OPENSSL_110_OR_GREATER \
    (OPENSSL_VERSION_NUMBER >= 0x10100000)

#define CRYPTOGRAPHY_OPENSSL_LESS_THAN_101 \
    (OPENSSL_VERSION_NUMBER < 0x10001000)
#define CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 \
    (OPENSSL_VERSION_NUMBER < 0x10002000)
#define CRYPTOGRAPHY_OPENSSL_LESS_THAN_102BETA3 \
    (OPENSSL_VERSION_NUMBER < 0x10002003)
#define CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 \
    (OPENSSL_VERSION_NUMBER < 0x10100000)
#define CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE5 \
    (OPENSSL_VERSION_NUMBER < 0x10100005)
"""

TYPES = """
static const int CRYPTOGRAPHY_OPENSSL_101_OR_GREATER;

static const int CRYPTOGRAPHY_OPENSSL_LESS_THAN_101;
"""

FUNCTIONS = """
"""

MACROS = """
"""

CUSTOMIZATIONS = """
"""