We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bind X509_verify_cert_error_string
pyOpenSSL 0.14 needs this.  https://github.com/pyca/pyopenssl/issues/30


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `cryptography/hazmat/bindings/openssl/x509.py`
Content:
```
1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
4 #
5 #    http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10 # implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13 
14 INCLUDES = """
15 #include <openssl/ssl.h>
16 
17 /*
18  * This is part of a work-around for the difficulty cffi has in dealing with
19  * `STACK_OF(foo)` as the name of a type.  We invent a new, simpler name that
20  * will be an alias for this type and use the alias throughout.  This works
21  * together with another opaque typedef for the same name in the TYPES section.
22  * Note that the result is an opaque type.
23  */
24 typedef STACK_OF(X509) Cryptography_STACK_OF_X509;
25 typedef STACK_OF(X509_REVOKED) Cryptography_STACK_OF_X509_REVOKED;
26 """
27 
28 TYPES = """
29 typedef ... Cryptography_STACK_OF_X509;
30 typedef ... Cryptography_STACK_OF_X509_REVOKED;
31 
32 typedef struct {
33     ASN1_OBJECT *algorithm;
34     ...;
35 } X509_ALGOR;
36 
37 typedef struct {
38     X509_ALGOR *signature;
39     ...;
40 } X509_CINF;
41 
42 typedef struct {
43     ASN1_OBJECT *object;
44     ASN1_BOOLEAN critical;
45     ASN1_OCTET_STRING *value;
46 } X509_EXTENSION;
47 
48 typedef ... X509_EXTENSIONS;
49 
50 typedef ... X509_REQ;
51 
52 typedef struct {
53     ASN1_INTEGER *serialNumber;
54     ASN1_TIME *revocationDate;
55     X509_EXTENSIONS *extensions;
56     int sequence;
57     ...;
58 } X509_REVOKED;
59 
60 typedef struct {
61     Cryptography_STACK_OF_X509_REVOKED *revoked;
62     ...;
63 } X509_CRL_INFO;
64 
65 typedef struct {
66     X509_CRL_INFO *crl;
67     ...;
68 } X509_CRL;
69 
70 typedef struct {
71     X509_CINF *cert_info;
72     ...;
73 } X509;
74 
75 typedef ... X509_STORE;
76 typedef ... NETSCAPE_SPKI;
77 """
78 
79 FUNCTIONS = """
80 X509 *X509_new(void);
81 void X509_free(X509 *);
82 X509 *X509_dup(X509 *);
83 
84 int X509_print_ex(BIO *, X509 *, unsigned long, unsigned long);
85 
86 int X509_set_version(X509 *, long);
87 
88 EVP_PKEY *X509_get_pubkey(X509 *);
89 int X509_set_pubkey(X509 *, EVP_PKEY *);
90 
91 unsigned char *X509_alias_get0(X509 *, int *);
92 int X509_sign(X509 *, EVP_PKEY *, const EVP_MD *);
93 
94 int X509_digest(const X509 *, const EVP_MD *, unsigned char *, unsigned int *);
95 
96 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *, long);
97 
98 unsigned long X509_subject_name_hash(X509 *);
99 
100 X509_NAME *X509_get_subject_name(X509 *);
101 int X509_set_subject_name(X509 *, X509_NAME *);
102 
103 X509_NAME *X509_get_issuer_name(X509 *);
104 int X509_set_issuer_name(X509 *, X509_NAME *);
105 
106 int X509_get_ext_count(X509 *);
107 int X509_add_ext(X509 *, X509_EXTENSION *, int);
108 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *);
109 X509_EXTENSION *X509_get_ext(X509 *, int);
110 int X509_EXTENSION_get_critical(X509_EXTENSION *);
111 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *);
112 void X509_EXTENSION_free(X509_EXTENSION *);
113 
114 int X509_REQ_set_version(X509_REQ *, long);
115 X509_REQ *X509_REQ_new(void);
116 void X509_REQ_free(X509_REQ *);
117 int X509_REQ_set_pubkey(X509_REQ *, EVP_PKEY *);
118 int X509_REQ_sign(X509_REQ *, EVP_PKEY *, const EVP_MD *);
119 int X509_REQ_verify(X509_REQ *, EVP_PKEY *);
120 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *);
121 int X509_REQ_add_extensions(X509_REQ *, X509_EXTENSIONS *);
122 X509_EXTENSIONS *X509_REQ_get_extensions(X509_REQ *);
123 int X509_REQ_print_ex(BIO *, X509_REQ *, unsigned long, unsigned long);
124 
125 int X509V3_EXT_print(BIO *, X509_EXTENSION *, unsigned long, int);
126 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *);
127 
128 X509_REVOKED *X509_REVOKED_new(void);
129 void X509_REVOKED_free(X509_REVOKED *);
130 
131 int X509_REVOKED_set_serialNumber(X509_REVOKED *, ASN1_INTEGER *);
132 
133 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *, int, void *, int, unsigned long);
134 
135 X509_CRL *d2i_X509_CRL_bio(BIO *, X509_CRL **);
136 X509_CRL *X509_CRL_new(void);
137 void X509_CRL_free(X509_CRL *);
138 int X509_CRL_add0_revoked(X509_CRL *, X509_REVOKED *);
139 int i2d_X509_CRL_bio(BIO *, X509_CRL *);
140 int X509_CRL_print(BIO *, X509_CRL *);
141 int X509_CRL_set_issuer_name(X509_CRL *, X509_NAME *);
142 int X509_CRL_sign(X509_CRL *, EVP_PKEY *, const EVP_MD *);
143 
144 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *, EVP_PKEY *);
145 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *, EVP_PKEY *, const EVP_MD *);
146 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *);
147 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *);
148 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *, EVP_PKEY *);
149 NETSCAPE_SPKI *NETSCAPE_SPKI_new(void);
150 void NETSCAPE_SPKI_free(NETSCAPE_SPKI *);
151 
152 /*  ASN1 serialization */
153 int i2d_X509_bio(BIO *, X509 *);
154 X509 *d2i_X509_bio(BIO *, X509 **);
155 
156 int i2d_X509_REQ_bio(BIO *, X509_REQ *);
157 X509_REQ *d2i_X509_REQ_bio(BIO *, X509_REQ **);
158 
159 int i2d_PrivateKey_bio(BIO *, EVP_PKEY *);
160 EVP_PKEY *d2i_PrivateKey_bio(BIO *, EVP_PKEY **);
161 
162 ASN1_INTEGER *X509_get_serialNumber(X509 *);
163 int X509_set_serialNumber(X509 *, ASN1_INTEGER *);
164 
165 /*  X509_STORE */
166 X509_STORE *X509_STORE_new(void);
167 void X509_STORE_free(X509_STORE *);
168 int X509_STORE_add_cert(X509_STORE *, X509 *);
169 int X509_verify_cert(X509_STORE_CTX *);
170 """
171 
172 MACROS = """
173 long X509_get_version(X509 *);
174 
175 ASN1_TIME *X509_get_notBefore(X509 *);
176 ASN1_TIME *X509_get_notAfter(X509 *);
177 
178 long X509_REQ_get_version(X509_REQ *);
179 X509_NAME *X509_REQ_get_subject_name(X509_REQ *);
180 
181 Cryptography_STACK_OF_X509 *sk_X509_new_null(void);
182 void sk_X509_free(Cryptography_STACK_OF_X509 *);
183 int sk_X509_num(Cryptography_STACK_OF_X509 *);
184 int sk_X509_push(Cryptography_STACK_OF_X509 *, X509 *);
185 X509 *sk_X509_value(Cryptography_STACK_OF_X509 *, int);
186 
187 X509_EXTENSIONS *sk_X509_EXTENSION_new_null(void);
188 int sk_X509_EXTENSION_num(X509_EXTENSIONS *);
189 X509_EXTENSION *sk_X509_EXTENSION_value(X509_EXTENSIONS *, int);
190 int sk_X509_EXTENSION_push(X509_EXTENSIONS *, X509_EXTENSION *);
191 X509_EXTENSION *sk_X509_EXTENSION_delete(X509_EXTENSIONS *, int);
192 void sk_X509_EXTENSION_free(X509_EXTENSIONS *);
193 
194 int sk_X509_REVOKED_num(Cryptography_STACK_OF_X509_REVOKED *);
195 X509_REVOKED *sk_X509_REVOKED_value(Cryptography_STACK_OF_X509_REVOKED *, int);
196 
197 /* These aren't macros these arguments are all const X on openssl > 1.0.x */
198 int X509_CRL_set_lastUpdate(X509_CRL *, ASN1_TIME *);
199 int X509_CRL_set_nextUpdate(X509_CRL *, ASN1_TIME *);
200 """
201 
202 CUSTOMIZATIONS = """
203 """
204 
205 CONDITIONAL_NAMES = {}
206
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/cryptography/hazmat/bindings/openssl/x509.py b/cryptography/hazmat/bindings/openssl/x509.py
--- a/cryptography/hazmat/bindings/openssl/x509.py
+++ b/cryptography/hazmat/bindings/openssl/x509.py
@@ -167,6 +167,8 @@
 void X509_STORE_free(X509_STORE *);
 int X509_STORE_add_cert(X509_STORE *, X509 *);
 int X509_verify_cert(X509_STORE_CTX *);
+
+const char *X509_verify_cert_error_string(long);
 """
 
 MACROS = """

{"golden_diff": "diff --git a/cryptography/hazmat/bindings/openssl/x509.py b/cryptography/hazmat/bindings/openssl/x509.py\n--- a/cryptography/hazmat/bindings/openssl/x509.py\n+++ b/cryptography/hazmat/bindings/openssl/x509.py\n@@ -167,6 +167,8 @@\n void X509_STORE_free(X509_STORE *);\n int X509_STORE_add_cert(X509_STORE *, X509 *);\n int X509_verify_cert(X509_STORE_CTX *);\n+\n+const char *X509_verify_cert_error_string(long);\n \"\"\"\n \n MACROS = \"\"\"\n", "issue": "Bind X509_verify_cert_error_string\npyOpenSSL 0.14 needs this.  https://github.com/pyca/pyopenssl/issues/30\n\n", "before_files": [{"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n# implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nINCLUDES = \"\"\"\n#include <openssl/ssl.h>\n\n/*\n * This is part of a work-around for the difficulty cffi has in dealing with\n * `STACK_OF(foo)` as the name of a type.  We invent a new, simpler name that\n * will be an alias for this type and use the alias throughout.  This works\n * together with another opaque typedef for the same name in the TYPES section.\n * Note that the result is an opaque type.\n */\ntypedef STACK_OF(X509) Cryptography_STACK_OF_X509;\ntypedef STACK_OF(X509_REVOKED) Cryptography_STACK_OF_X509_REVOKED;\n\"\"\"\n\nTYPES = \"\"\"\ntypedef ... Cryptography_STACK_OF_X509;\ntypedef ... Cryptography_STACK_OF_X509_REVOKED;\n\ntypedef struct {\n    ASN1_OBJECT *algorithm;\n    ...;\n} X509_ALGOR;\n\ntypedef struct {\n    X509_ALGOR *signature;\n    ...;\n} X509_CINF;\n\ntypedef struct {\n    ASN1_OBJECT *object;\n    ASN1_BOOLEAN critical;\n    ASN1_OCTET_STRING *value;\n} X509_EXTENSION;\n\ntypedef ... X509_EXTENSIONS;\n\ntypedef ... X509_REQ;\n\ntypedef struct {\n    ASN1_INTEGER *serialNumber;\n    ASN1_TIME *revocationDate;\n    X509_EXTENSIONS *extensions;\n    int sequence;\n    ...;\n} X509_REVOKED;\n\ntypedef struct {\n    Cryptography_STACK_OF_X509_REVOKED *revoked;\n    ...;\n} X509_CRL_INFO;\n\ntypedef struct {\n    X509_CRL_INFO *crl;\n    ...;\n} X509_CRL;\n\ntypedef struct {\n    X509_CINF *cert_info;\n    ...;\n} X509;\n\ntypedef ... X509_STORE;\ntypedef ... NETSCAPE_SPKI;\n\"\"\"\n\nFUNCTIONS = \"\"\"\nX509 *X509_new(void);\nvoid X509_free(X509 *);\nX509 *X509_dup(X509 *);\n\nint X509_print_ex(BIO *, X509 *, unsigned long, unsigned long);\n\nint X509_set_version(X509 *, long);\n\nEVP_PKEY *X509_get_pubkey(X509 *);\nint X509_set_pubkey(X509 *, EVP_PKEY *);\n\nunsigned char *X509_alias_get0(X509 *, int *);\nint X509_sign(X509 *, EVP_PKEY *, const EVP_MD *);\n\nint X509_digest(const X509 *, const EVP_MD *, unsigned char *, unsigned int *);\n\nASN1_TIME *X509_gmtime_adj(ASN1_TIME *, long);\n\nunsigned long X509_subject_name_hash(X509 *);\n\nX509_NAME *X509_get_subject_name(X509 *);\nint X509_set_subject_name(X509 *, X509_NAME *);\n\nX509_NAME *X509_get_issuer_name(X509 *);\nint X509_set_issuer_name(X509 *, X509_NAME *);\n\nint X509_get_ext_count(X509 *);\nint X509_add_ext(X509 *, X509_EXTENSION *, int);\nX509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *);\nX509_EXTENSION *X509_get_ext(X509 *, int);\nint X509_EXTENSION_get_critical(X509_EXTENSION *);\nASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *);\nvoid X509_EXTENSION_free(X509_EXTENSION *);\n\nint X509_REQ_set_version(X509_REQ *, long);\nX509_REQ *X509_REQ_new(void);\nvoid X509_REQ_free(X509_REQ *);\nint X509_REQ_set_pubkey(X509_REQ *, EVP_PKEY *);\nint X509_REQ_sign(X509_REQ *, EVP_PKEY *, const EVP_MD *);\nint X509_REQ_verify(X509_REQ *, EVP_PKEY *);\nEVP_PKEY *X509_REQ_get_pubkey(X509_REQ *);\nint X509_REQ_add_extensions(X509_REQ *, X509_EXTENSIONS *);\nX509_EXTENSIONS *X509_REQ_get_extensions(X509_REQ *);\nint X509_REQ_print_ex(BIO *, X509_REQ *, unsigned long, unsigned long);\n\nint X509V3_EXT_print(BIO *, X509_EXTENSION *, unsigned long, int);\nASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *);\n\nX509_REVOKED *X509_REVOKED_new(void);\nvoid X509_REVOKED_free(X509_REVOKED *);\n\nint X509_REVOKED_set_serialNumber(X509_REVOKED *, ASN1_INTEGER *);\n\nint X509_REVOKED_add1_ext_i2d(X509_REVOKED *, int, void *, int, unsigned long);\n\nX509_CRL *d2i_X509_CRL_bio(BIO *, X509_CRL **);\nX509_CRL *X509_CRL_new(void);\nvoid X509_CRL_free(X509_CRL *);\nint X509_CRL_add0_revoked(X509_CRL *, X509_REVOKED *);\nint i2d_X509_CRL_bio(BIO *, X509_CRL *);\nint X509_CRL_print(BIO *, X509_CRL *);\nint X509_CRL_set_issuer_name(X509_CRL *, X509_NAME *);\nint X509_CRL_sign(X509_CRL *, EVP_PKEY *, const EVP_MD *);\n\nint NETSCAPE_SPKI_verify(NETSCAPE_SPKI *, EVP_PKEY *);\nint NETSCAPE_SPKI_sign(NETSCAPE_SPKI *, EVP_PKEY *, const EVP_MD *);\nchar *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *);\nEVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *);\nint NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *, EVP_PKEY *);\nNETSCAPE_SPKI *NETSCAPE_SPKI_new(void);\nvoid NETSCAPE_SPKI_free(NETSCAPE_SPKI *);\n\n/*  ASN1 serialization */\nint i2d_X509_bio(BIO *, X509 *);\nX509 *d2i_X509_bio(BIO *, X509 **);\n\nint i2d_X509_REQ_bio(BIO *, X509_REQ *);\nX509_REQ *d2i_X509_REQ_bio(BIO *, X509_REQ **);\n\nint i2d_PrivateKey_bio(BIO *, EVP_PKEY *);\nEVP_PKEY *d2i_PrivateKey_bio(BIO *, EVP_PKEY **);\n\nASN1_INTEGER *X509_get_serialNumber(X509 *);\nint X509_set_serialNumber(X509 *, ASN1_INTEGER *);\n\n/*  X509_STORE */\nX509_STORE *X509_STORE_new(void);\nvoid X509_STORE_free(X509_STORE *);\nint X509_STORE_add_cert(X509_STORE *, X509 *);\nint X509_verify_cert(X509_STORE_CTX *);\n\"\"\"\n\nMACROS = \"\"\"\nlong X509_get_version(X509 *);\n\nASN1_TIME *X509_get_notBefore(X509 *);\nASN1_TIME *X509_get_notAfter(X509 *);\n\nlong X509_REQ_get_version(X509_REQ *);\nX509_NAME *X509_REQ_get_subject_name(X509_REQ *);\n\nCryptography_STACK_OF_X509 *sk_X509_new_null(void);\nvoid sk_X509_free(Cryptography_STACK_OF_X509 *);\nint sk_X509_num(Cryptography_STACK_OF_X509 *);\nint sk_X509_push(Cryptography_STACK_OF_X509 *, X509 *);\nX509 *sk_X509_value(Cryptography_STACK_OF_X509 *, int);\n\nX509_EXTENSIONS *sk_X509_EXTENSION_new_null(void);\nint sk_X509_EXTENSION_num(X509_EXTENSIONS *);\nX509_EXTENSION *sk_X509_EXTENSION_value(X509_EXTENSIONS *, int);\nint sk_X509_EXTENSION_push(X509_EXTENSIONS *, X509_EXTENSION *);\nX509_EXTENSION *sk_X509_EXTENSION_delete(X509_EXTENSIONS *, int);\nvoid sk_X509_EXTENSION_free(X509_EXTENSIONS *);\n\nint sk_X509_REVOKED_num(Cryptography_STACK_OF_X509_REVOKED *);\nX509_REVOKED *sk_X509_REVOKED_value(Cryptography_STACK_OF_X509_REVOKED *, int);\n\n/* These aren't macros these arguments are all const X on openssl > 1.0.x */\nint X509_CRL_set_lastUpdate(X509_CRL *, ASN1_TIME *);\nint X509_CRL_set_nextUpdate(X509_CRL *, ASN1_TIME *);\n\"\"\"\n\nCUSTOMIZATIONS = \"\"\"\n\"\"\"\n\nCONDITIONAL_NAMES = {}\n", "path": "cryptography/hazmat/bindings/openssl/x509.py"}], "after_files": [{"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n# implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nINCLUDES = \"\"\"\n#include <openssl/ssl.h>\n\n/*\n * This is part of a work-around for the difficulty cffi has in dealing with\n * `STACK_OF(foo)` as the name of a type.  We invent a new, simpler name that\n * will be an alias for this type and use the alias throughout.  This works\n * together with another opaque typedef for the same name in the TYPES section.\n * Note that the result is an opaque type.\n */\ntypedef STACK_OF(X509) Cryptography_STACK_OF_X509;\ntypedef STACK_OF(X509_REVOKED) Cryptography_STACK_OF_X509_REVOKED;\n\"\"\"\n\nTYPES = \"\"\"\ntypedef ... Cryptography_STACK_OF_X509;\ntypedef ... Cryptography_STACK_OF_X509_REVOKED;\n\ntypedef struct {\n    ASN1_OBJECT *algorithm;\n    ...;\n} X509_ALGOR;\n\ntypedef struct {\n    X509_ALGOR *signature;\n    ...;\n} X509_CINF;\n\ntypedef struct {\n    ASN1_OBJECT *object;\n    ASN1_BOOLEAN critical;\n    ASN1_OCTET_STRING *value;\n} X509_EXTENSION;\n\ntypedef ... X509_EXTENSIONS;\n\ntypedef ... X509_REQ;\n\ntypedef struct {\n    ASN1_INTEGER *serialNumber;\n    ASN1_TIME *revocationDate;\n    X509_EXTENSIONS *extensions;\n    int sequence;\n    ...;\n} X509_REVOKED;\n\ntypedef struct {\n    Cryptography_STACK_OF_X509_REVOKED *revoked;\n    ...;\n} X509_CRL_INFO;\n\ntypedef struct {\n    X509_CRL_INFO *crl;\n    ...;\n} X509_CRL;\n\ntypedef struct {\n    X509_CINF *cert_info;\n    ...;\n} X509;\n\ntypedef ... X509_STORE;\ntypedef ... NETSCAPE_SPKI;\n\"\"\"\n\nFUNCTIONS = \"\"\"\nX509 *X509_new(void);\nvoid X509_free(X509 *);\nX509 *X509_dup(X509 *);\n\nint X509_print_ex(BIO *, X509 *, unsigned long, unsigned long);\n\nint X509_set_version(X509 *, long);\n\nEVP_PKEY *X509_get_pubkey(X509 *);\nint X509_set_pubkey(X509 *, EVP_PKEY *);\n\nunsigned char *X509_alias_get0(X509 *, int *);\nint X509_sign(X509 *, EVP_PKEY *, const EVP_MD *);\n\nint X509_digest(const X509 *, const EVP_MD *, unsigned char *, unsigned int *);\n\nASN1_TIME *X509_gmtime_adj(ASN1_TIME *, long);\n\nunsigned long X509_subject_name_hash(X509 *);\n\nX509_NAME *X509_get_subject_name(X509 *);\nint X509_set_subject_name(X509 *, X509_NAME *);\n\nX509_NAME *X509_get_issuer_name(X509 *);\nint X509_set_issuer_name(X509 *, X509_NAME *);\n\nint X509_get_ext_count(X509 *);\nint X509_add_ext(X509 *, X509_EXTENSION *, int);\nX509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *);\nX509_EXTENSION *X509_get_ext(X509 *, int);\nint X509_EXTENSION_get_critical(X509_EXTENSION *);\nASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *);\nvoid X509_EXTENSION_free(X509_EXTENSION *);\n\nint X509_REQ_set_version(X509_REQ *, long);\nX509_REQ *X509_REQ_new(void);\nvoid X509_REQ_free(X509_REQ *);\nint X509_REQ_set_pubkey(X509_REQ *, EVP_PKEY *);\nint X509_REQ_sign(X509_REQ *, EVP_PKEY *, const EVP_MD *);\nint X509_REQ_verify(X509_REQ *, EVP_PKEY *);\nEVP_PKEY *X509_REQ_get_pubkey(X509_REQ *);\nint X509_REQ_add_extensions(X509_REQ *, X509_EXTENSIONS *);\nX509_EXTENSIONS *X509_REQ_get_extensions(X509_REQ *);\nint X509_REQ_print_ex(BIO *, X509_REQ *, unsigned long, unsigned long);\n\nint X509V3_EXT_print(BIO *, X509_EXTENSION *, unsigned long, int);\nASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *);\n\nX509_REVOKED *X509_REVOKED_new(void);\nvoid X509_REVOKED_free(X509_REVOKED *);\n\nint X509_REVOKED_set_serialNumber(X509_REVOKED *, ASN1_INTEGER *);\n\nint X509_REVOKED_add1_ext_i2d(X509_REVOKED *, int, void *, int, unsigned long);\n\nX509_CRL *d2i_X509_CRL_bio(BIO *, X509_CRL **);\nX509_CRL *X509_CRL_new(void);\nvoid X509_CRL_free(X509_CRL *);\nint X509_CRL_add0_revoked(X509_CRL *, X509_REVOKED *);\nint i2d_X509_CRL_bio(BIO *, X509_CRL *);\nint X509_CRL_print(BIO *, X509_CRL *);\nint X509_CRL_set_issuer_name(X509_CRL *, X509_NAME *);\nint X509_CRL_sign(X509_CRL *, EVP_PKEY *, const EVP_MD *);\n\nint NETSCAPE_SPKI_verify(NETSCAPE_SPKI *, EVP_PKEY *);\nint NETSCAPE_SPKI_sign(NETSCAPE_SPKI *, EVP_PKEY *, const EVP_MD *);\nchar *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *);\nEVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *);\nint NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *, EVP_PKEY *);\nNETSCAPE_SPKI *NETSCAPE_SPKI_new(void);\nvoid NETSCAPE_SPKI_free(NETSCAPE_SPKI *);\n\n/*  ASN1 serialization */\nint i2d_X509_bio(BIO *, X509 *);\nX509 *d2i_X509_bio(BIO *, X509 **);\n\nint i2d_X509_REQ_bio(BIO *, X509_REQ *);\nX509_REQ *d2i_X509_REQ_bio(BIO *, X509_REQ **);\n\nint i2d_PrivateKey_bio(BIO *, EVP_PKEY *);\nEVP_PKEY *d2i_PrivateKey_bio(BIO *, EVP_PKEY **);\n\nASN1_INTEGER *X509_get_serialNumber(X509 *);\nint X509_set_serialNumber(X509 *, ASN1_INTEGER *);\n\n/*  X509_STORE */\nX509_STORE *X509_STORE_new(void);\nvoid X509_STORE_free(X509_STORE *);\nint X509_STORE_add_cert(X509_STORE *, X509 *);\nint X509_verify_cert(X509_STORE_CTX *);\n\nconst char *X509_verify_cert_error_string(long);\n\"\"\"\n\nMACROS = \"\"\"\nlong X509_get_version(X509 *);\n\nASN1_TIME *X509_get_notBefore(X509 *);\nASN1_TIME *X509_get_notAfter(X509 *);\n\nlong X509_REQ_get_version(X509_REQ *);\nX509_NAME *X509_REQ_get_subject_name(X509_REQ *);\n\nCryptography_STACK_OF_X509 *sk_X509_new_null(void);\nvoid sk_X509_free(Cryptography_STACK_OF_X509 *);\nint sk_X509_num(Cryptography_STACK_OF_X509 *);\nint sk_X509_push(Cryptography_STACK_OF_X509 *, X509 *);\nX509 *sk_X509_value(Cryptography_STACK_OF_X509 *, int);\n\nX509_EXTENSIONS *sk_X509_EXTENSION_new_null(void);\nint sk_X509_EXTENSION_num(X509_EXTENSIONS *);\nX509_EXTENSION *sk_X509_EXTENSION_value(X509_EXTENSIONS *, int);\nint sk_X509_EXTENSION_push(X509_EXTENSIONS *, X509_EXTENSION *);\nX509_EXTENSION *sk_X509_EXTENSION_delete(X509_EXTENSIONS *, int);\nvoid sk_X509_EXTENSION_free(X509_EXTENSIONS *);\n\nint sk_X509_REVOKED_num(Cryptography_STACK_OF_X509_REVOKED *);\nX509_REVOKED *sk_X509_REVOKED_value(Cryptography_STACK_OF_X509_REVOKED *, int);\n\n/* These aren't macros these arguments are all const X on openssl > 1.0.x */\nint X509_CRL_set_lastUpdate(X509_CRL *, ASN1_TIME *);\nint X509_CRL_set_nextUpdate(X509_CRL *, ASN1_TIME *);\n\"\"\"\n\nCUSTOMIZATIONS = \"\"\"\n\"\"\"\n\nCONDITIONAL_NAMES = {}\n", "path": "cryptography/hazmat/bindings/openssl/x509.py"}]}