Added
Link Here
|
1 |
--- src/_cffi_src/openssl/ec.py.orig 2018-03-27 14:12:05 UTC |
2 |
+++ src/_cffi_src/openssl/ec.py |
3 |
@@ -27,34 +27,16 @@ typedef struct { |
4 |
typedef enum { |
5 |
POINT_CONVERSION_COMPRESSED, |
6 |
POINT_CONVERSION_UNCOMPRESSED, |
7 |
- POINT_CONVERSION_HYBRID, |
8 |
... |
9 |
} point_conversion_form_t; |
10 |
""" |
11 |
|
12 |
FUNCTIONS = """ |
13 |
-EC_GROUP *EC_GROUP_new(const EC_METHOD *); |
14 |
void EC_GROUP_free(EC_GROUP *); |
15 |
-void EC_GROUP_clear_free(EC_GROUP *); |
16 |
|
17 |
-EC_GROUP *EC_GROUP_new_curve_GFp( |
18 |
- const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); |
19 |
-EC_GROUP *EC_GROUP_new_curve_GF2m( |
20 |
- const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); |
21 |
EC_GROUP *EC_GROUP_new_by_curve_name(int); |
22 |
|
23 |
-int EC_GROUP_set_curve_GFp( |
24 |
- EC_GROUP *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); |
25 |
-int EC_GROUP_get_curve_GFp( |
26 |
- const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *, BN_CTX *); |
27 |
-int EC_GROUP_set_curve_GF2m( |
28 |
- EC_GROUP *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); |
29 |
-int EC_GROUP_get_curve_GF2m( |
30 |
- const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *, BN_CTX *); |
31 |
- |
32 |
int EC_GROUP_get_degree(const EC_GROUP *); |
33 |
-void EC_GROUP_set_asn1_flag(EC_GROUP *, int); |
34 |
-void EC_GROUP_set_point_conversion_form(EC_GROUP *, point_conversion_form_t); |
35 |
|
36 |
const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *); |
37 |
const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *); |
38 |
@@ -65,13 +47,7 @@ size_t EC_get_builtin_curves(EC_builtin_curve *, size_ |
39 |
EC_KEY *EC_KEY_new(void); |
40 |
void EC_KEY_free(EC_KEY *); |
41 |
|
42 |
-int EC_KEY_get_flags(const EC_KEY *); |
43 |
-void EC_KEY_set_flags(EC_KEY *, int); |
44 |
-void EC_KEY_clear_flags(EC_KEY *, int); |
45 |
EC_KEY *EC_KEY_new_by_curve_name(int); |
46 |
-EC_KEY *EC_KEY_copy(EC_KEY *, EC_KEY *); |
47 |
-EC_KEY *EC_KEY_dup(EC_KEY *); |
48 |
-int EC_KEY_up_ref(EC_KEY *); |
49 |
const EC_GROUP *EC_KEY_get0_group(const EC_KEY *); |
50 |
int EC_GROUP_get_order(const EC_GROUP *, BIGNUM *, BN_CTX *); |
51 |
int EC_KEY_set_group(EC_KEY *, const EC_GROUP *); |
52 |
@@ -79,31 +55,15 @@ const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *); |
53 |
int EC_KEY_set_private_key(EC_KEY *, const BIGNUM *); |
54 |
const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *); |
55 |
int EC_KEY_set_public_key(EC_KEY *, const EC_POINT *); |
56 |
-unsigned int EC_KEY_get_enc_flags(const EC_KEY *); |
57 |
-void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int); |
58 |
-point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *); |
59 |
-void EC_KEY_set_conv_form(EC_KEY *, point_conversion_form_t); |
60 |
void EC_KEY_set_asn1_flag(EC_KEY *, int); |
61 |
-int EC_KEY_precompute_mult(EC_KEY *, BN_CTX *); |
62 |
int EC_KEY_generate_key(EC_KEY *); |
63 |
-int EC_KEY_check_key(const EC_KEY *); |
64 |
int EC_KEY_set_public_key_affine_coordinates(EC_KEY *, BIGNUM *, BIGNUM *); |
65 |
|
66 |
EC_POINT *EC_POINT_new(const EC_GROUP *); |
67 |
void EC_POINT_free(EC_POINT *); |
68 |
void EC_POINT_clear_free(EC_POINT *); |
69 |
-int EC_POINT_copy(EC_POINT *, const EC_POINT *); |
70 |
EC_POINT *EC_POINT_dup(const EC_POINT *, const EC_GROUP *); |
71 |
-const EC_METHOD *EC_POINT_method_of(const EC_POINT *); |
72 |
|
73 |
-int EC_POINT_set_to_infinity(const EC_GROUP *, EC_POINT *); |
74 |
- |
75 |
-int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *, EC_POINT *, |
76 |
- const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); |
77 |
- |
78 |
-int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *, |
79 |
- const EC_POINT *, BIGNUM *, BIGNUM *, BIGNUM *, BN_CTX *); |
80 |
- |
81 |
int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *, EC_POINT *, |
82 |
const BIGNUM *, const BIGNUM *, BN_CTX *); |
83 |
|
84 |
@@ -129,18 +89,6 @@ size_t EC_POINT_point2oct(const EC_GROUP *, const EC_P |
85 |
int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *, |
86 |
const unsigned char *, size_t, BN_CTX *); |
87 |
|
88 |
-BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *, |
89 |
- point_conversion_form_t form, BIGNUM *, BN_CTX *); |
90 |
- |
91 |
-EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *, |
92 |
- EC_POINT *, BN_CTX *); |
93 |
- |
94 |
-char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *, |
95 |
- point_conversion_form_t form, BN_CTX *); |
96 |
- |
97 |
-EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *, |
98 |
- EC_POINT *, BN_CTX *); |
99 |
- |
100 |
int EC_POINT_add(const EC_GROUP *, EC_POINT *, const EC_POINT *, |
101 |
const EC_POINT *, BN_CTX *); |
102 |
|
103 |
@@ -152,25 +100,9 @@ int EC_POINT_is_on_curve(const EC_GROUP *, const EC_PO |
104 |
int EC_POINT_cmp( |
105 |
const EC_GROUP *, const EC_POINT *, const EC_POINT *, BN_CTX *); |
106 |
|
107 |
-int EC_POINT_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *); |
108 |
-int EC_POINTs_make_affine(const EC_GROUP *, size_t, EC_POINT *[], BN_CTX *); |
109 |
- |
110 |
-int EC_POINTs_mul( |
111 |
- const EC_GROUP *, EC_POINT *, const BIGNUM *, |
112 |
- size_t, const EC_POINT *[], const BIGNUM *[], BN_CTX *); |
113 |
- |
114 |
int EC_POINT_mul(const EC_GROUP *, EC_POINT *, const BIGNUM *, |
115 |
const EC_POINT *, const BIGNUM *, BN_CTX *); |
116 |
|
117 |
-int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *); |
118 |
-int EC_GROUP_have_precompute_mult(const EC_GROUP *); |
119 |
- |
120 |
-const EC_METHOD *EC_GFp_simple_method(); |
121 |
-const EC_METHOD *EC_GFp_mont_method(); |
122 |
-const EC_METHOD *EC_GFp_nist_method(); |
123 |
- |
124 |
-const EC_METHOD *EC_GF2m_simple_method(); |
125 |
- |
126 |
int EC_METHOD_get_field_type(const EC_METHOD *); |
127 |
|
128 |
const char *EC_curve_nid2nist(int); |
129 |
@@ -182,8 +114,6 @@ static const long Cryptography_HAS_EC = 1; |
130 |
#if defined(OPENSSL_NO_EC2M) |
131 |
static const long Cryptography_HAS_EC2M = 0; |
132 |
|
133 |
-const EC_METHOD *(*EC_GF2m_simple_method)() = NULL; |
134 |
- |
135 |
int (*EC_POINT_set_affine_coordinates_GF2m)(const EC_GROUP *, EC_POINT *, |
136 |
const BIGNUM *, const BIGNUM *, BN_CTX *) = NULL; |
137 |
|
138 |
@@ -192,15 +122,6 @@ int (*EC_POINT_get_affine_coordinates_GF2m)(const EC_G |
139 |
|
140 |
int (*EC_POINT_set_compressed_coordinates_GF2m)(const EC_GROUP *, EC_POINT *, |
141 |
const BIGNUM *, int, BN_CTX *) = NULL; |
142 |
- |
143 |
-int (*EC_GROUP_set_curve_GF2m)( |
144 |
- EC_GROUP *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); |
145 |
- |
146 |
-int (*EC_GROUP_get_curve_GF2m)( |
147 |
- const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *, BN_CTX *); |
148 |
- |
149 |
-EC_GROUP *(*EC_GROUP_new_curve_GF2m)( |
150 |
- const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); |
151 |
#else |
152 |
static const long Cryptography_HAS_EC2M = 1; |
153 |
#endif |