aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl/rand.py
blob: c0cd68365960231d3114d929e5f9339b69128ade (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
# 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/rand.h>
"""

TYPES = """
typedef ... RAND_METHOD;

static const long Cryptography_HAS_EGD;
"""

FUNCTIONS = """
int RAND_set_rand_method(const RAND_METHOD *);
void RAND_add(const void *, int, double);
int RAND_status(void);
int RAND_bytes(unsigned char *, int);
/* ERR_load_RAND_strings started returning an int in 1.1.0. Unfortunately we
   can't declare a conditional signature like that. Since it always returns
   1 we'll just lie about the signature to preserve compatibility for
   pyOpenSSL (which calls this in its rand.py as of mid-2016) */
void ERR_load_RAND_strings(void);
"""

CUSTOMIZATIONS = """
static const long Cryptography_HAS_EGD = 0;
"""