Debian Codegraph @

lib_pypy/_cffi_ssl/_cffi_src/openssl/ecdsa.py

raw symbols SCIP
1 # This file is dual licensed under the terms of the Apache License, Version
2 # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 # for complete details.
4
5 from __future__ import absolute_import, division, print_function
6
7 INCLUDES = """
8 #include <openssl/ecdsa.h>
9 """
10
11 TYPES = """
12 static const int Cryptography_HAS_ECDSA;
13
14 typedef ... ECDSA_SIG;
15
16 typedef ... CRYPTO_EX_new;
17 typedef ... CRYPTO_EX_dup;
18 typedef ... CRYPTO_EX_free;
19 """
20
21 FUNCTIONS = """
22 ECDSA_SIG *ECDSA_SIG_new();
23 void ECDSA_SIG_free(ECDSA_SIG *);
24 int i2d_ECDSA_SIG(const ECDSA_SIG *, unsigned char **);
25 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **s, const unsigned char **, long);
26 ECDSA_SIG *ECDSA_do_sign(const unsigned char *, int, EC_KEY *);
27 int ECDSA_do_verify(const unsigned char *, int, const ECDSA_SIG *, EC_KEY *);
28 int ECDSA_sign(int, const unsigned char *, int, unsigned char *,
29 unsigned int *, EC_KEY *);
30 int ECDSA_verify(int, const unsigned char *, int, const unsigned char *, int,
31 EC_KEY *);
32 int ECDSA_size(const EC_KEY *);
33
34 """
35
36 CUSTOMIZATIONS = """
37 static const long Cryptography_HAS_ECDSA = 1;
38 """