1 module bindbc.gnutls.x509;
2 
3 import bindbc.gnutls.config;
4 import bindbc.gnutls.gnutls;
5 
6 import core.stdc.config;
7 import core.sys.posix.sys.select;
8 
9 enum GNUTLS_OID_X520_COUNTRY_NAME = "2.5.4.6";
10 enum GNUTLS_OID_X520_ORGANIZATION_NAME = "2.5.4.10";
11 enum GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME = "2.5.4.11";
12 enum GNUTLS_OID_X520_COMMON_NAME = "2.5.4.3";
13 enum GNUTLS_OID_X520_LOCALITY_NAME = "2.5.4.7";
14 enum GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME = "2.5.4.8";
15 
16 enum GNUTLS_OID_X520_INITIALS = "2.5.4.43";
17 enum GNUTLS_OID_X520_GENERATION_QUALIFIER = "2.5.4.44";
18 enum GNUTLS_OID_X520_SURNAME = "2.5.4.4";
19 enum GNUTLS_OID_X520_GIVEN_NAME = "2.5.4.42";
20 enum GNUTLS_OID_X520_TITLE = "2.5.4.12";
21 enum GNUTLS_OID_X520_DN_QUALIFIER = "2.5.4.46";
22 enum GNUTLS_OID_X520_PSEUDONYM = "2.5.4.65";
23 enum GNUTLS_OID_X520_POSTALCODE = "2.5.4.17";
24 enum GNUTLS_OID_X520_NAME = "2.5.4.41";
25 
26 enum GNUTLS_OID_LDAP_DC = "0.9.2342.19200300.100.1.25";
27 enum GNUTLS_OID_LDAP_UID = "0.9.2342.19200300.100.1.1";
28 
29 enum GNUTLS_OID_PKCS9_EMAIL = "1.2.840.113549.1.9.1";
30 
31 enum GNUTLS_OID_PKIX_DATE_OF_BIRTH = "1.3.6.1.5.5.7.9.1";
32 enum GNUTLS_OID_PKIX_PLACE_OF_BIRTH = "1.3.6.1.5.5.7.9.2";
33 enum GNUTLS_OID_PKIX_GENDER = "1.3.6.1.5.5.7.9.3";
34 enum GNUTLS_OID_PKIX_COUNTRY_OF_CITIZENSHIP = "1.3.6.1.5.5.7.9.4";
35 enum GNUTLS_OID_PKIX_COUNTRY_OF_RESIDENCE = "1.3.6.1.5.5.7.9.5";
36 
37 enum GNUTLS_KP_TLS_WWW_SERVER = "1.3.6.1.5.5.7.3.1";
38 enum GNUTLS_KP_TLS_WWW_CLIENT = "1.3.6.1.5.5.7.3.2";
39 enum GNUTLS_KP_CODE_SIGNING = "1.3.6.1.5.5.7.3.3";
40 enum GNUTLS_KP_MS_SMART_CARD_LOGON = "1.3.6.1.4.1.311.20.2.2";
41 enum GNUTLS_KP_EMAIL_PROTECTION = "1.3.6.1.5.5.7.3.4";
42 enum GNUTLS_KP_TIME_STAMPING = "1.3.6.1.5.5.7.3.8";
43 enum GNUTLS_KP_OCSP_SIGNING = "1.3.6.1.5.5.7.3.9";
44 enum GNUTLS_KP_IPSEC_IKE = "1.3.6.1.5.5.7.3.17";
45 enum GNUTLS_KP_ANY = "2.5.29.37.0";
46 
47 enum GNUTLS_KP_FLAG_DISALLOW_ANY = 1;
48 
49 enum GNUTLS_OID_AIA = "1.3.6.1.5.5.7.1.1";
50 enum GNUTLS_OID_AD_OCSP = "1.3.6.1.5.5.7.48.1";
51 enum GNUTLS_OID_AD_CAISSUERS = "1.3.6.1.5.5.7.48.2";
52 
53 enum GNUTLS_FSAN_SET = 0;
54 enum GNUTLS_FSAN_APPEND = 1;
55 enum GNUTLS_FSAN_ENCODE_OCTET_STRING = 1 << 1;
56 enum GNUTLS_FSAN_ENCODE_UTF8_STRING = 1 << 2;
57 
58 enum GNUTLS_X509EXT_OID_SUBJECT_KEY_ID = "2.5.29.14";
59 enum GNUTLS_X509EXT_OID_KEY_USAGE = "2.5.29.15";
60 enum GNUTLS_X509EXT_OID_PRIVATE_KEY_USAGE_PERIOD = "2.5.29.16";
61 enum GNUTLS_X509EXT_OID_SAN = "2.5.29.17";
62 enum GNUTLS_X509EXT_OID_IAN = "2.5.29.18";
63 enum GNUTLS_X509EXT_OID_BASIC_CONSTRAINTS = "2.5.29.19";
64 enum GNUTLS_X509EXT_OID_NAME_CONSTRAINTS = "2.5.29.30";
65 enum GNUTLS_X509EXT_OID_CRL_DIST_POINTS = "2.5.29.31";
66 enum GNUTLS_X509EXT_OID_CRT_POLICY = "2.5.29.32";
67 enum GNUTLS_X509EXT_OID_AUTHORITY_KEY_ID = "2.5.29.35";
68 enum GNUTLS_X509EXT_OID_EXTENDED_KEY_USAGE = "2.5.29.37";
69 enum GNUTLS_X509EXT_OID_INHIBIT_ANYPOLICY = "2.5.29.52";
70 enum GNUTLS_X509EXT_OID_AUTHORITY_INFO_ACCESS = "1.3.6.1.5.5.7.1.1";
71 enum GNUTLS_X509EXT_OID_PROXY_CRT_INFO = "1.3.6.1.5.5.7.1.14";
72 enum GNUTLS_X509EXT_OID_TLSFEATURES = "1.3.6.1.5.5.7.1.24";
73 
74 enum GNUTLS_X509_OID_POLICY_ANY = "2.5.29.54";
75 
76 enum gnutls_certificate_import_flags
77 {
78     GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED = 1,
79     GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED = 1 << 1,
80     GNUTLS_X509_CRT_LIST_SORT = 1 << 2
81 }
82 
83 static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
84 {
85     enum gnutls_x509_crt_flags
86     {
87         GNUTLS_X509_CRT_FLAG_IGNORE_SANITY = 1
88     }
89 }
90 
91 enum gnutls_keyid_flags_t
92 {
93     GNUTLS_KEYID_USE_SHA1 = 0,
94     GNUTLS_KEYID_USE_SHA256 = 1 << 0,
95     GNUTLS_KEYID_USE_SHA512 = 1 << 1,
96     GNUTLS_KEYID_USE_BEST_KNOWN = 1 << 30
97 }
98 
99 enum gnutls_info_access_what_t
100 {
101     GNUTLS_IA_ACCESSMETHOD_OID = 1,
102     GNUTLS_IA_ACCESSLOCATION_GENERALNAME_TYPE = 2,
103 
104     GNUTLS_IA_URI = 106,
105 
106     GNUTLS_IA_UNKNOWN = 10000,
107     GNUTLS_IA_OCSP_URI = 10006,
108     GNUTLS_IA_CAISSUERS_URI = 10106
109 }
110 
111 struct gnutls_name_constraints_st;
112 alias gnutls_x509_name_constraints_t = gnutls_name_constraints_st*;
113 
114 enum GNUTLS_EXT_FLAG_APPEND = 1;
115 
116 enum GNUTLS_NAME_CONSTRAINTS_FLAG_APPEND = GNUTLS_EXT_FLAG_APPEND;
117 
118 enum gnutls_x509_crl_reason_flags_t
119 {
120     GNUTLS_CRL_REASON_UNSPECIFIED = 0,
121     GNUTLS_CRL_REASON_PRIVILEGE_WITHDRAWN = 1,
122     GNUTLS_CRL_REASON_CERTIFICATE_HOLD = 2,
123     GNUTLS_CRL_REASON_CESSATION_OF_OPERATION = 4,
124     GNUTLS_CRL_REASON_SUPERSEDED = 8,
125     GNUTLS_CRL_REASON_AFFILIATION_CHANGED = 16,
126     GNUTLS_CRL_REASON_CA_COMPROMISE = 32,
127     GNUTLS_CRL_REASON_KEY_COMPROMISE = 64,
128     GNUTLS_CRL_REASON_UNUSED = 128,
129     GNUTLS_CRL_REASON_AA_COMPROMISE = 32768
130 }
131 
132 static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_6)
133 {
134     deprecated("This macro is deprecated and defunc from GnuTLS 3.6.6; do not use")
135     enum GNUTLS_X509_NO_WELL_DEFINED_EXPIRATION = cast(time_t)4294197631;
136 }
137 else enum GNUTLS_X509_NO_WELL_DEFINED_EXPIRATION = cast(time_t)4294197631;
138 
139 struct gnutls_x509_spki_st;
140 alias gnutls_x509_spki_t = gnutls_x509_spki_st*;
141 
142 struct gnutls_x509_tlsfeatures_st;
143 alias gnutls_x509_tlsfeatures_t = gnutls_x509_tlsfeatures_st*;
144 
145 enum GNUTLS_MAX_QUALIFIERS = 8;
146 
147 enum gnutls_x509_qualifier_t
148 {
149     GNUTLS_X509_QUALIFIER_UNKNOWN = 0,
150     GNUTLS_X509_QUALIFIER_URI = 1,
151     GNUTLS_X509_QUALIFIER_NOTICE = 2
152 }
153 
154 struct gnutls_x509_policy_st
155 {
156     char* oid;
157     uint qualifiers;
158 
159     struct _Anonymous_0
160     {
161         gnutls_x509_qualifier_t type;
162         char* data;
163         uint size;
164     }
165 
166     _Anonymous_0[GNUTLS_MAX_QUALIFIERS] qualifier;
167 }
168 
169 enum GNUTLS_X509_DN_OID_RETURN_OID = 1;
170 
171 struct gnutls_x509_dn_st;
172 alias gnutls_x509_dn_t = gnutls_x509_dn_st*;
173 
174 struct gnutls_x509_ava_st
175 {
176     gnutls_datum_t oid;
177     gnutls_datum_t value;
178     c_ulong value_tag;
179 }
180 
181 enum GNUTLS_X509_DN_FLAG_COMPAT = 1;
182 
183 struct gnutls_x509_crl_iter;
184 alias gnutls_x509_crl_iter_t = gnutls_x509_crl_iter*;
185 
186 enum gnutls_certificate_verify_flags
187 {
188     GNUTLS_VERIFY_DISABLE_CA_SIGN = 1 << 0,
189     GNUTLS_VERIFY_DO_NOT_ALLOW_IP_MATCHES = 1 << 1, /// Available from GnuTLS 3.6.0
190     GNUTLS_VERIFY_DO_NOT_ALLOW_SAME = 1 << 2,
191     GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT = 1 << 3,
192     GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD2 = 1 << 4,
193     GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5 = 1 << 5,
194     GNUTLS_VERIFY_DISABLE_TIME_CHECKS = 1 << 6,
195     GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS = 1 << 7,
196     GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT = 1 << 8,
197     GNUTLS_VERIFY_DISABLE_CRL_CHECKS = 1 << 9,
198     GNUTLS_VERIFY_ALLOW_UNSORTED_CHAIN = 1 << 10,
199     GNUTLS_VERIFY_DO_NOT_ALLOW_UNSORTED_CHAIN = 1 << 11,
200     GNUTLS_VERIFY_DO_NOT_ALLOW_WILDCARDS = 1 << 12,
201     GNUTLS_VERIFY_USE_TLS1_RSA = 1 << 13,
202     GNUTLS_VERIFY_IGNORE_UNKNOWN_CRIT_EXTENSIONS = 1 << 14, /// Available from GnuTLS 3.6.0
203     GNUTLS_VERIFY_ALLOW_SIGN_WITH_SHA1 = 1 << 15 /// Available from GnuTLS 3.6.0
204 }
205 
206 enum GNUTLS_VERIFY_ALLOW_BROKEN = gnutls_certificate_verify_flags.GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD2 | gnutls_certificate_verify_flags.GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5;
207 
208 enum gnutls_certificate_verification_profiles_t
209 {
210     GNUTLS_PROFILE_UNKNOWN = 0,
211     GNUTLS_PROFILE_VERY_WEAK = 1,
212     GNUTLS_PROFILE_LOW = 2,
213     GNUTLS_PROFILE_LEGACY = 4,
214     GNUTLS_PROFILE_MEDIUM = 5,
215     GNUTLS_PROFILE_HIGH = 6,
216     GNUTLS_PROFILE_ULTRA = 7,
217     GNUTLS_PROFILE_FUTURE = 8,
218 
219     GNUTLS_PROFILE_SUITEB128 = 32,
220     GNUTLS_PROFILE_SUITEB192 = 33
221 }
222 
223 enum GNUTLS_VFLAGS_PROFILE_MASK = 0xff000000;
224 
225 enum GNUTLS_PKCS8_PLAIN = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PLAIN;
226 enum GNUTLS_PKCS8_USE_PKCS12_3DES = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PKCS12_3DES;
227 enum GNUTLS_PKCS8_USE_PKCS12_ARCFOUR = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PKCS12_ARCFOUR;
228 enum GNUTLS_PKCS8_USE_PKCS12_RC2_40 = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PKCS12_RC2_40;
229 
230 enum gnutls_pkcs_encrypt_flags_t
231 {
232     GNUTLS_PKCS_PLAIN = 1,
233     GNUTLS_PKCS_PKCS12_3DES = 1 << 1,
234     GNUTLS_PKCS_PKCS12_ARCFOUR = 1 << 2,
235     GNUTLS_PKCS_PKCS12_RC2_40 = 1 << 3,
236     GNUTLS_PKCS_PBES2_3DES = 1 << 4,
237     GNUTLS_PKCS_PBES2_AES_128 = 1 << 5,
238     GNUTLS_PKCS_PBES2_AES_192 = 1 << 6,
239     GNUTLS_PKCS_PBES2_AES_256 = 1 << 7,
240     GNUTLS_PKCS_NULL_PASSWORD = 1 << 8,
241     GNUTLS_PKCS_PBES2_DES = 1 << 9,
242     GNUTLS_PKCS_PBES1_DES_MD5 = 1 << 10,
243     GNUTLS_PKCS_PBES2_GOST_TC26Z = 1 << 11,
244     GNUTLS_PKCS_PBES2_GOST_CPA = 1 << 12,
245     GNUTLS_PKCS_PBES2_GOST_CPB = 1 << 13,
246     GNUTLS_PKCS_PBES2_GOST_CPC = 1 << 14,
247     GNUTLS_PKCS_PBES2_GOST_CPD = 1 << 15
248 }
249 
250 enum GNUTLS_PKCS_USE_PKCS12_3DES = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PKCS12_3DES;
251 enum GNUTLS_PKCS_USE_PKCS12_ARCFOUR = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PKCS12_ARCFOUR;
252 enum GNUTLS_PKCS_USE_PKCS12_RC2_40 = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PKCS12_RC2_40;
253 enum GNUTLS_PKCS_USE_PBES2_3DES = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PBES2_3DES;
254 enum GNUTLS_PKCS_USE_PBES2_AES_128 = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PBES2_AES_128;
255 enum GNUTLS_PKCS_USE_PBES2_AES_192 = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PBES2_AES_192;
256 enum GNUTLS_PKCS_USE_PBES2_AES_256 = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PBES2_AES_256;
257 enum GNUTLS_PKCS_USE_PBES2_GOST_TC26Z = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PBES2_GOST_TC26Z;
258 enum GNUTLS_PKCS_USE_PBES2_GOST_CPA = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PBES2_GOST_CPA;
259 enum GNUTLS_PKCS_USE_PBES2_GOST_CPB = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PBES2_GOST_CPB;
260 enum GNUTLS_PKCS_USE_PBES2_GOST_CPC = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PBES2_GOST_CPC;
261 enum GNUTLS_PKCS_USE_PBES2_GOST_CPD = gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_PBES2_GOST_CPD;
262 
263 enum gnutls_keygen_types_t
264 {
265     GNUTLS_KEYGEN_SEED = 1,
266     GNUTLS_KEYGEN_DIGEST = 2,
267     GNUTLS_KEYGEN_SPKI = 3
268 }
269 
270 struct gnutls_keygen_data_st
271 {
272     gnutls_keygen_types_t type;
273     ubyte* data;
274     uint size;
275 }
276 
277 struct gnutls_x509_trust_list_st;
278 alias gnutls_x509_trust_list_t = gnutls_x509_trust_list_st*;
279 struct gnutls_x509_trust_list_iter;
280 alias gnutls_x509_trust_list_iter_t = gnutls_x509_trust_list_iter*;
281 
282 enum gnutls_trust_list_flags_t
283 {
284     GNUTLS_TL_VERIFY_CRL = 1,
285     GNUTLS_TL_USE_IN_TLS = 1 << 1,
286     GNUTLS_TL_NO_DUPLICATES = 1 << 2,
287     GNUTLS_TL_NO_DUPLICATE_KEY = 1 << 3,
288     GNUTLS_TL_GET_COPY = 1 << 4,
289     GNUTLS_TL_FAIL_ON_INVALID_CRL = 1 << 5 /// Available from GnuTLS 3.6.4
290 }
291 
292 struct gnutls_x509_ext_st
293 {
294     char* oid;
295     uint critical;
296     gnutls_datum_t data;
297 }
298 
299 alias gnutls_x509_crl_get_certificate_count = gnutls_x509_crl_get_crt_count;
300 alias gnutls_x509_crl_get_certificate = gnutls_x509_crl_get_crt_serial;
301 
302 extern(C) nothrow @nogc
303 {
304     alias gnutls_verify_output_function = int function (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer, gnutls_x509_crl_t crl, uint verification_output);
305 }
306 
307 extern (D) nothrow @nogc @safe pure
308 {
309     uint GNUTLS_PROFILE_TO_VFLAGS(uint x)
310     {
311         return (cast(uint) x) << 24;
312     }
313 
314     uint GNUTLS_VFLAGS_TO_PROFILE(uint x)
315     {
316         return ((cast(uint) x) >> 24) & 0xff;
317     }
318 
319     uint GNUTLS_PKCS_CIPHER_MASK(uint x)
320     {
321         return x & (~gnutls_pkcs_encrypt_flags_t.GNUTLS_PKCS_NULL_PASSWORD);
322     }
323 }
324 
325 version (BindGnuTLS_Static)
326 {
327     extern (System) @nogc nothrow @system:
328 
329     int gnutls_x509_crt_init (gnutls_x509_crt_t* cert);
330     void gnutls_x509_crt_deinit (gnutls_x509_crt_t cert);
331 
332     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
333         void gnutls_x509_crt_set_flags (gnutls_x509_crt_t cert, uint flags);
334 
335     uint gnutls_x509_crt_equals (gnutls_x509_crt_t cert1, gnutls_x509_crt_t cert2);
336     uint gnutls_x509_crt_equals2 (gnutls_x509_crt_t cert1, const(gnutls_datum_t)* der);
337     int gnutls_x509_crt_import (gnutls_x509_crt_t cert, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format);
338     int gnutls_x509_crt_list_import2 (gnutls_x509_crt_t** certs, uint* size, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint flags);
339     int gnutls_x509_crt_list_import (gnutls_x509_crt_t* certs, uint* cert_max, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint flags);
340     int gnutls_x509_crt_import_url (gnutls_x509_crt_t crt, const(char)* url, uint flags);
341 
342     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
343         int gnutls_x509_crt_list_import_url (gnutls_x509_crt_t** certs, uint* size, const(char)* url, gnutls_pin_callback_t pin_fn, void* pin_fn_userdata, uint flags);
344 
345     int gnutls_x509_crt_export (gnutls_x509_crt_t cert, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
346     int gnutls_x509_crt_export2 (gnutls_x509_crt_t cert, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
347     int gnutls_x509_crt_get_private_key_usage_period (gnutls_x509_crt_t cert, time_t* activation, time_t* expiration, uint* critical);
348     int gnutls_x509_crt_get_issuer_dn (gnutls_x509_crt_t cert, char* buf, size_t* buf_size);
349     int gnutls_x509_crt_get_issuer_dn2 (gnutls_x509_crt_t cert, gnutls_datum_t* dn);
350 
351     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
352         int gnutls_x509_crt_get_issuer_dn3 (gnutls_x509_crt_t cert, gnutls_datum_t* dn, uint flags);
353 
354     int gnutls_x509_crt_get_issuer_dn_oid (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size);
355     int gnutls_x509_crt_get_issuer_dn_by_oid (gnutls_x509_crt_t cert, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* buf_size);
356     int gnutls_x509_crt_get_dn (gnutls_x509_crt_t cert, char* buf, size_t* buf_size);
357     int gnutls_x509_crt_get_dn2 (gnutls_x509_crt_t cert, gnutls_datum_t* dn);
358 
359     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
360         int gnutls_x509_crt_get_dn3 (gnutls_x509_crt_t cert, gnutls_datum_t* dn, uint flags);
361 
362     int gnutls_x509_crt_get_dn_oid (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size);
363     int gnutls_x509_crt_get_dn_by_oid (gnutls_x509_crt_t cert, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* buf_size);
364     uint gnutls_x509_crt_check_hostname (gnutls_x509_crt_t cert, const(char)* hostname);
365     uint gnutls_x509_crt_check_hostname2 (gnutls_x509_crt_t cert, const(char)* hostname, uint flags);
366     uint gnutls_x509_crt_check_email (gnutls_x509_crt_t cert, const(char)* email, uint flags);
367 
368     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
369         uint gnutls_x509_crt_check_ip (gnutls_x509_crt_t cert, const(ubyte)* ip, uint ip_size, uint flags);
370 
371     int gnutls_x509_crt_get_signature_algorithm (gnutls_x509_crt_t cert);
372     int gnutls_x509_crt_get_signature (gnutls_x509_crt_t cert, char* sig, size_t* sizeof_sig);
373     int gnutls_x509_crt_get_version (gnutls_x509_crt_t cert);
374     int gnutls_x509_crt_get_pk_oid (gnutls_x509_crt_t cert, char* oid, size_t* oid_size);
375     int gnutls_x509_crt_get_signature_oid (gnutls_x509_crt_t cert, char* oid, size_t* oid_size);
376     int gnutls_x509_crt_get_key_id (gnutls_x509_crt_t crt, uint flags, ubyte* output_data, size_t* output_data_size);
377     int gnutls_x509_crt_set_private_key_usage_period (gnutls_x509_crt_t crt, time_t activation, time_t expiration);
378     int gnutls_x509_crt_set_authority_key_id (gnutls_x509_crt_t cert, const(void)* id, size_t id_size);
379     int gnutls_x509_crt_get_authority_key_id (gnutls_x509_crt_t cert, void* id, size_t* id_size, uint* critical);
380     int gnutls_x509_crt_get_authority_key_gn_serial (gnutls_x509_crt_t cert, uint seq, void* alt, size_t* alt_size, uint* alt_type, void* serial, size_t* serial_size, uint* critical);
381     int gnutls_x509_crt_get_subject_key_id (gnutls_x509_crt_t cert, void* ret, size_t* ret_size, uint* critical);
382     int gnutls_x509_crt_get_subject_unique_id (gnutls_x509_crt_t crt, char* buf, size_t* buf_size);
383     int gnutls_x509_crt_get_issuer_unique_id (gnutls_x509_crt_t crt, char* buf, size_t* buf_size);
384     void gnutls_x509_crt_set_pin_function (gnutls_x509_crt_t crt, gnutls_pin_callback_t fn, void* userdata);
385     int gnutls_x509_crt_get_authority_info_access (gnutls_x509_crt_t crt, uint seq, int what, gnutls_datum_t* data, uint* critical);
386     uint gnutls_x509_name_constraints_check (gnutls_x509_name_constraints_t nc, gnutls_x509_subject_alt_name_t type, const(gnutls_datum_t)* name);
387     uint gnutls_x509_name_constraints_check_crt (gnutls_x509_name_constraints_t nc, gnutls_x509_subject_alt_name_t type, gnutls_x509_crt_t crt);
388     int gnutls_x509_name_constraints_init (gnutls_x509_name_constraints_t* nc);
389     void gnutls_x509_name_constraints_deinit (gnutls_x509_name_constraints_t nc);
390     int gnutls_x509_crt_get_name_constraints (gnutls_x509_crt_t crt, gnutls_x509_name_constraints_t nc, uint flags, uint* critical);
391     int gnutls_x509_name_constraints_add_permitted (gnutls_x509_name_constraints_t nc, gnutls_x509_subject_alt_name_t type, const(gnutls_datum_t)* name);
392     int gnutls_x509_name_constraints_add_excluded (gnutls_x509_name_constraints_t nc, gnutls_x509_subject_alt_name_t type, const(gnutls_datum_t)* name);
393     int gnutls_x509_crt_set_name_constraints (gnutls_x509_crt_t crt, gnutls_x509_name_constraints_t nc, uint critical);
394     int gnutls_x509_name_constraints_get_permitted (gnutls_x509_name_constraints_t nc, uint idx, uint* type, gnutls_datum_t* name);
395     int gnutls_x509_name_constraints_get_excluded (gnutls_x509_name_constraints_t nc, uint idx, uint* type, gnutls_datum_t* name);
396 
397     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_4)
398         int gnutls_x509_cidr_to_rfc5280 (const(char)* cidr, gnutls_datum_t* cidr_rfc5280);
399 
400     int gnutls_x509_crt_get_crl_dist_points (gnutls_x509_crt_t cert, uint seq, void* ret, size_t* ret_size, uint* reason_flags, uint* critical);
401     int gnutls_x509_crt_set_crl_dist_points2 (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(void)* data, uint data_size, uint reason_flags);
402     int gnutls_x509_crt_set_crl_dist_points (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(void)* data_string, uint reason_flags);
403     int gnutls_x509_crt_cpy_crl_dist_points (gnutls_x509_crt_t dst, gnutls_x509_crt_t src);
404     int gnutls_x509_crl_sign (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, gnutls_x509_privkey_t issuer_key);
405     int gnutls_x509_crl_sign2 (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, gnutls_x509_privkey_t issuer_key, gnutls_digest_algorithm_t dig, uint flags);
406     time_t gnutls_x509_crt_get_activation_time (gnutls_x509_crt_t cert);
407     time_t gnutls_x509_crt_get_expiration_time (gnutls_x509_crt_t cert);
408     int gnutls_x509_crt_get_serial (gnutls_x509_crt_t cert, void* result, size_t* result_size);
409 
410     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
411     {
412         int gnutls_x509_spki_init (gnutls_x509_spki_t* spki);
413         void gnutls_x509_spki_deinit (gnutls_x509_spki_t spki);
414     }
415 
416     int gnutls_x509_spki_get_rsa_pss_params (gnutls_x509_spki_t spki, gnutls_digest_algorithm_t* dig, uint* salt_size);
417     void gnutls_x509_spki_set_rsa_pss_params (gnutls_x509_spki_t spki, gnutls_digest_algorithm_t dig, uint salt_size);
418     int gnutls_x509_crt_get_pk_algorithm (gnutls_x509_crt_t cert, uint* bits);
419 
420     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
421     {
422         int gnutls_x509_crt_set_spki (gnutls_x509_crt_t crt, const gnutls_x509_spki_t spki, uint flags);
423         int gnutls_x509_crt_get_spki (gnutls_x509_crt_t cert, gnutls_x509_spki_t spki, uint flags);
424     }
425 
426     int gnutls_x509_crt_get_pk_rsa_raw (gnutls_x509_crt_t crt, gnutls_datum_t* m, gnutls_datum_t* e);
427     int gnutls_x509_crt_get_pk_dsa_raw (gnutls_x509_crt_t crt, gnutls_datum_t* p, gnutls_datum_t* q, gnutls_datum_t* g, gnutls_datum_t* y);
428     int gnutls_x509_crt_get_pk_ecc_raw (gnutls_x509_crt_t crt, gnutls_ecc_curve_t* curve, gnutls_datum_t* x, gnutls_datum_t* y);
429 
430     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
431         int gnutls_x509_crt_get_pk_gost_raw (gnutls_x509_crt_t crt, gnutls_ecc_curve_t* curve, gnutls_digest_algorithm_t* digest, gnutls_gost_paramset_t* paramset, gnutls_datum_t* x, gnutls_datum_t* y);
432 
433     int gnutls_x509_crt_get_subject_alt_name (gnutls_x509_crt_t cert, uint seq, void* san, size_t* san_size, uint* critical);
434     int gnutls_x509_crt_get_subject_alt_name2 (gnutls_x509_crt_t cert, uint seq, void* san, size_t* san_size, uint* san_type, uint* critical);
435     int gnutls_x509_crt_get_subject_alt_othername_oid (gnutls_x509_crt_t cert, uint seq, void* oid, size_t* oid_size);
436     int gnutls_x509_crt_get_issuer_alt_name (gnutls_x509_crt_t cert, uint seq, void* ian, size_t* ian_size, uint* critical);
437     int gnutls_x509_crt_get_issuer_alt_name2 (gnutls_x509_crt_t cert, uint seq, void* ian, size_t* ian_size, uint* ian_type, uint* critical);
438     int gnutls_x509_crt_get_issuer_alt_othername_oid (gnutls_x509_crt_t cert, uint seq, void* ret, size_t* ret_size);
439     int gnutls_x509_crt_get_ca_status (gnutls_x509_crt_t cert, uint* critical);
440     int gnutls_x509_crt_get_basic_constraints (gnutls_x509_crt_t cert, uint* critical, uint* ca, int* pathlen);
441     int gnutls_x509_crt_get_key_usage (gnutls_x509_crt_t cert, uint* key_usage, uint* critical);
442     int gnutls_x509_crt_set_key_usage (gnutls_x509_crt_t crt, uint usage);
443     int gnutls_x509_crt_set_authority_info_access (gnutls_x509_crt_t crt, int what, gnutls_datum_t* data);
444 
445     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
446     {
447         int gnutls_x509_crt_get_inhibit_anypolicy (gnutls_x509_crt_t cert, uint* skipcerts, uint* critical);
448         int gnutls_x509_crt_set_inhibit_anypolicy (gnutls_x509_crt_t crt, uint skipcerts);
449     }
450 
451     int gnutls_x509_crt_get_proxy (gnutls_x509_crt_t cert, uint* critical, int* pathlen, char** policyLanguage, char** policy, size_t* sizeof_policy);
452 
453     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
454     {
455         int gnutls_x509_tlsfeatures_init (gnutls_x509_tlsfeatures_t* features);
456         void gnutls_x509_tlsfeatures_deinit (gnutls_x509_tlsfeatures_t);
457         int gnutls_x509_tlsfeatures_get (gnutls_x509_tlsfeatures_t f, uint idx, uint* feature);
458         int gnutls_x509_crt_set_tlsfeatures (gnutls_x509_crt_t crt, gnutls_x509_tlsfeatures_t features);
459         int gnutls_x509_crt_get_tlsfeatures (gnutls_x509_crt_t cert, gnutls_x509_tlsfeatures_t features, uint flags, uint* critical);
460     }
461 
462     uint gnutls_x509_tlsfeatures_check_crt (gnutls_x509_tlsfeatures_t feat, gnutls_x509_crt_t crt);
463     void gnutls_x509_policy_release (gnutls_x509_policy_st* policy);
464     int gnutls_x509_crt_get_policy (gnutls_x509_crt_t crt, uint indx, gnutls_x509_policy_st* policy, uint* critical);
465     int gnutls_x509_crt_set_policy (gnutls_x509_crt_t crt, const(gnutls_x509_policy_st)* policy, uint critical);
466     int gnutls_x509_dn_oid_known (const(char)* oid);
467     const(char)* gnutls_x509_dn_oid_name (const(char)* oid, uint flags);
468     int gnutls_x509_crt_get_extension_oid (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size);
469     int gnutls_x509_crt_get_extension_by_oid (gnutls_x509_crt_t cert, const(char)* oid, uint indx, void* buf, size_t* buf_size, uint* critical);
470     int gnutls_x509_crq_get_signature_algorithm (gnutls_x509_crq_t crq);
471     int gnutls_x509_crq_get_extension_by_oid2 (gnutls_x509_crq_t crq, const(char)* oid, uint indx, gnutls_datum_t* output, uint* critical);
472     int gnutls_x509_crt_get_extension_info (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size, uint* critical);
473     int gnutls_x509_crt_get_extension_data (gnutls_x509_crt_t cert, uint indx, void* data, size_t* sizeof_data);
474     int gnutls_x509_crt_get_extension_data2 (gnutls_x509_crt_t cert, uint indx, gnutls_datum_t* data);
475     int gnutls_x509_crt_set_extension_by_oid (gnutls_x509_crt_t crt, const(char)* oid, const(void)* buf, size_t sizeof_buf, uint critical);
476     int gnutls_x509_crt_set_dn (gnutls_x509_crt_t crt, const(char)* dn, const(char*)* err);
477     int gnutls_x509_crt_set_dn_by_oid (gnutls_x509_crt_t crt, const(char)* oid, uint raw_flag, const(void)* name, uint sizeof_name);
478     int gnutls_x509_crt_set_issuer_dn_by_oid (gnutls_x509_crt_t crt, const(char)* oid, uint raw_flag, const(void)* name, uint sizeof_name);
479     int gnutls_x509_crt_set_issuer_dn (gnutls_x509_crt_t crt, const(char)* dn, const(char*)* err);
480     int gnutls_x509_crt_set_version (gnutls_x509_crt_t crt, uint version_);
481     int gnutls_x509_crt_set_key (gnutls_x509_crt_t crt, gnutls_x509_privkey_t key);
482     int gnutls_x509_crt_set_ca_status (gnutls_x509_crt_t crt, uint ca);
483     int gnutls_x509_crt_set_basic_constraints (gnutls_x509_crt_t crt, uint ca, int pathLenConstraint);
484     int gnutls_x509_crt_set_subject_unique_id (gnutls_x509_crt_t cert, const(void)* id, size_t id_size);
485     int gnutls_x509_crt_set_issuer_unique_id (gnutls_x509_crt_t cert, const(void)* id, size_t id_size);
486     int gnutls_x509_crt_set_subject_alternative_name (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(char)* data_string);
487     int gnutls_x509_crt_set_subject_alt_name (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(void)* data, uint data_size, uint flags);
488     int gnutls_x509_crt_set_subject_alt_othername (gnutls_x509_crt_t crt, const(char)* oid, const(void)* data, uint data_size, uint flags);
489     int gnutls_x509_crt_set_issuer_alt_name (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(void)* data, uint data_size, uint flags);
490     int gnutls_x509_crt_set_issuer_alt_othername (gnutls_x509_crt_t crt, const(char)* oid, const(void)* data, uint data_size, uint flags);
491     int gnutls_x509_crt_sign (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer, gnutls_x509_privkey_t issuer_key);
492     int gnutls_x509_crt_sign2 (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer, gnutls_x509_privkey_t issuer_key, gnutls_digest_algorithm_t dig, uint flags);
493     int gnutls_x509_crt_set_activation_time (gnutls_x509_crt_t cert, time_t act_time);
494     int gnutls_x509_crt_set_expiration_time (gnutls_x509_crt_t cert, time_t exp_time);
495     int gnutls_x509_crt_set_serial (gnutls_x509_crt_t cert, const(void)* serial, size_t serial_size);
496     int gnutls_x509_crt_set_subject_key_id (gnutls_x509_crt_t cert, const(void)* id, size_t id_size);
497     int gnutls_x509_crt_set_proxy_dn (gnutls_x509_crt_t crt, gnutls_x509_crt_t eecrt, uint raw_flag, const(void)* name, uint sizeof_name);
498     int gnutls_x509_crt_set_proxy (gnutls_x509_crt_t crt, int pathLenConstraint, const(char)* policyLanguage, const(char)* policy, size_t sizeof_policy);
499     int gnutls_x509_crt_print (gnutls_x509_crt_t cert, gnutls_certificate_print_formats_t format, gnutls_datum_t* out_);
500     int gnutls_x509_crl_print (gnutls_x509_crl_t crl, gnutls_certificate_print_formats_t format, gnutls_datum_t* out_);
501     int gnutls_x509_crt_get_raw_issuer_dn (gnutls_x509_crt_t cert, gnutls_datum_t* start);
502     int gnutls_x509_crt_get_raw_dn (gnutls_x509_crt_t cert, gnutls_datum_t* start);
503     int gnutls_x509_rdn_get (const(gnutls_datum_t)* idn, char* buf, size_t* sizeof_buf);
504 
505     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
506         int gnutls_x509_rdn_get2 (const(gnutls_datum_t)* idn, gnutls_datum_t* str, uint flags);
507 
508     int gnutls_x509_rdn_get_oid (const(gnutls_datum_t)* idn, uint indx, void* buf, size_t* sizeof_buf);
509     int gnutls_x509_rdn_get_by_oid (const(gnutls_datum_t)* idn, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* sizeof_buf);
510     int gnutls_x509_crt_get_subject (gnutls_x509_crt_t cert, gnutls_x509_dn_t* dn);
511     int gnutls_x509_crt_get_issuer (gnutls_x509_crt_t cert, gnutls_x509_dn_t* dn);
512     int gnutls_x509_dn_get_rdn_ava (gnutls_x509_dn_t dn, int irdn, int iava, gnutls_x509_ava_st* ava);
513     int gnutls_x509_dn_get_str (gnutls_x509_dn_t dn, gnutls_datum_t* str);
514 
515     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
516         int gnutls_x509_dn_get_str2 (gnutls_x509_dn_t dn, gnutls_datum_t* str, uint flags);
517 
518     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_3)
519         int gnutls_x509_dn_set_str (gnutls_x509_dn_t dn, const(char)* str, const(char*)* err);
520 
521     int gnutls_x509_dn_init (gnutls_x509_dn_t* dn);
522     int gnutls_x509_dn_import (gnutls_x509_dn_t dn, const(gnutls_datum_t)* data);
523     int gnutls_x509_dn_export (gnutls_x509_dn_t dn, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
524     int gnutls_x509_dn_export2 (gnutls_x509_dn_t dn, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
525     void gnutls_x509_dn_deinit (gnutls_x509_dn_t dn);
526     int gnutls_x509_crl_init (gnutls_x509_crl_t* crl);
527     void gnutls_x509_crl_deinit (gnutls_x509_crl_t crl);
528     int gnutls_x509_crl_import (gnutls_x509_crl_t crl, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format);
529     int gnutls_x509_crl_export (gnutls_x509_crl_t crl, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
530     int gnutls_x509_crl_export2 (gnutls_x509_crl_t crl, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
531     int gnutls_x509_crl_get_raw_issuer_dn (gnutls_x509_crl_t crl, gnutls_datum_t* dn);
532     int gnutls_x509_crl_get_issuer_dn (gnutls_x509_crl_t crl, char* buf, size_t* sizeof_buf);
533     int gnutls_x509_crl_get_issuer_dn2 (gnutls_x509_crl_t crl, gnutls_datum_t* dn);
534 
535     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
536         int gnutls_x509_crl_get_issuer_dn3 (gnutls_x509_crl_t crl, gnutls_datum_t* dn, uint flags);
537 
538     int gnutls_x509_crl_get_issuer_dn_by_oid (gnutls_x509_crl_t crl, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* sizeof_buf);
539     int gnutls_x509_crl_get_dn_oid (gnutls_x509_crl_t crl, uint indx, void* oid, size_t* sizeof_oid);
540     int gnutls_x509_crl_get_signature_algorithm (gnutls_x509_crl_t crl);
541     int gnutls_x509_crl_get_signature (gnutls_x509_crl_t crl, char* sig, size_t* sizeof_sig);
542     int gnutls_x509_crl_get_version (gnutls_x509_crl_t crl);
543     int gnutls_x509_crl_get_signature_oid (gnutls_x509_crl_t crl, char* oid, size_t* oid_size);
544     time_t gnutls_x509_crl_get_this_update (gnutls_x509_crl_t crl);
545     time_t gnutls_x509_crl_get_next_update (gnutls_x509_crl_t crl);
546     int gnutls_x509_crl_get_crt_count (gnutls_x509_crl_t crl);
547     int gnutls_x509_crl_get_crt_serial (gnutls_x509_crl_t crl, uint indx, ubyte* serial, size_t* serial_size, time_t* t);
548     int gnutls_x509_crl_iter_crt_serial (gnutls_x509_crl_t crl, gnutls_x509_crl_iter_t*, ubyte* serial, size_t* serial_size, time_t* t);
549     void gnutls_x509_crl_iter_deinit (gnutls_x509_crl_iter_t);
550     uint gnutls_x509_crl_check_issuer (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer);
551     int gnutls_x509_crl_list_import2 (gnutls_x509_crl_t** crls, uint* size, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint flags);
552     int gnutls_x509_crl_list_import (gnutls_x509_crl_t* crls, uint* crl_max, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint flags);
553     int gnutls_x509_crl_set_version (gnutls_x509_crl_t crl, uint version_);
554     int gnutls_x509_crl_set_this_update (gnutls_x509_crl_t crl, time_t act_time);
555     int gnutls_x509_crl_set_next_update (gnutls_x509_crl_t crl, time_t exp_time);
556     int gnutls_x509_crl_set_crt_serial (gnutls_x509_crl_t crl, const(void)* serial, size_t serial_size, time_t revocation_time);
557     int gnutls_x509_crl_set_crt (gnutls_x509_crl_t crl, gnutls_x509_crt_t crt, time_t revocation_time);
558     int gnutls_x509_crl_get_authority_key_id (gnutls_x509_crl_t crl, void* id, size_t* id_size, uint* critical);
559     int gnutls_x509_crl_get_authority_key_gn_serial (gnutls_x509_crl_t crl, uint seq, void* alt, size_t* alt_size, uint* alt_type, void* serial, size_t* serial_size, uint* critical);
560     int gnutls_x509_crl_get_number (gnutls_x509_crl_t crl, void* ret, size_t* ret_size, uint* critical);
561     int gnutls_x509_crl_get_extension_oid (gnutls_x509_crl_t crl, uint indx, void* oid, size_t* sizeof_oid);
562     int gnutls_x509_crl_get_extension_info (gnutls_x509_crl_t crl, uint indx, void* oid, size_t* sizeof_oid, uint* critical);
563     int gnutls_x509_crl_get_extension_data (gnutls_x509_crl_t crl, uint indx, void* data, size_t* sizeof_data);
564     int gnutls_x509_crl_get_extension_data2 (gnutls_x509_crl_t crl, uint indx, gnutls_datum_t* data);
565     int gnutls_x509_crl_set_authority_key_id (gnutls_x509_crl_t crl, const(void)* id, size_t id_size);
566     int gnutls_x509_crl_set_number (gnutls_x509_crl_t crl, const(void)* nr, size_t nr_size);
567     const(char)* gnutls_certificate_verification_profile_get_name (gnutls_certificate_verification_profiles_t id);
568     gnutls_certificate_verification_profiles_t gnutls_certificate_verification_profile_get_id (const(char)* name);
569     uint gnutls_x509_crt_check_issuer (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer);
570     int gnutls_x509_crt_list_verify (const(gnutls_x509_crt_t)* cert_list, uint cert_list_length, const(gnutls_x509_crt_t)* CA_list, uint CA_list_length, const(gnutls_x509_crl_t)* CRL_list, uint CRL_list_length, uint flags, uint* verify);
571     int gnutls_x509_crt_verify (gnutls_x509_crt_t cert, const(gnutls_x509_crt_t)* CA_list, uint CA_list_length, uint flags, uint* verify);
572     int gnutls_x509_crl_verify (gnutls_x509_crl_t crl, const(gnutls_x509_crt_t)* CA_list, uint CA_list_length, uint flags, uint* verify);
573     int gnutls_x509_crt_verify_data2 (gnutls_x509_crt_t crt, gnutls_sign_algorithm_t algo, uint flags, const(gnutls_datum_t)* data, const(gnutls_datum_t)* signature);
574     int gnutls_x509_crt_check_revocation (gnutls_x509_crt_t cert, const(gnutls_x509_crl_t)* crl_list, uint crl_list_length);
575     int gnutls_x509_crt_get_fingerprint (gnutls_x509_crt_t cert, gnutls_digest_algorithm_t algo, void* buf, size_t* buf_size);
576     int gnutls_x509_crt_get_key_purpose_oid (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size, uint* critical);
577     int gnutls_x509_crt_set_key_purpose_oid (gnutls_x509_crt_t cert, const(void)* oid, uint critical);
578 
579     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_6)
580         uint gnutls_x509_crt_check_key_purpose (gnutls_x509_crt_t cert, const(char)* purpose, uint flags);
581 
582     const(char)* gnutls_pkcs_schema_get_name (uint schema);
583     const(char)* gnutls_pkcs_schema_get_oid (uint schema);
584     int gnutls_x509_privkey_init (gnutls_x509_privkey_t* key);
585     void gnutls_x509_privkey_deinit (gnutls_x509_privkey_t key);
586     gnutls_sec_param_t gnutls_x509_privkey_sec_param (gnutls_x509_privkey_t key);
587     void gnutls_x509_privkey_set_pin_function (gnutls_x509_privkey_t key, gnutls_pin_callback_t fn, void* userdata);
588     int gnutls_x509_privkey_cpy (gnutls_x509_privkey_t dst, gnutls_x509_privkey_t src);
589     int gnutls_x509_privkey_import (gnutls_x509_privkey_t key, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format);
590     int gnutls_x509_privkey_import_pkcs8 (gnutls_x509_privkey_t key, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, const(char)* password, uint flags);
591     int gnutls_x509_privkey_import_openssl (gnutls_x509_privkey_t key, const(gnutls_datum_t)* data, const(char)* password);
592     int gnutls_pkcs8_info (const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint* schema, uint* cipher, void* salt, uint* salt_size, uint* iter_count, char** oid);
593     int gnutls_x509_privkey_import2 (gnutls_x509_privkey_t key, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, const(char)* password, uint flags);
594     int gnutls_x509_privkey_import_rsa_raw (gnutls_x509_privkey_t key, const(gnutls_datum_t)* m, const(gnutls_datum_t)* e, const(gnutls_datum_t)* d, const(gnutls_datum_t)* p, const(gnutls_datum_t)* q, const(gnutls_datum_t)* u);
595     int gnutls_x509_privkey_import_rsa_raw2 (gnutls_x509_privkey_t key, const(gnutls_datum_t)* m, const(gnutls_datum_t)* e, const(gnutls_datum_t)* d, const(gnutls_datum_t)* p, const(gnutls_datum_t)* q, const(gnutls_datum_t)* u, const(gnutls_datum_t)* e1, const(gnutls_datum_t)* e2);
596     int gnutls_x509_privkey_import_ecc_raw (gnutls_x509_privkey_t key, gnutls_ecc_curve_t curve, const(gnutls_datum_t)* x, const(gnutls_datum_t)* y, const(gnutls_datum_t)* k);
597 
598     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
599         int gnutls_x509_privkey_import_gost_raw (gnutls_x509_privkey_t key, gnutls_ecc_curve_t curve, gnutls_digest_algorithm_t digest, gnutls_gost_paramset_t paramset, const(gnutls_datum_t)* x, const(gnutls_datum_t)* y, const(gnutls_datum_t)* k);
600 
601     int gnutls_x509_privkey_fix (gnutls_x509_privkey_t key);
602     int gnutls_x509_privkey_export_dsa_raw (gnutls_x509_privkey_t key, gnutls_datum_t* p, gnutls_datum_t* q, gnutls_datum_t* g, gnutls_datum_t* y, gnutls_datum_t* x);
603     int gnutls_x509_privkey_import_dsa_raw (gnutls_x509_privkey_t key, const(gnutls_datum_t)* p, const(gnutls_datum_t)* q, const(gnutls_datum_t)* g, const(gnutls_datum_t)* y, const(gnutls_datum_t)* x);
604     int gnutls_x509_privkey_get_pk_algorithm (gnutls_x509_privkey_t key);
605     int gnutls_x509_privkey_get_pk_algorithm2 (gnutls_x509_privkey_t key, uint* bits);
606 
607     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
608     {
609         int gnutls_x509_privkey_get_spki (gnutls_x509_privkey_t key, gnutls_x509_spki_t spki, uint flags);
610         int gnutls_x509_privkey_set_spki (gnutls_x509_privkey_t key, const gnutls_x509_spki_t spki, uint flags);
611     }
612 
613     int gnutls_x509_privkey_get_key_id (gnutls_x509_privkey_t key, uint flags, ubyte* output_data, size_t* output_data_size);
614     int gnutls_x509_privkey_generate (gnutls_x509_privkey_t key, gnutls_pk_algorithm_t algo, uint bits, uint flags);
615     void gnutls_x509_privkey_set_flags (gnutls_x509_privkey_t key, uint flags);
616     int gnutls_x509_privkey_generate2 (gnutls_x509_privkey_t key, gnutls_pk_algorithm_t algo, uint bits, uint flags, const(gnutls_keygen_data_st)* data, uint data_size);
617     int gnutls_x509_privkey_verify_seed (gnutls_x509_privkey_t key, gnutls_digest_algorithm_t, const(void)* seed, size_t seed_size);
618     int gnutls_x509_privkey_get_seed (gnutls_x509_privkey_t key, gnutls_digest_algorithm_t*, void* seed, size_t* seed_size);
619     int gnutls_x509_privkey_verify_params (gnutls_x509_privkey_t key);
620     int gnutls_x509_privkey_export (gnutls_x509_privkey_t key, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
621     int gnutls_x509_privkey_export2 (gnutls_x509_privkey_t key, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
622     int gnutls_x509_privkey_export_pkcs8 (gnutls_x509_privkey_t key, gnutls_x509_crt_fmt_t format, const(char)* password, uint flags, void* output_data, size_t* output_data_size);
623     int gnutls_x509_privkey_export2_pkcs8 (gnutls_x509_privkey_t key, gnutls_x509_crt_fmt_t format, const(char)* password, uint flags, gnutls_datum_t* out_);
624     int gnutls_x509_privkey_export_rsa_raw2 (gnutls_x509_privkey_t key, gnutls_datum_t* m, gnutls_datum_t* e, gnutls_datum_t* d, gnutls_datum_t* p, gnutls_datum_t* q, gnutls_datum_t* u, gnutls_datum_t* e1, gnutls_datum_t* e2);
625     int gnutls_x509_privkey_export_rsa_raw (gnutls_x509_privkey_t key, gnutls_datum_t* m, gnutls_datum_t* e, gnutls_datum_t* d, gnutls_datum_t* p, gnutls_datum_t* q, gnutls_datum_t* u);
626     int gnutls_x509_privkey_export_ecc_raw (gnutls_x509_privkey_t key, gnutls_ecc_curve_t* curve, gnutls_datum_t* x, gnutls_datum_t* y, gnutls_datum_t* k);
627 
628     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
629         int gnutls_x509_privkey_export_gost_raw (gnutls_x509_privkey_t key, gnutls_ecc_curve_t* curve, gnutls_digest_algorithm_t* digest, gnutls_gost_paramset_t* paramset, gnutls_datum_t* x, gnutls_datum_t* y, gnutls_datum_t* k);
630 
631     int gnutls_x509_privkey_sign_data (gnutls_x509_privkey_t key, gnutls_digest_algorithm_t digest, uint flags, const(gnutls_datum_t)* data, void* signature, size_t* signature_size);
632     int gnutls_x509_crq_sign (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key);
633     int gnutls_x509_crq_sign2 (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key, gnutls_digest_algorithm_t dig, uint flags);
634     int gnutls_x509_crq_print (gnutls_x509_crq_t crq, gnutls_certificate_print_formats_t format, gnutls_datum_t* out_);
635     int gnutls_x509_crq_verify (gnutls_x509_crq_t crq, uint flags);
636     int gnutls_x509_crq_init (gnutls_x509_crq_t* crq);
637     void gnutls_x509_crq_deinit (gnutls_x509_crq_t crq);
638     int gnutls_x509_crq_import (gnutls_x509_crq_t crq, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format);
639     int gnutls_x509_crq_get_private_key_usage_period (gnutls_x509_crq_t cert, time_t* activation, time_t* expiration, uint* critical);
640     int gnutls_x509_crq_get_dn (gnutls_x509_crq_t crq, char* buf, size_t* sizeof_buf);
641     int gnutls_x509_crq_get_dn2 (gnutls_x509_crq_t crq, gnutls_datum_t* dn);
642 
643     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
644         int gnutls_x509_crq_get_dn3 (gnutls_x509_crq_t crq, gnutls_datum_t* dn, uint flags);
645 
646     int gnutls_x509_crq_get_dn_oid (gnutls_x509_crq_t crq, uint indx, void* oid, size_t* sizeof_oid);
647     int gnutls_x509_crq_get_dn_by_oid (gnutls_x509_crq_t crq, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* sizeof_buf);
648     int gnutls_x509_crq_set_dn (gnutls_x509_crq_t crq, const(char)* dn, const(char*)* err);
649     int gnutls_x509_crq_set_dn_by_oid (gnutls_x509_crq_t crq, const(char)* oid, uint raw_flag, const(void)* data, uint sizeof_data);
650     int gnutls_x509_crq_set_version (gnutls_x509_crq_t crq, uint version_);
651     int gnutls_x509_crq_get_version (gnutls_x509_crq_t crq);
652     int gnutls_x509_crq_set_key (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key);
653 
654     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_3)
655         int gnutls_x509_crq_set_extension_by_oid (gnutls_x509_crq_t crq, const(char)* oid, const(void)* buf, size_t sizeof_buf, uint critical);
656 
657     int gnutls_x509_crq_set_challenge_password (gnutls_x509_crq_t crq, const(char)* pass);
658     int gnutls_x509_crq_get_challenge_password (gnutls_x509_crq_t crq, char* pass, size_t* sizeof_pass);
659     int gnutls_x509_crq_set_attribute_by_oid (gnutls_x509_crq_t crq, const(char)* oid, void* buf, size_t sizeof_buf);
660     int gnutls_x509_crq_get_attribute_by_oid (gnutls_x509_crq_t crq, const(char)* oid, uint indx, void* buf, size_t* sizeof_buf);
661     int gnutls_x509_crq_export (gnutls_x509_crq_t crq, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
662     int gnutls_x509_crq_export2 (gnutls_x509_crq_t crq, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
663     int gnutls_x509_crt_set_crq (gnutls_x509_crt_t crt, gnutls_x509_crq_t crq);
664     int gnutls_x509_crt_set_crq_extensions (gnutls_x509_crt_t crt, gnutls_x509_crq_t crq);
665 
666     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
667         int gnutls_x509_crt_set_crq_extension_by_oid (gnutls_x509_crt_t crt, gnutls_x509_crq_t crq, const(char)* oid, uint flags);
668 
669     int gnutls_x509_crq_set_private_key_usage_period (gnutls_x509_crq_t crq, time_t activation, time_t expiration);
670     int gnutls_x509_crq_set_key_rsa_raw (gnutls_x509_crq_t crq, const(gnutls_datum_t)* m, const(gnutls_datum_t)* e);
671     int gnutls_x509_crq_set_subject_alt_name (gnutls_x509_crq_t crq, gnutls_x509_subject_alt_name_t nt, const(void)* data, uint data_size, uint flags);
672     int gnutls_x509_crq_set_subject_alt_othername (gnutls_x509_crq_t crq, const(char)* oid, const(void)* data, uint data_size, uint flags);
673     int gnutls_x509_crq_set_key_usage (gnutls_x509_crq_t crq, uint usage);
674     int gnutls_x509_crq_set_basic_constraints (gnutls_x509_crq_t crq, uint ca, int pathLenConstraint);
675     int gnutls_x509_crq_set_key_purpose_oid (gnutls_x509_crq_t crq, const(void)* oid, uint critical);
676     int gnutls_x509_crq_get_key_purpose_oid (gnutls_x509_crq_t crq, uint indx, void* oid, size_t* sizeof_oid, uint* critical);
677     int gnutls_x509_crq_get_extension_data (gnutls_x509_crq_t crq, uint indx, void* data, size_t* sizeof_data);
678     int gnutls_x509_crq_get_extension_data2 (gnutls_x509_crq_t crq, uint indx, gnutls_datum_t* data);
679     int gnutls_x509_crq_get_extension_info (gnutls_x509_crq_t crq, uint indx, void* oid, size_t* sizeof_oid, uint* critical);
680     int gnutls_x509_crq_get_attribute_data (gnutls_x509_crq_t crq, uint indx, void* data, size_t* sizeof_data);
681     int gnutls_x509_crq_get_attribute_info (gnutls_x509_crq_t crq, uint indx, void* oid, size_t* sizeof_oid);
682     int gnutls_x509_crq_get_pk_algorithm (gnutls_x509_crq_t crq, uint* bits);
683 
684     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
685     {
686         int gnutls_x509_crq_get_spki (gnutls_x509_crq_t crq, gnutls_x509_spki_t spki, uint flags);
687         int gnutls_x509_crq_set_spki (gnutls_x509_crq_t crq, const gnutls_x509_spki_t spki, uint flags);
688     }
689 
690     int gnutls_x509_crq_get_signature_oid (gnutls_x509_crq_t crq, char* oid, size_t* oid_size);
691     int gnutls_x509_crq_get_pk_oid (gnutls_x509_crq_t crq, char* oid, size_t* oid_size);
692     int gnutls_x509_crq_get_key_id (gnutls_x509_crq_t crq, uint flags, ubyte* output_data, size_t* output_data_size);
693     int gnutls_x509_crq_get_key_rsa_raw (gnutls_x509_crq_t crq, gnutls_datum_t* m, gnutls_datum_t* e);
694     int gnutls_x509_crq_get_key_usage (gnutls_x509_crq_t crq, uint* key_usage, uint* critical);
695     int gnutls_x509_crq_get_basic_constraints (gnutls_x509_crq_t crq, uint* critical, uint* ca, int* pathlen);
696     int gnutls_x509_crq_get_subject_alt_name (gnutls_x509_crq_t crq, uint seq, void* ret, size_t* ret_size, uint* ret_type, uint* critical);
697     int gnutls_x509_crq_get_subject_alt_othername_oid (gnutls_x509_crq_t crq, uint seq, void* ret, size_t* ret_size);
698     int gnutls_x509_crq_get_extension_by_oid (gnutls_x509_crq_t crq, const(char)* oid, uint indx, void* buf, size_t* sizeof_buf, uint* critical);
699 
700     static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
701     {
702         int gnutls_x509_crq_get_tlsfeatures (gnutls_x509_crq_t crq, gnutls_x509_tlsfeatures_t features, uint flags, uint* critical);
703         int gnutls_x509_crq_set_tlsfeatures (gnutls_x509_crq_t crq, gnutls_x509_tlsfeatures_t features);
704     }
705 
706     int gnutls_x509_crt_get_extension_by_oid2 (gnutls_x509_crt_t cert, const(char)* oid, uint indx, gnutls_datum_t* output, uint* critical);
707     int gnutls_x509_trust_list_init (gnutls_x509_trust_list_t* list, uint size);
708     void gnutls_x509_trust_list_deinit (gnutls_x509_trust_list_t list, uint all);
709     int gnutls_x509_trust_list_get_issuer (gnutls_x509_trust_list_t list, gnutls_x509_crt_t cert, gnutls_x509_crt_t* issuer, uint flags);
710     int gnutls_x509_trust_list_get_issuer_by_dn (gnutls_x509_trust_list_t list, const(gnutls_datum_t)* dn, gnutls_x509_crt_t* issuer, uint flags);
711     int gnutls_x509_trust_list_get_issuer_by_subject_key_id (gnutls_x509_trust_list_t list, const(gnutls_datum_t)* dn, const(gnutls_datum_t)* spki, gnutls_x509_crt_t* issuer, uint flags);
712     int gnutls_x509_trust_list_add_cas (gnutls_x509_trust_list_t list, const(gnutls_x509_crt_t)* clist, uint clist_size, uint flags);
713     int gnutls_x509_trust_list_remove_cas (gnutls_x509_trust_list_t list, const(gnutls_x509_crt_t)* clist, uint clist_size);
714     int gnutls_x509_trust_list_add_named_crt (gnutls_x509_trust_list_t list, gnutls_x509_crt_t cert, const(void)* name, size_t name_size, uint flags);
715     int gnutls_x509_trust_list_add_crls (gnutls_x509_trust_list_t list, const(gnutls_x509_crl_t)* crl_list, uint crl_size, uint flags, uint verification_flags);
716     int gnutls_x509_trust_list_iter_get_ca (gnutls_x509_trust_list_t list, gnutls_x509_trust_list_iter_t* iter, gnutls_x509_crt_t* crt);
717     void gnutls_x509_trust_list_iter_deinit (gnutls_x509_trust_list_iter_t iter);
718     int gnutls_x509_trust_list_verify_named_crt (gnutls_x509_trust_list_t list, gnutls_x509_crt_t cert, const(void)* name, size_t name_size, uint flags, uint* verify, int function () func);
719     int gnutls_x509_trust_list_verify_crt2 (gnutls_x509_trust_list_t list, gnutls_x509_crt_t* cert_list, uint cert_list_size, gnutls_typed_vdata_st* data, uint elements, uint flags, uint* voutput, int function () func);
720     int gnutls_x509_trust_list_verify_crt (gnutls_x509_trust_list_t list, gnutls_x509_crt_t* cert_list, uint cert_list_size, uint flags, uint* verify, int function () func);
721     int gnutls_x509_trust_list_add_trust_mem (gnutls_x509_trust_list_t list, const(gnutls_datum_t)* cas, const(gnutls_datum_t)* crls, gnutls_x509_crt_fmt_t type, uint tl_flags, uint tl_vflags);
722     int gnutls_x509_trust_list_add_trust_file (gnutls_x509_trust_list_t list, const(char)* ca_file, const(char)* crl_file, gnutls_x509_crt_fmt_t type, uint tl_flags, uint tl_vflags);
723     int gnutls_x509_trust_list_add_trust_dir (gnutls_x509_trust_list_t list, const(char)* ca_dir, const(char)* crl_dir, gnutls_x509_crt_fmt_t type, uint tl_flags, uint tl_vflags);
724     int gnutls_x509_trust_list_remove_trust_file (gnutls_x509_trust_list_t list, const(char)* ca_file, gnutls_x509_crt_fmt_t type);
725     int gnutls_x509_trust_list_remove_trust_mem (gnutls_x509_trust_list_t list, const(gnutls_datum_t)* cas, gnutls_x509_crt_fmt_t type);
726     int gnutls_x509_trust_list_add_system_trust (gnutls_x509_trust_list_t list, uint tl_flags, uint tl_vflags);
727     void gnutls_certificate_set_trust_list (gnutls_certificate_credentials_t res, gnutls_x509_trust_list_t tlist, uint flags);
728     void gnutls_certificate_get_trust_list (gnutls_certificate_credentials_t res, gnutls_x509_trust_list_t* tlist);
729     void gnutls_x509_ext_deinit (gnutls_x509_ext_st* ext);
730     int gnutls_x509_ext_print (gnutls_x509_ext_st* exts, uint exts_size, gnutls_certificate_print_formats_t format, gnutls_datum_t* out_);
731 }
732 else
733 {
734     extern (System) @nogc nothrow @system
735     {
736         alias pgnutls_x509_crt_init = int function (gnutls_x509_crt_t* cert);
737         alias pgnutls_x509_crt_deinit = void function (gnutls_x509_crt_t cert);
738 
739         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
740             alias pgnutls_x509_crt_set_flags = void function (gnutls_x509_crt_t cert, uint flags);
741 
742         alias pgnutls_x509_crt_equals = uint function (gnutls_x509_crt_t cert1, gnutls_x509_crt_t cert2);
743         alias pgnutls_x509_crt_equals2 = uint function (gnutls_x509_crt_t cert1, const(gnutls_datum_t)* der);
744         alias pgnutls_x509_crt_import = int function (gnutls_x509_crt_t cert, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format);
745         alias pgnutls_x509_crt_list_import2 = int function (gnutls_x509_crt_t** certs, uint* size, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint flags);
746         alias pgnutls_x509_crt_list_import = int function (gnutls_x509_crt_t* certs, uint* cert_max, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint flags);
747         alias pgnutls_x509_crt_import_url = int function (gnutls_x509_crt_t crt, const(char)* url, uint flags);
748 
749         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
750             alias pgnutls_x509_crt_list_import_url = int function (gnutls_x509_crt_t** certs, uint* size, const(char)* url, gnutls_pin_callback_t pin_fn, void* pin_fn_userdata, uint flags);
751 
752         alias pgnutls_x509_crt_export = int function (gnutls_x509_crt_t cert, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
753         alias pgnutls_x509_crt_export2 = int function (gnutls_x509_crt_t cert, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
754         alias pgnutls_x509_crt_get_private_key_usage_period = int function (gnutls_x509_crt_t cert, time_t* activation, time_t* expiration, uint* critical);
755         alias pgnutls_x509_crt_get_issuer_dn = int function (gnutls_x509_crt_t cert, char* buf, size_t* buf_size);
756         alias pgnutls_x509_crt_get_issuer_dn2 = int function (gnutls_x509_crt_t cert, gnutls_datum_t* dn);
757 
758         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
759             alias pgnutls_x509_crt_get_issuer_dn3 = int function (gnutls_x509_crt_t cert, gnutls_datum_t* dn, uint flags);
760 
761         alias pgnutls_x509_crt_get_issuer_dn_oid = int function (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size);
762         alias pgnutls_x509_crt_get_issuer_dn_by_oid = int function (gnutls_x509_crt_t cert, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* buf_size);
763         alias pgnutls_x509_crt_get_dn = int function (gnutls_x509_crt_t cert, char* buf, size_t* buf_size);
764         alias pgnutls_x509_crt_get_dn2 = int function (gnutls_x509_crt_t cert, gnutls_datum_t* dn);
765 
766         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
767             alias pgnutls_x509_crt_get_dn3 = int function (gnutls_x509_crt_t cert, gnutls_datum_t* dn, uint flags);
768 
769         alias pgnutls_x509_crt_get_dn_oid = int function (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size);
770         alias pgnutls_x509_crt_get_dn_by_oid = int function (gnutls_x509_crt_t cert, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* buf_size);
771         alias pgnutls_x509_crt_check_hostname = uint function (gnutls_x509_crt_t cert, const(char)* hostname);
772         alias pgnutls_x509_crt_check_hostname2 = uint function (gnutls_x509_crt_t cert, const(char)* hostname, uint flags);
773         alias pgnutls_x509_crt_check_email = uint function (gnutls_x509_crt_t cert, const(char)* email, uint flags);
774 
775         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
776             alias pgnutls_x509_crt_check_ip = uint function (gnutls_x509_crt_t cert, const(ubyte)* ip, uint ip_size, uint flags);
777 
778         alias pgnutls_x509_crt_get_signature_algorithm = int function (gnutls_x509_crt_t cert);
779         alias pgnutls_x509_crt_get_signature = int function (gnutls_x509_crt_t cert, char* sig, size_t* sizeof_sig);
780         alias pgnutls_x509_crt_get_version = int function (gnutls_x509_crt_t cert);
781         alias pgnutls_x509_crt_get_pk_oid = int function (gnutls_x509_crt_t cert, char* oid, size_t* oid_size);
782         alias pgnutls_x509_crt_get_signature_oid = int function (gnutls_x509_crt_t cert, char* oid, size_t* oid_size);
783         alias pgnutls_x509_crt_get_key_id = int function (gnutls_x509_crt_t crt, uint flags, ubyte* output_data, size_t* output_data_size);
784         alias pgnutls_x509_crt_set_private_key_usage_period = int function (gnutls_x509_crt_t crt, time_t activation, time_t expiration);
785         alias pgnutls_x509_crt_set_authority_key_id = int function (gnutls_x509_crt_t cert, const(void)* id, size_t id_size);
786         alias pgnutls_x509_crt_get_authority_key_id = int function (gnutls_x509_crt_t cert, void* id, size_t* id_size, uint* critical);
787         alias pgnutls_x509_crt_get_authority_key_gn_serial = int function (gnutls_x509_crt_t cert, uint seq, void* alt, size_t* alt_size, uint* alt_type, void* serial, size_t* serial_size, uint* critical);
788         alias pgnutls_x509_crt_get_subject_key_id = int function (gnutls_x509_crt_t cert, void* ret, size_t* ret_size, uint* critical);
789         alias pgnutls_x509_crt_get_subject_unique_id = int function (gnutls_x509_crt_t crt, char* buf, size_t* buf_size);
790         alias pgnutls_x509_crt_get_issuer_unique_id = int function (gnutls_x509_crt_t crt, char* buf, size_t* buf_size);
791         alias pgnutls_x509_crt_set_pin_function = void function (gnutls_x509_crt_t crt, gnutls_pin_callback_t fn, void* userdata);
792         alias pgnutls_x509_crt_get_authority_info_access = int function (gnutls_x509_crt_t crt, uint seq, int what, gnutls_datum_t* data, uint* critical);
793         alias pgnutls_x509_name_constraints_check = uint function (gnutls_x509_name_constraints_t nc, gnutls_x509_subject_alt_name_t type, const(gnutls_datum_t)* name);
794         alias pgnutls_x509_name_constraints_check_crt = uint function (gnutls_x509_name_constraints_t nc, gnutls_x509_subject_alt_name_t type, gnutls_x509_crt_t crt);
795         alias pgnutls_x509_name_constraints_init = int function (gnutls_x509_name_constraints_t* nc);
796         alias pgnutls_x509_name_constraints_deinit = void function (gnutls_x509_name_constraints_t nc);
797         alias pgnutls_x509_crt_get_name_constraints = int function (gnutls_x509_crt_t crt, gnutls_x509_name_constraints_t nc, uint flags, uint* critical);
798         alias pgnutls_x509_name_constraints_add_permitted = int function (gnutls_x509_name_constraints_t nc, gnutls_x509_subject_alt_name_t type, const(gnutls_datum_t)* name);
799         alias pgnutls_x509_name_constraints_add_excluded = int function (gnutls_x509_name_constraints_t nc, gnutls_x509_subject_alt_name_t type, const(gnutls_datum_t)* name);
800         alias pgnutls_x509_crt_set_name_constraints = int function (gnutls_x509_crt_t crt, gnutls_x509_name_constraints_t nc, uint critical);
801         alias pgnutls_x509_name_constraints_get_permitted = int function (gnutls_x509_name_constraints_t nc, uint idx, uint* type, gnutls_datum_t* name);
802         alias pgnutls_x509_name_constraints_get_excluded = int function (gnutls_x509_name_constraints_t nc, uint idx, uint* type, gnutls_datum_t* name);
803 
804         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_4)
805             alias pgnutls_x509_cidr_to_rfc5280 = int function (const(char)* cidr, gnutls_datum_t* cidr_rfc5280);
806 
807         alias pgnutls_x509_crt_get_crl_dist_points = int function (gnutls_x509_crt_t cert, uint seq, void* ret, size_t* ret_size, uint* reason_flags, uint* critical);
808         alias pgnutls_x509_crt_set_crl_dist_points2 = int function (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(void)* data, uint data_size, uint reason_flags);
809         alias pgnutls_x509_crt_set_crl_dist_points = int function (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(void)* data_string, uint reason_flags);
810         alias pgnutls_x509_crt_cpy_crl_dist_points = int function (gnutls_x509_crt_t dst, gnutls_x509_crt_t src);
811         alias pgnutls_x509_crl_sign = int function (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, gnutls_x509_privkey_t issuer_key);
812         alias pgnutls_x509_crl_sign2 = int function (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, gnutls_x509_privkey_t issuer_key, gnutls_digest_algorithm_t dig, uint flags);
813         alias pgnutls_x509_crt_get_activation_time = time_t function (gnutls_x509_crt_t cert);
814         alias pgnutls_x509_crt_get_expiration_time = time_t function (gnutls_x509_crt_t cert);
815         alias pgnutls_x509_crt_get_serial = int function (gnutls_x509_crt_t cert, void* result, size_t* result_size);
816 
817         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
818         {
819             alias pgnutls_x509_spki_init = int function (gnutls_x509_spki_t* spki);
820             alias pgnutls_x509_spki_deinit = void function (gnutls_x509_spki_t spki);
821         }
822 
823         alias pgnutls_x509_spki_get_rsa_pss_params = int function (gnutls_x509_spki_t spki, gnutls_digest_algorithm_t* dig, uint* salt_size);
824         alias pgnutls_x509_spki_set_rsa_pss_params = void function (gnutls_x509_spki_t spki, gnutls_digest_algorithm_t dig, uint salt_size);
825         alias pgnutls_x509_crt_get_pk_algorithm = int function (gnutls_x509_crt_t cert, uint* bits);
826 
827         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
828         {
829             alias pgnutls_x509_crt_set_spki = int function (gnutls_x509_crt_t crt, const gnutls_x509_spki_t spki, uint flags);
830             alias pgnutls_x509_crt_get_spki = int function (gnutls_x509_crt_t cert, gnutls_x509_spki_t spki, uint flags);
831         }
832 
833         alias pgnutls_x509_crt_get_pk_rsa_raw = int function (gnutls_x509_crt_t crt, gnutls_datum_t* m, gnutls_datum_t* e);
834         alias pgnutls_x509_crt_get_pk_dsa_raw = int function (gnutls_x509_crt_t crt, gnutls_datum_t* p, gnutls_datum_t* q, gnutls_datum_t* g, gnutls_datum_t* y);
835         alias pgnutls_x509_crt_get_pk_ecc_raw = int function (gnutls_x509_crt_t crt, gnutls_ecc_curve_t* curve, gnutls_datum_t* x, gnutls_datum_t* y);
836 
837         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
838             alias pgnutls_x509_crt_get_pk_gost_raw = int function (gnutls_x509_crt_t crt, gnutls_ecc_curve_t* curve, gnutls_digest_algorithm_t* digest, gnutls_gost_paramset_t* paramset, gnutls_datum_t* x, gnutls_datum_t* y);
839 
840         alias pgnutls_x509_crt_get_subject_alt_name = int function (gnutls_x509_crt_t cert, uint seq, void* san, size_t* san_size, uint* critical);
841         alias pgnutls_x509_crt_get_subject_alt_name2 = int function (gnutls_x509_crt_t cert, uint seq, void* san, size_t* san_size, uint* san_type, uint* critical);
842         alias pgnutls_x509_crt_get_subject_alt_othername_oid = int function (gnutls_x509_crt_t cert, uint seq, void* oid, size_t* oid_size);
843         alias pgnutls_x509_crt_get_issuer_alt_name = int function (gnutls_x509_crt_t cert, uint seq, void* ian, size_t* ian_size, uint* critical);
844         alias pgnutls_x509_crt_get_issuer_alt_name2 = int function (gnutls_x509_crt_t cert, uint seq, void* ian, size_t* ian_size, uint* ian_type, uint* critical);
845         alias pgnutls_x509_crt_get_issuer_alt_othername_oid = int function (gnutls_x509_crt_t cert, uint seq, void* ret, size_t* ret_size);
846         alias pgnutls_x509_crt_get_ca_status = int function (gnutls_x509_crt_t cert, uint* critical);
847         alias pgnutls_x509_crt_get_basic_constraints = int function (gnutls_x509_crt_t cert, uint* critical, uint* ca, int* pathlen);
848         alias pgnutls_x509_crt_get_key_usage = int function (gnutls_x509_crt_t cert, uint* key_usage, uint* critical);
849         alias pgnutls_x509_crt_set_key_usage = int function (gnutls_x509_crt_t crt, uint usage);
850         alias pgnutls_x509_crt_set_authority_info_access = int function (gnutls_x509_crt_t crt, int what, gnutls_datum_t* data);
851 
852         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
853         {
854             alias pgnutls_x509_crt_get_inhibit_anypolicy = int function (gnutls_x509_crt_t cert, uint* skipcerts, uint* critical);
855             alias pgnutls_x509_crt_set_inhibit_anypolicy = int function (gnutls_x509_crt_t crt, uint skipcerts);
856         }
857 
858         alias pgnutls_x509_crt_get_proxy = int function (gnutls_x509_crt_t cert, uint* critical, int* pathlen, char** policyLanguage, char** policy, size_t* sizeof_policy);
859 
860         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
861         {
862             alias pgnutls_x509_tlsfeatures_init = int function (gnutls_x509_tlsfeatures_t* features);
863             alias pgnutls_x509_tlsfeatures_deinit = void function (gnutls_x509_tlsfeatures_t);
864             alias pgnutls_x509_tlsfeatures_get = int function (gnutls_x509_tlsfeatures_t f, uint idx, uint* feature);
865             alias pgnutls_x509_crt_set_tlsfeatures = int function (gnutls_x509_crt_t crt, gnutls_x509_tlsfeatures_t features);
866             alias pgnutls_x509_crt_get_tlsfeatures = int function (gnutls_x509_crt_t cert, gnutls_x509_tlsfeatures_t features, uint flags, uint* critical);
867         }
868 
869         alias pgnutls_x509_tlsfeatures_check_crt = uint function (gnutls_x509_tlsfeatures_t feat, gnutls_x509_crt_t crt);
870         alias pgnutls_x509_policy_release = void function (gnutls_x509_policy_st* policy);
871         alias pgnutls_x509_crt_get_policy = int function (gnutls_x509_crt_t crt, uint indx, gnutls_x509_policy_st* policy, uint* critical);
872         alias pgnutls_x509_crt_set_policy = int function (gnutls_x509_crt_t crt, const(gnutls_x509_policy_st)* policy, uint critical);
873         alias pgnutls_x509_dn_oid_known = int function (const(char)* oid);
874         alias pgnutls_x509_dn_oid_name = const(char)* function (const(char)* oid, uint flags);
875         alias pgnutls_x509_crt_get_extension_oid = int function (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size);
876         alias pgnutls_x509_crt_get_extension_by_oid = int function (gnutls_x509_crt_t cert, const(char)* oid, uint indx, void* buf, size_t* buf_size, uint* critical);
877         alias pgnutls_x509_crq_get_signature_algorithm = int function (gnutls_x509_crq_t crq);
878         alias pgnutls_x509_crq_get_extension_by_oid2 = int function (gnutls_x509_crq_t crq, const(char)* oid, uint indx, gnutls_datum_t* output, uint* critical);
879         alias pgnutls_x509_crt_get_extension_info = int function (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size, uint* critical);
880         alias pgnutls_x509_crt_get_extension_data = int function (gnutls_x509_crt_t cert, uint indx, void* data, size_t* sizeof_data);
881         alias pgnutls_x509_crt_get_extension_data2 = int function (gnutls_x509_crt_t cert, uint indx, gnutls_datum_t* data);
882         alias pgnutls_x509_crt_set_extension_by_oid = int function (gnutls_x509_crt_t crt, const(char)* oid, const(void)* buf, size_t sizeof_buf, uint critical);
883         alias pgnutls_x509_crt_set_dn = int function (gnutls_x509_crt_t crt, const(char)* dn, const(char*)* err);
884         alias pgnutls_x509_crt_set_dn_by_oid = int function (gnutls_x509_crt_t crt, const(char)* oid, uint raw_flag, const(void)* name, uint sizeof_name);
885         alias pgnutls_x509_crt_set_issuer_dn_by_oid = int function (gnutls_x509_crt_t crt, const(char)* oid, uint raw_flag, const(void)* name, uint sizeof_name);
886         alias pgnutls_x509_crt_set_issuer_dn = int function (gnutls_x509_crt_t crt, const(char)* dn, const(char*)* err);
887         alias pgnutls_x509_crt_set_version = int function (gnutls_x509_crt_t crt, uint version_);
888         alias pgnutls_x509_crt_set_key = int function (gnutls_x509_crt_t crt, gnutls_x509_privkey_t key);
889         alias pgnutls_x509_crt_set_ca_status = int function (gnutls_x509_crt_t crt, uint ca);
890         alias pgnutls_x509_crt_set_basic_constraints = int function (gnutls_x509_crt_t crt, uint ca, int pathLenConstraint);
891         alias pgnutls_x509_crt_set_subject_unique_id = int function (gnutls_x509_crt_t cert, const(void)* id, size_t id_size);
892         alias pgnutls_x509_crt_set_issuer_unique_id = int function (gnutls_x509_crt_t cert, const(void)* id, size_t id_size);
893         alias pgnutls_x509_crt_set_subject_alternative_name = int function (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(char)* data_string);
894         alias pgnutls_x509_crt_set_subject_alt_name = int function (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(void)* data, uint data_size, uint flags);
895         alias pgnutls_x509_crt_set_subject_alt_othername = int function (gnutls_x509_crt_t crt, const(char)* oid, const(void)* data, uint data_size, uint flags);
896         alias pgnutls_x509_crt_set_issuer_alt_name = int function (gnutls_x509_crt_t crt, gnutls_x509_subject_alt_name_t type, const(void)* data, uint data_size, uint flags);
897         alias pgnutls_x509_crt_set_issuer_alt_othername = int function (gnutls_x509_crt_t crt, const(char)* oid, const(void)* data, uint data_size, uint flags);
898         alias pgnutls_x509_crt_sign = int function (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer, gnutls_x509_privkey_t issuer_key);
899         alias pgnutls_x509_crt_sign2 = int function (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer, gnutls_x509_privkey_t issuer_key, gnutls_digest_algorithm_t dig, uint flags);
900         alias pgnutls_x509_crt_set_activation_time = int function (gnutls_x509_crt_t cert, time_t act_time);
901         alias pgnutls_x509_crt_set_expiration_time = int function (gnutls_x509_crt_t cert, time_t exp_time);
902         alias pgnutls_x509_crt_set_serial = int function (gnutls_x509_crt_t cert, const(void)* serial, size_t serial_size);
903         alias pgnutls_x509_crt_set_subject_key_id = int function (gnutls_x509_crt_t cert, const(void)* id, size_t id_size);
904         alias pgnutls_x509_crt_set_proxy_dn = int function (gnutls_x509_crt_t crt, gnutls_x509_crt_t eecrt, uint raw_flag, const(void)* name, uint sizeof_name);
905         alias pgnutls_x509_crt_set_proxy = int function (gnutls_x509_crt_t crt, int pathLenConstraint, const(char)* policyLanguage, const(char)* policy, size_t sizeof_policy);
906         alias pgnutls_x509_crt_print = int function (gnutls_x509_crt_t cert, gnutls_certificate_print_formats_t format, gnutls_datum_t* out_);
907         alias pgnutls_x509_crl_print = int function (gnutls_x509_crl_t crl, gnutls_certificate_print_formats_t format, gnutls_datum_t* out_);
908         alias pgnutls_x509_crt_get_raw_issuer_dn = int function (gnutls_x509_crt_t cert, gnutls_datum_t* start);
909         alias pgnutls_x509_crt_get_raw_dn = int function (gnutls_x509_crt_t cert, gnutls_datum_t* start);
910         alias pgnutls_x509_rdn_get = int function (const(gnutls_datum_t)* idn, char* buf, size_t* sizeof_buf);
911 
912         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
913             alias pgnutls_x509_rdn_get2 = int function (const(gnutls_datum_t)* idn, gnutls_datum_t* str, uint flags);
914 
915         alias pgnutls_x509_rdn_get_oid = int function (const(gnutls_datum_t)* idn, uint indx, void* buf, size_t* sizeof_buf);
916         alias pgnutls_x509_rdn_get_by_oid = int function (const(gnutls_datum_t)* idn, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* sizeof_buf);
917         alias pgnutls_x509_crt_get_subject = int function (gnutls_x509_crt_t cert, gnutls_x509_dn_t* dn);
918         alias pgnutls_x509_crt_get_issuer = int function (gnutls_x509_crt_t cert, gnutls_x509_dn_t* dn);
919         alias pgnutls_x509_dn_get_rdn_ava = int function (gnutls_x509_dn_t dn, int irdn, int iava, gnutls_x509_ava_st* ava);
920         alias pgnutls_x509_dn_get_str = int function (gnutls_x509_dn_t dn, gnutls_datum_t* str);
921 
922         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
923             alias pgnutls_x509_dn_get_str2 = int function (gnutls_x509_dn_t dn, gnutls_datum_t* str, uint flags);
924 
925         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_3)
926             alias pgnutls_x509_dn_set_str = int function (gnutls_x509_dn_t dn, const(char)* str, const(char*)* err);
927 
928         alias pgnutls_x509_dn_init = int function (gnutls_x509_dn_t* dn);
929         alias pgnutls_x509_dn_import = int function (gnutls_x509_dn_t dn, const(gnutls_datum_t)* data);
930         alias pgnutls_x509_dn_export = int function (gnutls_x509_dn_t dn, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
931         alias pgnutls_x509_dn_export2 = int function (gnutls_x509_dn_t dn, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
932         alias pgnutls_x509_dn_deinit = void function (gnutls_x509_dn_t dn);
933         alias pgnutls_x509_crl_init = int function (gnutls_x509_crl_t* crl);
934         alias pgnutls_x509_crl_deinit = void function (gnutls_x509_crl_t crl);
935         alias pgnutls_x509_crl_import = int function (gnutls_x509_crl_t crl, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format);
936         alias pgnutls_x509_crl_export = int function (gnutls_x509_crl_t crl, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
937         alias pgnutls_x509_crl_export2 = int function (gnutls_x509_crl_t crl, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
938         alias pgnutls_x509_crl_get_raw_issuer_dn = int function (gnutls_x509_crl_t crl, gnutls_datum_t* dn);
939         alias pgnutls_x509_crl_get_issuer_dn = int function (gnutls_x509_crl_t crl, char* buf, size_t* sizeof_buf);
940         alias pgnutls_x509_crl_get_issuer_dn2 = int function (gnutls_x509_crl_t crl, gnutls_datum_t* dn);
941 
942         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
943             alias pgnutls_x509_crl_get_issuer_dn3 = int function (gnutls_x509_crl_t crl, gnutls_datum_t* dn, uint flags);
944 
945         alias pgnutls_x509_crl_get_issuer_dn_by_oid = int function (gnutls_x509_crl_t crl, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* sizeof_buf);
946         alias pgnutls_x509_crl_get_dn_oid = int function (gnutls_x509_crl_t crl, uint indx, void* oid, size_t* sizeof_oid);
947         alias pgnutls_x509_crl_get_signature_algorithm = int function (gnutls_x509_crl_t crl);
948         alias pgnutls_x509_crl_get_signature = int function (gnutls_x509_crl_t crl, char* sig, size_t* sizeof_sig);
949         alias pgnutls_x509_crl_get_version = int function (gnutls_x509_crl_t crl);
950         alias pgnutls_x509_crl_get_signature_oid = int function (gnutls_x509_crl_t crl, char* oid, size_t* oid_size);
951         alias pgnutls_x509_crl_get_this_update = time_t function (gnutls_x509_crl_t crl);
952         alias pgnutls_x509_crl_get_next_update = time_t function (gnutls_x509_crl_t crl);
953         alias pgnutls_x509_crl_get_crt_count = int function (gnutls_x509_crl_t crl);
954         alias pgnutls_x509_crl_get_crt_serial = int function (gnutls_x509_crl_t crl, uint indx, ubyte* serial, size_t* serial_size, time_t* t);
955         alias pgnutls_x509_crl_iter_crt_serial = int function (gnutls_x509_crl_t crl, gnutls_x509_crl_iter_t*, ubyte* serial, size_t* serial_size, time_t* t);
956         alias pgnutls_x509_crl_iter_deinit = void function (gnutls_x509_crl_iter_t);
957         alias pgnutls_x509_crl_check_issuer = uint function (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer);
958         alias pgnutls_x509_crl_list_import2 = int function (gnutls_x509_crl_t** crls, uint* size, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint flags);
959         alias pgnutls_x509_crl_list_import = int function (gnutls_x509_crl_t* crls, uint* crl_max, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint flags);
960         alias pgnutls_x509_crl_set_version = int function (gnutls_x509_crl_t crl, uint version_);
961         alias pgnutls_x509_crl_set_this_update = int function (gnutls_x509_crl_t crl, time_t act_time);
962         alias pgnutls_x509_crl_set_next_update = int function (gnutls_x509_crl_t crl, time_t exp_time);
963         alias pgnutls_x509_crl_set_crt_serial = int function (gnutls_x509_crl_t crl, const(void)* serial, size_t serial_size, time_t revocation_time);
964         alias pgnutls_x509_crl_set_crt = int function (gnutls_x509_crl_t crl, gnutls_x509_crt_t crt, time_t revocation_time);
965         alias pgnutls_x509_crl_get_authority_key_id = int function (gnutls_x509_crl_t crl, void* id, size_t* id_size, uint* critical);
966         alias pgnutls_x509_crl_get_authority_key_gn_serial = int function (gnutls_x509_crl_t crl, uint seq, void* alt, size_t* alt_size, uint* alt_type, void* serial, size_t* serial_size, uint* critical);
967         alias pgnutls_x509_crl_get_number = int function (gnutls_x509_crl_t crl, void* ret, size_t* ret_size, uint* critical);
968         alias pgnutls_x509_crl_get_extension_oid = int function (gnutls_x509_crl_t crl, uint indx, void* oid, size_t* sizeof_oid);
969         alias pgnutls_x509_crl_get_extension_info = int function (gnutls_x509_crl_t crl, uint indx, void* oid, size_t* sizeof_oid, uint* critical);
970         alias pgnutls_x509_crl_get_extension_data = int function (gnutls_x509_crl_t crl, uint indx, void* data, size_t* sizeof_data);
971         alias pgnutls_x509_crl_get_extension_data2 = int function (gnutls_x509_crl_t crl, uint indx, gnutls_datum_t* data);
972         alias pgnutls_x509_crl_set_authority_key_id = int function (gnutls_x509_crl_t crl, const(void)* id, size_t id_size);
973         alias pgnutls_x509_crl_set_number = int function (gnutls_x509_crl_t crl, const(void)* nr, size_t nr_size);
974         alias pgnutls_certificate_verification_profile_get_name = const(char)* function (gnutls_certificate_verification_profiles_t id);
975         alias pgnutls_certificate_verification_profile_get_id = gnutls_certificate_verification_profiles_t function (const(char)* name);
976         alias pgnutls_x509_crt_check_issuer = uint function (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer);
977         alias pgnutls_x509_crt_list_verify = int function (const(gnutls_x509_crt_t)* cert_list, uint cert_list_length, const(gnutls_x509_crt_t)* CA_list, uint CA_list_length, const(gnutls_x509_crl_t)* CRL_list, uint CRL_list_length, uint flags, uint* verify);
978         alias pgnutls_x509_crt_verify = int function (gnutls_x509_crt_t cert, const(gnutls_x509_crt_t)* CA_list, uint CA_list_length, uint flags, uint* verify);
979         alias pgnutls_x509_crl_verify = int function (gnutls_x509_crl_t crl, const(gnutls_x509_crt_t)* CA_list, uint CA_list_length, uint flags, uint* verify);
980         alias pgnutls_x509_crt_verify_data2 = int function (gnutls_x509_crt_t crt, gnutls_sign_algorithm_t algo, uint flags, const(gnutls_datum_t)* data, const(gnutls_datum_t)* signature);
981         alias pgnutls_x509_crt_check_revocation = int function (gnutls_x509_crt_t cert, const(gnutls_x509_crl_t)* crl_list, uint crl_list_length);
982         alias pgnutls_x509_crt_get_fingerprint = int function (gnutls_x509_crt_t cert, gnutls_digest_algorithm_t algo, void* buf, size_t* buf_size);
983         alias pgnutls_x509_crt_get_key_purpose_oid = int function (gnutls_x509_crt_t cert, uint indx, void* oid, size_t* oid_size, uint* critical);
984         alias pgnutls_x509_crt_set_key_purpose_oid = int function (gnutls_x509_crt_t cert, const(void)* oid, uint critical);
985 
986         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_6)
987             alias pgnutls_x509_crt_check_key_purpose = uint function (gnutls_x509_crt_t cert, const(char)* purpose, uint flags);
988 
989         alias pgnutls_pkcs_schema_get_name = const(char)* function (uint schema);
990         alias pgnutls_pkcs_schema_get_oid = const(char)* function (uint schema);
991         alias pgnutls_x509_privkey_init = int function (gnutls_x509_privkey_t* key);
992         alias pgnutls_x509_privkey_deinit = void function (gnutls_x509_privkey_t key);
993         alias pgnutls_x509_privkey_sec_param = gnutls_sec_param_t function (gnutls_x509_privkey_t key);
994         alias pgnutls_x509_privkey_set_pin_function = void function (gnutls_x509_privkey_t key, gnutls_pin_callback_t fn, void* userdata);
995         alias pgnutls_x509_privkey_cpy = int function (gnutls_x509_privkey_t dst, gnutls_x509_privkey_t src);
996         alias pgnutls_x509_privkey_import = int function (gnutls_x509_privkey_t key, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format);
997         alias pgnutls_x509_privkey_import_pkcs8 = int function (gnutls_x509_privkey_t key, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, const(char)* password, uint flags);
998         alias pgnutls_x509_privkey_import_openssl = int function (gnutls_x509_privkey_t key, const(gnutls_datum_t)* data, const(char)* password);
999         alias pgnutls_pkcs8_info = int function (const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, uint* schema, uint* cipher, void* salt, uint* salt_size, uint* iter_count, char** oid);
1000         alias pgnutls_x509_privkey_import2 = int function (gnutls_x509_privkey_t key, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format, const(char)* password, uint flags);
1001         alias pgnutls_x509_privkey_import_rsa_raw = int function (gnutls_x509_privkey_t key, const(gnutls_datum_t)* m, const(gnutls_datum_t)* e, const(gnutls_datum_t)* d, const(gnutls_datum_t)* p, const(gnutls_datum_t)* q, const(gnutls_datum_t)* u);
1002         alias pgnutls_x509_privkey_import_rsa_raw2 = int function (gnutls_x509_privkey_t key, const(gnutls_datum_t)* m, const(gnutls_datum_t)* e, const(gnutls_datum_t)* d, const(gnutls_datum_t)* p, const(gnutls_datum_t)* q, const(gnutls_datum_t)* u, const(gnutls_datum_t)* e1, const(gnutls_datum_t)* e2);
1003         alias pgnutls_x509_privkey_import_ecc_raw = int function (gnutls_x509_privkey_t key, gnutls_ecc_curve_t curve, const(gnutls_datum_t)* x, const(gnutls_datum_t)* y, const(gnutls_datum_t)* k);
1004 
1005         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1006             alias pgnutls_x509_privkey_import_gost_raw = int function (gnutls_x509_privkey_t key, gnutls_ecc_curve_t curve, gnutls_digest_algorithm_t digest, gnutls_gost_paramset_t paramset, const(gnutls_datum_t)* x, const(gnutls_datum_t)* y, const(gnutls_datum_t)* k);
1007 
1008         alias pgnutls_x509_privkey_fix = int function (gnutls_x509_privkey_t key);
1009         alias pgnutls_x509_privkey_export_dsa_raw = int function (gnutls_x509_privkey_t key, gnutls_datum_t* p, gnutls_datum_t* q, gnutls_datum_t* g, gnutls_datum_t* y, gnutls_datum_t* x);
1010         alias pgnutls_x509_privkey_import_dsa_raw = int function (gnutls_x509_privkey_t key, const(gnutls_datum_t)* p, const(gnutls_datum_t)* q, const(gnutls_datum_t)* g, const(gnutls_datum_t)* y, const(gnutls_datum_t)* x);
1011         alias pgnutls_x509_privkey_get_pk_algorithm = int function (gnutls_x509_privkey_t key);
1012         alias pgnutls_x509_privkey_get_pk_algorithm2 = int function (gnutls_x509_privkey_t key, uint* bits);
1013 
1014         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1015         {
1016             alias pgnutls_x509_privkey_get_spki = int function (gnutls_x509_privkey_t key, gnutls_x509_spki_t spki, uint flags);
1017             alias pgnutls_x509_privkey_set_spki = int function (gnutls_x509_privkey_t key, const gnutls_x509_spki_t spki, uint flags);
1018         }
1019 
1020         alias pgnutls_x509_privkey_get_key_id = int function (gnutls_x509_privkey_t key, uint flags, ubyte* output_data, size_t* output_data_size);
1021         alias pgnutls_x509_privkey_generate = int function (gnutls_x509_privkey_t key, gnutls_pk_algorithm_t algo, uint bits, uint flags);
1022         alias pgnutls_x509_privkey_set_flags = void function (gnutls_x509_privkey_t key, uint flags);
1023         alias pgnutls_x509_privkey_generate2 = int function (gnutls_x509_privkey_t key, gnutls_pk_algorithm_t algo, uint bits, uint flags, const(gnutls_keygen_data_st)* data, uint data_size);
1024         alias pgnutls_x509_privkey_verify_seed = int function (gnutls_x509_privkey_t key, gnutls_digest_algorithm_t, const(void)* seed, size_t seed_size);
1025         alias pgnutls_x509_privkey_get_seed = int function (gnutls_x509_privkey_t key, gnutls_digest_algorithm_t*, void* seed, size_t* seed_size);
1026         alias pgnutls_x509_privkey_verify_params = int function (gnutls_x509_privkey_t key);
1027         alias pgnutls_x509_privkey_export = int function (gnutls_x509_privkey_t key, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
1028         alias pgnutls_x509_privkey_export2 = int function (gnutls_x509_privkey_t key, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
1029         alias pgnutls_x509_privkey_export_pkcs8 = int function (gnutls_x509_privkey_t key, gnutls_x509_crt_fmt_t format, const(char)* password, uint flags, void* output_data, size_t* output_data_size);
1030         alias pgnutls_x509_privkey_export2_pkcs8 = int function (gnutls_x509_privkey_t key, gnutls_x509_crt_fmt_t format, const(char)* password, uint flags, gnutls_datum_t* out_);
1031         alias pgnutls_x509_privkey_export_rsa_raw2 = int function (gnutls_x509_privkey_t key, gnutls_datum_t* m, gnutls_datum_t* e, gnutls_datum_t* d, gnutls_datum_t* p, gnutls_datum_t* q, gnutls_datum_t* u, gnutls_datum_t* e1, gnutls_datum_t* e2);
1032         alias pgnutls_x509_privkey_export_rsa_raw = int function (gnutls_x509_privkey_t key, gnutls_datum_t* m, gnutls_datum_t* e, gnutls_datum_t* d, gnutls_datum_t* p, gnutls_datum_t* q, gnutls_datum_t* u);
1033         alias pgnutls_x509_privkey_export_ecc_raw = int function (gnutls_x509_privkey_t key, gnutls_ecc_curve_t* curve, gnutls_datum_t* x, gnutls_datum_t* y, gnutls_datum_t* k);
1034 
1035         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1036             alias pgnutls_x509_privkey_export_gost_raw = int function (gnutls_x509_privkey_t key, gnutls_ecc_curve_t* curve, gnutls_digest_algorithm_t* digest, gnutls_gost_paramset_t* paramset, gnutls_datum_t* x, gnutls_datum_t* y, gnutls_datum_t* k);
1037 
1038         alias pgnutls_x509_privkey_sign_data = int function (gnutls_x509_privkey_t key, gnutls_digest_algorithm_t digest, uint flags, const(gnutls_datum_t)* data, void* signature, size_t* signature_size);
1039         alias pgnutls_x509_crq_sign = int function (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key);
1040         alias pgnutls_x509_crq_sign2 = int function (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key, gnutls_digest_algorithm_t dig, uint flags);
1041         alias pgnutls_x509_crq_print = int function (gnutls_x509_crq_t crq, gnutls_certificate_print_formats_t format, gnutls_datum_t* out_);
1042         alias pgnutls_x509_crq_verify = int function (gnutls_x509_crq_t crq, uint flags);
1043         alias pgnutls_x509_crq_init = int function (gnutls_x509_crq_t* crq);
1044         alias pgnutls_x509_crq_deinit = void function (gnutls_x509_crq_t crq);
1045         alias pgnutls_x509_crq_import = int function (gnutls_x509_crq_t crq, const(gnutls_datum_t)* data, gnutls_x509_crt_fmt_t format);
1046         alias pgnutls_x509_crq_get_private_key_usage_period = int function (gnutls_x509_crq_t cert, time_t* activation, time_t* expiration, uint* critical);
1047         alias pgnutls_x509_crq_get_dn = int function (gnutls_x509_crq_t crq, char* buf, size_t* sizeof_buf);
1048         alias pgnutls_x509_crq_get_dn2 = int function (gnutls_x509_crq_t crq, gnutls_datum_t* dn);
1049 
1050         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1051             alias pgnutls_x509_crq_get_dn3 = int function (gnutls_x509_crq_t crq, gnutls_datum_t* dn, uint flags);
1052 
1053         alias pgnutls_x509_crq_get_dn_oid = int function (gnutls_x509_crq_t crq, uint indx, void* oid, size_t* sizeof_oid);
1054         alias pgnutls_x509_crq_get_dn_by_oid = int function (gnutls_x509_crq_t crq, const(char)* oid, uint indx, uint raw_flag, void* buf, size_t* sizeof_buf);
1055         alias pgnutls_x509_crq_set_dn = int function (gnutls_x509_crq_t crq, const(char)* dn, const(char*)* err);
1056         alias pgnutls_x509_crq_set_dn_by_oid = int function (gnutls_x509_crq_t crq, const(char)* oid, uint raw_flag, const(void)* data, uint sizeof_data);
1057         alias pgnutls_x509_crq_set_version = int function (gnutls_x509_crq_t crq, uint version_);
1058         alias pgnutls_x509_crq_get_version = int function (gnutls_x509_crq_t crq);
1059         alias pgnutls_x509_crq_set_key = int function (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key);
1060 
1061         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_3)
1062             alias pgnutls_x509_crq_set_extension_by_oid = int function (gnutls_x509_crq_t crq, const(char)* oid, const(void)* buf, size_t sizeof_buf, uint critical);
1063 
1064         alias pgnutls_x509_crq_set_challenge_password = int function (gnutls_x509_crq_t crq, const(char)* pass);
1065         alias pgnutls_x509_crq_get_challenge_password = int function (gnutls_x509_crq_t crq, char* pass, size_t* sizeof_pass);
1066         alias pgnutls_x509_crq_set_attribute_by_oid = int function (gnutls_x509_crq_t crq, const(char)* oid, void* buf, size_t sizeof_buf);
1067         alias pgnutls_x509_crq_get_attribute_by_oid = int function (gnutls_x509_crq_t crq, const(char)* oid, uint indx, void* buf, size_t* sizeof_buf);
1068         alias pgnutls_x509_crq_export = int function (gnutls_x509_crq_t crq, gnutls_x509_crt_fmt_t format, void* output_data, size_t* output_data_size);
1069         alias pgnutls_x509_crq_export2 = int function (gnutls_x509_crq_t crq, gnutls_x509_crt_fmt_t format, gnutls_datum_t* out_);
1070         alias pgnutls_x509_crt_set_crq = int function (gnutls_x509_crt_t crt, gnutls_x509_crq_t crq);
1071         alias pgnutls_x509_crt_set_crq_extensions = int function (gnutls_x509_crt_t crt, gnutls_x509_crq_t crq);
1072 
1073         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
1074             alias pgnutls_x509_crt_set_crq_extension_by_oid = int function (gnutls_x509_crt_t crt, gnutls_x509_crq_t crq, const(char)* oid, uint flags);
1075 
1076         alias pgnutls_x509_crq_set_private_key_usage_period = int function (gnutls_x509_crq_t crq, time_t activation, time_t expiration);
1077         alias pgnutls_x509_crq_set_key_rsa_raw = int function (gnutls_x509_crq_t crq, const(gnutls_datum_t)* m, const(gnutls_datum_t)* e);
1078         alias pgnutls_x509_crq_set_subject_alt_name = int function (gnutls_x509_crq_t crq, gnutls_x509_subject_alt_name_t nt, const(void)* data, uint data_size, uint flags);
1079         alias pgnutls_x509_crq_set_subject_alt_othername = int function (gnutls_x509_crq_t crq, const(char)* oid, const(void)* data, uint data_size, uint flags);
1080         alias pgnutls_x509_crq_set_key_usage = int function (gnutls_x509_crq_t crq, uint usage);
1081         alias pgnutls_x509_crq_set_basic_constraints = int function (gnutls_x509_crq_t crq, uint ca, int pathLenConstraint);
1082         alias pgnutls_x509_crq_set_key_purpose_oid = int function (gnutls_x509_crq_t crq, const(void)* oid, uint critical);
1083         alias pgnutls_x509_crq_get_key_purpose_oid = int function (gnutls_x509_crq_t crq, uint indx, void* oid, size_t* sizeof_oid, uint* critical);
1084         alias pgnutls_x509_crq_get_extension_data = int function (gnutls_x509_crq_t crq, uint indx, void* data, size_t* sizeof_data);
1085         alias pgnutls_x509_crq_get_extension_data2 = int function (gnutls_x509_crq_t crq, uint indx, gnutls_datum_t* data);
1086         alias pgnutls_x509_crq_get_extension_info = int function (gnutls_x509_crq_t crq, uint indx, void* oid, size_t* sizeof_oid, uint* critical);
1087         alias pgnutls_x509_crq_get_attribute_data = int function (gnutls_x509_crq_t crq, uint indx, void* data, size_t* sizeof_data);
1088         alias pgnutls_x509_crq_get_attribute_info = int function (gnutls_x509_crq_t crq, uint indx, void* oid, size_t* sizeof_oid);
1089         alias pgnutls_x509_crq_get_pk_algorithm = int function (gnutls_x509_crq_t crq, uint* bits);
1090 
1091         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1092         {
1093             alias pgnutls_x509_crq_get_spki = int function (gnutls_x509_crq_t crq, gnutls_x509_spki_t spki, uint flags);
1094             alias pgnutls_x509_crq_set_spki = int function (gnutls_x509_crq_t crq, const gnutls_x509_spki_t spki, uint flags);
1095         }
1096 
1097         alias pgnutls_x509_crq_get_signature_oid = int function (gnutls_x509_crq_t crq, char* oid, size_t* oid_size);
1098         alias pgnutls_x509_crq_get_pk_oid = int function (gnutls_x509_crq_t crq, char* oid, size_t* oid_size);
1099         alias pgnutls_x509_crq_get_key_id = int function (gnutls_x509_crq_t crq, uint flags, ubyte* output_data, size_t* output_data_size);
1100         alias pgnutls_x509_crq_get_key_rsa_raw = int function (gnutls_x509_crq_t crq, gnutls_datum_t* m, gnutls_datum_t* e);
1101         alias pgnutls_x509_crq_get_key_usage = int function (gnutls_x509_crq_t crq, uint* key_usage, uint* critical);
1102         alias pgnutls_x509_crq_get_basic_constraints = int function (gnutls_x509_crq_t crq, uint* critical, uint* ca, int* pathlen);
1103         alias pgnutls_x509_crq_get_subject_alt_name = int function (gnutls_x509_crq_t crq, uint seq, void* ret, size_t* ret_size, uint* ret_type, uint* critical);
1104         alias pgnutls_x509_crq_get_subject_alt_othername_oid = int function (gnutls_x509_crq_t crq, uint seq, void* ret, size_t* ret_size);
1105         alias pgnutls_x509_crq_get_extension_by_oid = int function (gnutls_x509_crq_t crq, const(char)* oid, uint indx, void* buf, size_t* sizeof_buf, uint* critical);
1106 
1107         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
1108         {
1109             alias pgnutls_x509_crq_get_tlsfeatures = int function (gnutls_x509_crq_t crq, gnutls_x509_tlsfeatures_t features, uint flags, uint* critical);
1110             alias pgnutls_x509_crq_set_tlsfeatures = int function (gnutls_x509_crq_t crq, gnutls_x509_tlsfeatures_t features);
1111         }
1112 
1113         alias pgnutls_x509_crt_get_extension_by_oid2 = int function (gnutls_x509_crt_t cert, const(char)* oid, uint indx, gnutls_datum_t* output, uint* critical);
1114         alias pgnutls_x509_trust_list_init = int function (gnutls_x509_trust_list_t* list, uint size);
1115         alias pgnutls_x509_trust_list_deinit = void function (gnutls_x509_trust_list_t list, uint all);
1116         alias pgnutls_x509_trust_list_get_issuer = int function (gnutls_x509_trust_list_t list, gnutls_x509_crt_t cert, gnutls_x509_crt_t* issuer, uint flags);
1117         alias pgnutls_x509_trust_list_get_issuer_by_dn = int function (gnutls_x509_trust_list_t list, const(gnutls_datum_t)* dn, gnutls_x509_crt_t* issuer, uint flags);
1118         alias pgnutls_x509_trust_list_get_issuer_by_subject_key_id = int function (gnutls_x509_trust_list_t list, const(gnutls_datum_t)* dn, const(gnutls_datum_t)* spki, gnutls_x509_crt_t* issuer, uint flags);
1119         alias pgnutls_x509_trust_list_add_cas = int function (gnutls_x509_trust_list_t list, const(gnutls_x509_crt_t)* clist, uint clist_size, uint flags);
1120         alias pgnutls_x509_trust_list_remove_cas = int function (gnutls_x509_trust_list_t list, const(gnutls_x509_crt_t)* clist, uint clist_size);
1121         alias pgnutls_x509_trust_list_add_named_crt = int function (gnutls_x509_trust_list_t list, gnutls_x509_crt_t cert, const(void)* name, size_t name_size, uint flags);
1122         alias pgnutls_x509_trust_list_add_crls = int function (gnutls_x509_trust_list_t list, const(gnutls_x509_crl_t)* crl_list, uint crl_size, uint flags, uint verification_flags);
1123         alias pgnutls_x509_trust_list_iter_get_ca = int function (gnutls_x509_trust_list_t list, gnutls_x509_trust_list_iter_t* iter, gnutls_x509_crt_t* crt);
1124         alias pgnutls_x509_trust_list_iter_deinit = void function (gnutls_x509_trust_list_iter_t iter);
1125         alias pgnutls_x509_trust_list_verify_named_crt = int function (gnutls_x509_trust_list_t list, gnutls_x509_crt_t cert, const(void)* name, size_t name_size, uint flags, uint* verify, int function () func);
1126         alias pgnutls_x509_trust_list_verify_crt2 = int function (gnutls_x509_trust_list_t list, gnutls_x509_crt_t* cert_list, uint cert_list_size, gnutls_typed_vdata_st* data, uint elements, uint flags, uint* voutput, int function () func);
1127         alias pgnutls_x509_trust_list_verify_crt = int function (gnutls_x509_trust_list_t list, gnutls_x509_crt_t* cert_list, uint cert_list_size, uint flags, uint* verify, int function () func);
1128         alias pgnutls_x509_trust_list_add_trust_mem = int function (gnutls_x509_trust_list_t list, const(gnutls_datum_t)* cas, const(gnutls_datum_t)* crls, gnutls_x509_crt_fmt_t type, uint tl_flags, uint tl_vflags);
1129         alias pgnutls_x509_trust_list_add_trust_file = int function (gnutls_x509_trust_list_t list, const(char)* ca_file, const(char)* crl_file, gnutls_x509_crt_fmt_t type, uint tl_flags, uint tl_vflags);
1130         alias pgnutls_x509_trust_list_add_trust_dir = int function (gnutls_x509_trust_list_t list, const(char)* ca_dir, const(char)* crl_dir, gnutls_x509_crt_fmt_t type, uint tl_flags, uint tl_vflags);
1131         alias pgnutls_x509_trust_list_remove_trust_file = int function (gnutls_x509_trust_list_t list, const(char)* ca_file, gnutls_x509_crt_fmt_t type);
1132         alias pgnutls_x509_trust_list_remove_trust_mem = int function (gnutls_x509_trust_list_t list, const(gnutls_datum_t)* cas, gnutls_x509_crt_fmt_t type);
1133         alias pgnutls_x509_trust_list_add_system_trust = int function (gnutls_x509_trust_list_t list, uint tl_flags, uint tl_vflags);
1134         alias pgnutls_certificate_set_trust_list = void function (gnutls_certificate_credentials_t res, gnutls_x509_trust_list_t tlist, uint flags);
1135         alias pgnutls_certificate_get_trust_list = void function (gnutls_certificate_credentials_t res, gnutls_x509_trust_list_t* tlist);
1136         alias pgnutls_x509_ext_deinit = void function (gnutls_x509_ext_st* ext);
1137         alias pgnutls_x509_ext_print = int function (gnutls_x509_ext_st* exts, uint exts_size, gnutls_certificate_print_formats_t format, gnutls_datum_t* out_);
1138     }
1139 
1140     __gshared
1141     {
1142         pgnutls_x509_crt_init gnutls_x509_crt_init;
1143         pgnutls_x509_crt_deinit gnutls_x509_crt_deinit;
1144 
1145         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1146             pgnutls_x509_crt_set_flags gnutls_x509_crt_set_flags;
1147 
1148         pgnutls_x509_crt_equals gnutls_x509_crt_equals;
1149         pgnutls_x509_crt_equals2 gnutls_x509_crt_equals2;
1150         pgnutls_x509_crt_import gnutls_x509_crt_import;
1151         pgnutls_x509_crt_list_import2 gnutls_x509_crt_list_import2;
1152         pgnutls_x509_crt_list_import gnutls_x509_crt_list_import;
1153         pgnutls_x509_crt_import_url gnutls_x509_crt_import_url;
1154 
1155         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1156             pgnutls_x509_crt_list_import_url gnutls_x509_crt_list_import_url;
1157 
1158         pgnutls_x509_crt_export gnutls_x509_crt_export;
1159         pgnutls_x509_crt_export2 gnutls_x509_crt_export2;
1160         pgnutls_x509_crt_get_private_key_usage_period gnutls_x509_crt_get_private_key_usage_period;
1161         pgnutls_x509_crt_get_issuer_dn gnutls_x509_crt_get_issuer_dn;
1162         pgnutls_x509_crt_get_issuer_dn2 gnutls_x509_crt_get_issuer_dn2;
1163 
1164         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1165             pgnutls_x509_crt_get_issuer_dn3 gnutls_x509_crt_get_issuer_dn3;
1166 
1167         pgnutls_x509_crt_get_issuer_dn_oid gnutls_x509_crt_get_issuer_dn_oid;
1168         pgnutls_x509_crt_get_issuer_dn_by_oid gnutls_x509_crt_get_issuer_dn_by_oid;
1169         pgnutls_x509_crt_get_dn gnutls_x509_crt_get_dn;
1170         pgnutls_x509_crt_get_dn2 gnutls_x509_crt_get_dn2;
1171 
1172         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1173             pgnutls_x509_crt_get_dn3 gnutls_x509_crt_get_dn3;
1174 
1175         pgnutls_x509_crt_get_dn_oid gnutls_x509_crt_get_dn_oid;
1176         pgnutls_x509_crt_get_dn_by_oid gnutls_x509_crt_get_dn_by_oid;
1177         pgnutls_x509_crt_check_hostname gnutls_x509_crt_check_hostname;
1178         pgnutls_x509_crt_check_hostname2 gnutls_x509_crt_check_hostname2;
1179         pgnutls_x509_crt_check_email gnutls_x509_crt_check_email;
1180 
1181         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1182             pgnutls_x509_crt_check_ip gnutls_x509_crt_check_ip;
1183 
1184         pgnutls_x509_crt_get_signature_algorithm gnutls_x509_crt_get_signature_algorithm;
1185         pgnutls_x509_crt_get_signature gnutls_x509_crt_get_signature;
1186         pgnutls_x509_crt_get_version gnutls_x509_crt_get_version;
1187         pgnutls_x509_crt_get_pk_oid gnutls_x509_crt_get_pk_oid;
1188         pgnutls_x509_crt_get_signature_oid gnutls_x509_crt_get_signature_oid;
1189         pgnutls_x509_crt_get_key_id gnutls_x509_crt_get_key_id;
1190         pgnutls_x509_crt_set_private_key_usage_period gnutls_x509_crt_set_private_key_usage_period;
1191         pgnutls_x509_crt_set_authority_key_id gnutls_x509_crt_set_authority_key_id;
1192         pgnutls_x509_crt_get_authority_key_id gnutls_x509_crt_get_authority_key_id;
1193         pgnutls_x509_crt_get_authority_key_gn_serial gnutls_x509_crt_get_authority_key_gn_serial;
1194         pgnutls_x509_crt_get_subject_key_id gnutls_x509_crt_get_subject_key_id;
1195         pgnutls_x509_crt_get_subject_unique_id gnutls_x509_crt_get_subject_unique_id;
1196         pgnutls_x509_crt_get_issuer_unique_id gnutls_x509_crt_get_issuer_unique_id;
1197         pgnutls_x509_crt_set_pin_function gnutls_x509_crt_set_pin_function;
1198         pgnutls_x509_crt_get_authority_info_access gnutls_x509_crt_get_authority_info_access;
1199         pgnutls_x509_name_constraints_check gnutls_x509_name_constraints_check;
1200         pgnutls_x509_name_constraints_check_crt gnutls_x509_name_constraints_check_crt;
1201         pgnutls_x509_name_constraints_init gnutls_x509_name_constraints_init;
1202         pgnutls_x509_name_constraints_deinit gnutls_x509_name_constraints_deinit;
1203         pgnutls_x509_crt_get_name_constraints gnutls_x509_crt_get_name_constraints;
1204         pgnutls_x509_name_constraints_add_permitted gnutls_x509_name_constraints_add_permitted;
1205         pgnutls_x509_name_constraints_add_excluded gnutls_x509_name_constraints_add_excluded;
1206         pgnutls_x509_crt_set_name_constraints gnutls_x509_crt_set_name_constraints;
1207         pgnutls_x509_name_constraints_get_permitted gnutls_x509_name_constraints_get_permitted;
1208         pgnutls_x509_name_constraints_get_excluded gnutls_x509_name_constraints_get_excluded;
1209 
1210         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_4)
1211             pgnutls_x509_cidr_to_rfc5280 gnutls_x509_cidr_to_rfc5280;
1212 
1213         pgnutls_x509_crt_get_crl_dist_points gnutls_x509_crt_get_crl_dist_points;
1214         pgnutls_x509_crt_set_crl_dist_points2 gnutls_x509_crt_set_crl_dist_points2;
1215         pgnutls_x509_crt_set_crl_dist_points gnutls_x509_crt_set_crl_dist_points;
1216         pgnutls_x509_crt_cpy_crl_dist_points gnutls_x509_crt_cpy_crl_dist_points;
1217         pgnutls_x509_crl_sign gnutls_x509_crl_sign;
1218         pgnutls_x509_crl_sign2 gnutls_x509_crl_sign2;
1219         pgnutls_x509_crt_get_activation_time gnutls_x509_crt_get_activation_time;
1220         pgnutls_x509_crt_get_expiration_time gnutls_x509_crt_get_expiration_time;
1221         pgnutls_x509_crt_get_serial gnutls_x509_crt_get_serial;
1222 
1223         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1224         {
1225             pgnutls_x509_spki_init gnutls_x509_spki_init;
1226             pgnutls_x509_spki_deinit gnutls_x509_spki_deinit;
1227         }
1228 
1229         pgnutls_x509_spki_get_rsa_pss_params gnutls_x509_spki_get_rsa_pss_params;
1230         pgnutls_x509_spki_set_rsa_pss_params gnutls_x509_spki_set_rsa_pss_params;
1231         pgnutls_x509_crt_get_pk_algorithm gnutls_x509_crt_get_pk_algorithm;
1232 
1233         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1234         {
1235             pgnutls_x509_crt_set_spki gnutls_x509_crt_set_spki;
1236             pgnutls_x509_crt_get_spki gnutls_x509_crt_get_spki;
1237         }
1238 
1239         pgnutls_x509_crt_get_pk_rsa_raw gnutls_x509_crt_get_pk_rsa_raw;
1240         pgnutls_x509_crt_get_pk_dsa_raw gnutls_x509_crt_get_pk_dsa_raw;
1241         pgnutls_x509_crt_get_pk_ecc_raw gnutls_x509_crt_get_pk_ecc_raw;
1242 
1243         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1244             pgnutls_x509_crt_get_pk_gost_raw gnutls_x509_crt_get_pk_gost_raw;
1245 
1246         pgnutls_x509_crt_get_subject_alt_name gnutls_x509_crt_get_subject_alt_name;
1247         pgnutls_x509_crt_get_subject_alt_name2 gnutls_x509_crt_get_subject_alt_name2;
1248         pgnutls_x509_crt_get_subject_alt_othername_oid gnutls_x509_crt_get_subject_alt_othername_oid;
1249         pgnutls_x509_crt_get_issuer_alt_name gnutls_x509_crt_get_issuer_alt_name;
1250         pgnutls_x509_crt_get_issuer_alt_name2 gnutls_x509_crt_get_issuer_alt_name2;
1251         pgnutls_x509_crt_get_issuer_alt_othername_oid gnutls_x509_crt_get_issuer_alt_othername_oid;
1252         pgnutls_x509_crt_get_ca_status gnutls_x509_crt_get_ca_status;
1253         pgnutls_x509_crt_get_basic_constraints gnutls_x509_crt_get_basic_constraints;
1254         pgnutls_x509_crt_get_key_usage gnutls_x509_crt_get_key_usage;
1255         pgnutls_x509_crt_set_key_usage gnutls_x509_crt_set_key_usage;
1256         pgnutls_x509_crt_set_authority_info_access gnutls_x509_crt_set_authority_info_access;
1257 
1258         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1259         {
1260             pgnutls_x509_crt_get_inhibit_anypolicy gnutls_x509_crt_get_inhibit_anypolicy;
1261             pgnutls_x509_crt_set_inhibit_anypolicy gnutls_x509_crt_set_inhibit_anypolicy;
1262         }
1263 
1264         pgnutls_x509_crt_get_proxy gnutls_x509_crt_get_proxy;
1265 
1266         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
1267         {
1268             pgnutls_x509_tlsfeatures_init gnutls_x509_tlsfeatures_init;
1269             pgnutls_x509_tlsfeatures_deinit gnutls_x509_tlsfeatures_deinit;
1270             pgnutls_x509_tlsfeatures_get gnutls_x509_tlsfeatures_get;
1271             pgnutls_x509_crt_set_tlsfeatures gnutls_x509_crt_set_tlsfeatures;
1272             pgnutls_x509_crt_get_tlsfeatures gnutls_x509_crt_get_tlsfeatures;
1273         }
1274 
1275         pgnutls_x509_tlsfeatures_check_crt gnutls_x509_tlsfeatures_check_crt;
1276         pgnutls_x509_policy_release gnutls_x509_policy_release;
1277         pgnutls_x509_crt_get_policy gnutls_x509_crt_get_policy;
1278         pgnutls_x509_crt_set_policy gnutls_x509_crt_set_policy;
1279         pgnutls_x509_dn_oid_known gnutls_x509_dn_oid_known;
1280         pgnutls_x509_dn_oid_name gnutls_x509_dn_oid_name;
1281         pgnutls_x509_crt_get_extension_oid gnutls_x509_crt_get_extension_oid;
1282         pgnutls_x509_crt_get_extension_by_oid gnutls_x509_crt_get_extension_by_oid;
1283         pgnutls_x509_crq_get_signature_algorithm gnutls_x509_crq_get_signature_algorithm;
1284         pgnutls_x509_crq_get_extension_by_oid2 gnutls_x509_crq_get_extension_by_oid2;
1285         pgnutls_x509_crt_get_extension_info gnutls_x509_crt_get_extension_info;
1286         pgnutls_x509_crt_get_extension_data gnutls_x509_crt_get_extension_data;
1287         pgnutls_x509_crt_get_extension_data2 gnutls_x509_crt_get_extension_data2;
1288         pgnutls_x509_crt_set_extension_by_oid gnutls_x509_crt_set_extension_by_oid;
1289         pgnutls_x509_crt_set_dn gnutls_x509_crt_set_dn;
1290         pgnutls_x509_crt_set_dn_by_oid gnutls_x509_crt_set_dn_by_oid;
1291         pgnutls_x509_crt_set_issuer_dn_by_oid gnutls_x509_crt_set_issuer_dn_by_oid;
1292         pgnutls_x509_crt_set_issuer_dn gnutls_x509_crt_set_issuer_dn;
1293         pgnutls_x509_crt_set_version gnutls_x509_crt_set_version;
1294         pgnutls_x509_crt_set_key gnutls_x509_crt_set_key;
1295         pgnutls_x509_crt_set_ca_status gnutls_x509_crt_set_ca_status;
1296         pgnutls_x509_crt_set_basic_constraints gnutls_x509_crt_set_basic_constraints;
1297         pgnutls_x509_crt_set_subject_unique_id gnutls_x509_crt_set_subject_unique_id;
1298         pgnutls_x509_crt_set_issuer_unique_id gnutls_x509_crt_set_issuer_unique_id;
1299         pgnutls_x509_crt_set_subject_alternative_name gnutls_x509_crt_set_subject_alternative_name;
1300         pgnutls_x509_crt_set_subject_alt_name gnutls_x509_crt_set_subject_alt_name;
1301         pgnutls_x509_crt_set_subject_alt_othername gnutls_x509_crt_set_subject_alt_othername;
1302         pgnutls_x509_crt_set_issuer_alt_name gnutls_x509_crt_set_issuer_alt_name;
1303         pgnutls_x509_crt_set_issuer_alt_othername gnutls_x509_crt_set_issuer_alt_othername;
1304         pgnutls_x509_crt_sign gnutls_x509_crt_sign;
1305         pgnutls_x509_crt_sign2 gnutls_x509_crt_sign2;
1306         pgnutls_x509_crt_set_activation_time gnutls_x509_crt_set_activation_time;
1307         pgnutls_x509_crt_set_expiration_time gnutls_x509_crt_set_expiration_time;
1308         pgnutls_x509_crt_set_serial gnutls_x509_crt_set_serial;
1309         pgnutls_x509_crt_set_subject_key_id gnutls_x509_crt_set_subject_key_id;
1310         pgnutls_x509_crt_set_proxy_dn gnutls_x509_crt_set_proxy_dn;
1311         pgnutls_x509_crt_set_proxy gnutls_x509_crt_set_proxy;
1312         pgnutls_x509_crt_print gnutls_x509_crt_print;
1313         pgnutls_x509_crl_print gnutls_x509_crl_print;
1314         pgnutls_x509_crt_get_raw_issuer_dn gnutls_x509_crt_get_raw_issuer_dn;
1315         pgnutls_x509_crt_get_raw_dn gnutls_x509_crt_get_raw_dn;
1316         pgnutls_x509_rdn_get gnutls_x509_rdn_get;
1317 
1318         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1319             pgnutls_x509_rdn_get2 gnutls_x509_rdn_get2;
1320 
1321         pgnutls_x509_rdn_get_oid gnutls_x509_rdn_get_oid;
1322         pgnutls_x509_rdn_get_by_oid gnutls_x509_rdn_get_by_oid;
1323         pgnutls_x509_crt_get_subject gnutls_x509_crt_get_subject;
1324         pgnutls_x509_crt_get_issuer gnutls_x509_crt_get_issuer;
1325         pgnutls_x509_dn_get_rdn_ava gnutls_x509_dn_get_rdn_ava;
1326         pgnutls_x509_dn_get_str gnutls_x509_dn_get_str;
1327 
1328         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1329             pgnutls_x509_dn_get_str2 gnutls_x509_dn_get_str2;
1330 
1331         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_3)
1332             pgnutls_x509_dn_set_str gnutls_x509_dn_set_str;
1333 
1334         pgnutls_x509_dn_init gnutls_x509_dn_init;
1335         pgnutls_x509_dn_import gnutls_x509_dn_import;
1336         pgnutls_x509_dn_export gnutls_x509_dn_export;
1337         pgnutls_x509_dn_export2 gnutls_x509_dn_export2;
1338         pgnutls_x509_dn_deinit gnutls_x509_dn_deinit;
1339         pgnutls_x509_crl_init gnutls_x509_crl_init;
1340         pgnutls_x509_crl_deinit gnutls_x509_crl_deinit;
1341         pgnutls_x509_crl_import gnutls_x509_crl_import;
1342         pgnutls_x509_crl_export gnutls_x509_crl_export;
1343         pgnutls_x509_crl_export2 gnutls_x509_crl_export2;
1344         pgnutls_x509_crl_get_raw_issuer_dn gnutls_x509_crl_get_raw_issuer_dn;
1345         pgnutls_x509_crl_get_issuer_dn gnutls_x509_crl_get_issuer_dn;
1346         pgnutls_x509_crl_get_issuer_dn2 gnutls_x509_crl_get_issuer_dn2;
1347 
1348         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1349             pgnutls_x509_crl_get_issuer_dn3 gnutls_x509_crl_get_issuer_dn3;
1350 
1351         pgnutls_x509_crl_get_issuer_dn_by_oid gnutls_x509_crl_get_issuer_dn_by_oid;
1352         pgnutls_x509_crl_get_dn_oid gnutls_x509_crl_get_dn_oid;
1353         pgnutls_x509_crl_get_signature_algorithm gnutls_x509_crl_get_signature_algorithm;
1354         pgnutls_x509_crl_get_signature gnutls_x509_crl_get_signature;
1355         pgnutls_x509_crl_get_version gnutls_x509_crl_get_version;
1356         pgnutls_x509_crl_get_signature_oid gnutls_x509_crl_get_signature_oid;
1357         pgnutls_x509_crl_get_this_update gnutls_x509_crl_get_this_update;
1358         pgnutls_x509_crl_get_next_update gnutls_x509_crl_get_next_update;
1359         pgnutls_x509_crl_get_crt_count gnutls_x509_crl_get_crt_count;
1360         pgnutls_x509_crl_get_crt_serial gnutls_x509_crl_get_crt_serial;
1361         pgnutls_x509_crl_iter_crt_serial gnutls_x509_crl_iter_crt_serial;
1362         pgnutls_x509_crl_iter_deinit gnutls_x509_crl_iter_deinit;
1363         pgnutls_x509_crl_check_issuer gnutls_x509_crl_check_issuer;
1364         pgnutls_x509_crl_list_import2 gnutls_x509_crl_list_import2;
1365         pgnutls_x509_crl_list_import gnutls_x509_crl_list_import;
1366         pgnutls_x509_crl_set_version gnutls_x509_crl_set_version;
1367         pgnutls_x509_crl_set_this_update gnutls_x509_crl_set_this_update;
1368         pgnutls_x509_crl_set_next_update gnutls_x509_crl_set_next_update;
1369         pgnutls_x509_crl_set_crt_serial gnutls_x509_crl_set_crt_serial;
1370         pgnutls_x509_crl_set_crt gnutls_x509_crl_set_crt;
1371         pgnutls_x509_crl_get_authority_key_id gnutls_x509_crl_get_authority_key_id;
1372         pgnutls_x509_crl_get_authority_key_gn_serial gnutls_x509_crl_get_authority_key_gn_serial;
1373         pgnutls_x509_crl_get_number gnutls_x509_crl_get_number;
1374         pgnutls_x509_crl_get_extension_oid gnutls_x509_crl_get_extension_oid;
1375         pgnutls_x509_crl_get_extension_info gnutls_x509_crl_get_extension_info;
1376         pgnutls_x509_crl_get_extension_data gnutls_x509_crl_get_extension_data;
1377         pgnutls_x509_crl_get_extension_data2 gnutls_x509_crl_get_extension_data2;
1378         pgnutls_x509_crl_set_authority_key_id gnutls_x509_crl_set_authority_key_id;
1379         pgnutls_x509_crl_set_number gnutls_x509_crl_set_number;
1380         pgnutls_certificate_verification_profile_get_name gnutls_certificate_verification_profile_get_name;
1381         pgnutls_certificate_verification_profile_get_id gnutls_certificate_verification_profile_get_id;
1382         pgnutls_x509_crt_check_issuer gnutls_x509_crt_check_issuer;
1383         pgnutls_x509_crt_list_verify gnutls_x509_crt_list_verify;
1384         pgnutls_x509_crt_verify gnutls_x509_crt_verify;
1385         pgnutls_x509_crl_verify gnutls_x509_crl_verify;
1386         pgnutls_x509_crt_verify_data2 gnutls_x509_crt_verify_data2;
1387         pgnutls_x509_crt_check_revocation gnutls_x509_crt_check_revocation;
1388         pgnutls_x509_crt_get_fingerprint gnutls_x509_crt_get_fingerprint;
1389         pgnutls_x509_crt_get_key_purpose_oid gnutls_x509_crt_get_key_purpose_oid;
1390         pgnutls_x509_crt_set_key_purpose_oid gnutls_x509_crt_set_key_purpose_oid;
1391 
1392         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_6)
1393             pgnutls_x509_crt_check_key_purpose gnutls_x509_crt_check_key_purpose;
1394 
1395         pgnutls_pkcs_schema_get_name gnutls_pkcs_schema_get_name;
1396         pgnutls_pkcs_schema_get_oid gnutls_pkcs_schema_get_oid;
1397         pgnutls_x509_privkey_init gnutls_x509_privkey_init;
1398         pgnutls_x509_privkey_deinit gnutls_x509_privkey_deinit;
1399         pgnutls_x509_privkey_sec_param gnutls_x509_privkey_sec_param;
1400         pgnutls_x509_privkey_set_pin_function gnutls_x509_privkey_set_pin_function;
1401         pgnutls_x509_privkey_cpy gnutls_x509_privkey_cpy;
1402         pgnutls_x509_privkey_import gnutls_x509_privkey_import;
1403         pgnutls_x509_privkey_import_pkcs8 gnutls_x509_privkey_import_pkcs8;
1404         pgnutls_x509_privkey_import_openssl gnutls_x509_privkey_import_openssl;
1405         pgnutls_pkcs8_info gnutls_pkcs8_info;
1406         pgnutls_x509_privkey_import2 gnutls_x509_privkey_import2;
1407         pgnutls_x509_privkey_import_rsa_raw gnutls_x509_privkey_import_rsa_raw;
1408         pgnutls_x509_privkey_import_rsa_raw2 gnutls_x509_privkey_import_rsa_raw2;
1409         pgnutls_x509_privkey_import_ecc_raw gnutls_x509_privkey_import_ecc_raw;
1410 
1411         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1412             pgnutls_x509_privkey_import_gost_raw gnutls_x509_privkey_import_gost_raw;
1413 
1414         pgnutls_x509_privkey_fix gnutls_x509_privkey_fix;
1415         pgnutls_x509_privkey_export_dsa_raw gnutls_x509_privkey_export_dsa_raw;
1416         pgnutls_x509_privkey_import_dsa_raw gnutls_x509_privkey_import_dsa_raw;
1417         pgnutls_x509_privkey_get_pk_algorithm gnutls_x509_privkey_get_pk_algorithm;
1418         pgnutls_x509_privkey_get_pk_algorithm2 gnutls_x509_privkey_get_pk_algorithm2;
1419 
1420         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1421         {
1422             pgnutls_x509_privkey_get_spki gnutls_x509_privkey_get_spki;
1423             pgnutls_x509_privkey_set_spki gnutls_x509_privkey_set_spki;
1424         }
1425 
1426         pgnutls_x509_privkey_get_key_id gnutls_x509_privkey_get_key_id;
1427         pgnutls_x509_privkey_generate gnutls_x509_privkey_generate;
1428         pgnutls_x509_privkey_set_flags gnutls_x509_privkey_set_flags;
1429         pgnutls_x509_privkey_generate2 gnutls_x509_privkey_generate2;
1430         pgnutls_x509_privkey_verify_seed gnutls_x509_privkey_verify_seed;
1431         pgnutls_x509_privkey_get_seed gnutls_x509_privkey_get_seed;
1432         pgnutls_x509_privkey_verify_params gnutls_x509_privkey_verify_params;
1433         pgnutls_x509_privkey_export gnutls_x509_privkey_export;
1434         pgnutls_x509_privkey_export2 gnutls_x509_privkey_export2;
1435         pgnutls_x509_privkey_export_pkcs8 gnutls_x509_privkey_export_pkcs8;
1436         pgnutls_x509_privkey_export2_pkcs8 gnutls_x509_privkey_export2_pkcs8;
1437         pgnutls_x509_privkey_export_rsa_raw2 gnutls_x509_privkey_export_rsa_raw2;
1438         pgnutls_x509_privkey_export_rsa_raw gnutls_x509_privkey_export_rsa_raw;
1439         pgnutls_x509_privkey_export_ecc_raw gnutls_x509_privkey_export_ecc_raw;
1440 
1441         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1442             pgnutls_x509_privkey_export_gost_raw gnutls_x509_privkey_export_gost_raw;
1443 
1444         pgnutls_x509_privkey_sign_data gnutls_x509_privkey_sign_data;
1445         pgnutls_x509_crq_sign gnutls_x509_crq_sign;
1446         pgnutls_x509_crq_sign2 gnutls_x509_crq_sign2;
1447         pgnutls_x509_crq_print gnutls_x509_crq_print;
1448         pgnutls_x509_crq_verify gnutls_x509_crq_verify;
1449         pgnutls_x509_crq_init gnutls_x509_crq_init;
1450         pgnutls_x509_crq_deinit gnutls_x509_crq_deinit;
1451         pgnutls_x509_crq_import gnutls_x509_crq_import;
1452         pgnutls_x509_crq_get_private_key_usage_period gnutls_x509_crq_get_private_key_usage_period;
1453         pgnutls_x509_crq_get_dn gnutls_x509_crq_get_dn;
1454         pgnutls_x509_crq_get_dn2 gnutls_x509_crq_get_dn2;
1455 
1456         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1457             pgnutls_x509_crq_get_dn3 gnutls_x509_crq_get_dn3;
1458 
1459         pgnutls_x509_crq_get_dn_oid gnutls_x509_crq_get_dn_oid;
1460         pgnutls_x509_crq_get_dn_by_oid gnutls_x509_crq_get_dn_by_oid;
1461         pgnutls_x509_crq_set_dn gnutls_x509_crq_set_dn;
1462         pgnutls_x509_crq_set_dn_by_oid gnutls_x509_crq_set_dn_by_oid;
1463         pgnutls_x509_crq_set_version gnutls_x509_crq_set_version;
1464         pgnutls_x509_crq_get_version gnutls_x509_crq_get_version;
1465         pgnutls_x509_crq_set_key gnutls_x509_crq_set_key;
1466 
1467         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_3)
1468             pgnutls_x509_crq_set_extension_by_oid gnutls_x509_crq_set_extension_by_oid;
1469 
1470         pgnutls_x509_crq_set_challenge_password gnutls_x509_crq_set_challenge_password;
1471         pgnutls_x509_crq_get_challenge_password gnutls_x509_crq_get_challenge_password;
1472         pgnutls_x509_crq_set_attribute_by_oid gnutls_x509_crq_set_attribute_by_oid;
1473         pgnutls_x509_crq_get_attribute_by_oid gnutls_x509_crq_get_attribute_by_oid;
1474         pgnutls_x509_crq_export gnutls_x509_crq_export;
1475         pgnutls_x509_crq_export2 gnutls_x509_crq_export2;
1476         pgnutls_x509_crt_set_crq gnutls_x509_crt_set_crq;
1477         pgnutls_x509_crt_set_crq_extensions gnutls_x509_crt_set_crq_extensions;
1478 
1479         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
1480             pgnutls_x509_crt_set_crq_extension_by_oid gnutls_x509_crt_set_crq_extension_by_oid;
1481 
1482         pgnutls_x509_crq_set_private_key_usage_period gnutls_x509_crq_set_private_key_usage_period;
1483         pgnutls_x509_crq_set_key_rsa_raw gnutls_x509_crq_set_key_rsa_raw;
1484         pgnutls_x509_crq_set_subject_alt_name gnutls_x509_crq_set_subject_alt_name;
1485         pgnutls_x509_crq_set_subject_alt_othername gnutls_x509_crq_set_subject_alt_othername;
1486         pgnutls_x509_crq_set_key_usage gnutls_x509_crq_set_key_usage;
1487         pgnutls_x509_crq_set_basic_constraints gnutls_x509_crq_set_basic_constraints;
1488         pgnutls_x509_crq_set_key_purpose_oid gnutls_x509_crq_set_key_purpose_oid;
1489         pgnutls_x509_crq_get_key_purpose_oid gnutls_x509_crq_get_key_purpose_oid;
1490         pgnutls_x509_crq_get_extension_data gnutls_x509_crq_get_extension_data;
1491         pgnutls_x509_crq_get_extension_data2 gnutls_x509_crq_get_extension_data2;
1492         pgnutls_x509_crq_get_extension_info gnutls_x509_crq_get_extension_info;
1493         pgnutls_x509_crq_get_attribute_data gnutls_x509_crq_get_attribute_data;
1494         pgnutls_x509_crq_get_attribute_info gnutls_x509_crq_get_attribute_info;
1495         pgnutls_x509_crq_get_pk_algorithm gnutls_x509_crq_get_pk_algorithm;
1496 
1497         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1498         {
1499             pgnutls_x509_crq_get_spki gnutls_x509_crq_get_spki;
1500             pgnutls_x509_crq_set_spki gnutls_x509_crq_set_spki;
1501         }
1502 
1503         pgnutls_x509_crq_get_signature_oid gnutls_x509_crq_get_signature_oid;
1504         pgnutls_x509_crq_get_pk_oid gnutls_x509_crq_get_pk_oid;
1505         pgnutls_x509_crq_get_key_id gnutls_x509_crq_get_key_id;
1506         pgnutls_x509_crq_get_key_rsa_raw gnutls_x509_crq_get_key_rsa_raw;
1507         pgnutls_x509_crq_get_key_usage gnutls_x509_crq_get_key_usage;
1508         pgnutls_x509_crq_get_basic_constraints gnutls_x509_crq_get_basic_constraints;
1509         pgnutls_x509_crq_get_subject_alt_name gnutls_x509_crq_get_subject_alt_name;
1510         pgnutls_x509_crq_get_subject_alt_othername_oid gnutls_x509_crq_get_subject_alt_othername_oid;
1511         pgnutls_x509_crq_get_extension_by_oid gnutls_x509_crq_get_extension_by_oid;
1512 
1513         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
1514         {
1515             pgnutls_x509_crq_get_tlsfeatures gnutls_x509_crq_get_tlsfeatures;
1516             pgnutls_x509_crq_set_tlsfeatures gnutls_x509_crq_set_tlsfeatures;
1517         }
1518 
1519         pgnutls_x509_crt_get_extension_by_oid2 gnutls_x509_crt_get_extension_by_oid2;
1520         pgnutls_x509_trust_list_init gnutls_x509_trust_list_init;
1521         pgnutls_x509_trust_list_deinit gnutls_x509_trust_list_deinit;
1522         pgnutls_x509_trust_list_get_issuer gnutls_x509_trust_list_get_issuer;
1523         pgnutls_x509_trust_list_get_issuer_by_dn gnutls_x509_trust_list_get_issuer_by_dn;
1524         pgnutls_x509_trust_list_get_issuer_by_subject_key_id gnutls_x509_trust_list_get_issuer_by_subject_key_id;
1525         pgnutls_x509_trust_list_add_cas gnutls_x509_trust_list_add_cas;
1526         pgnutls_x509_trust_list_remove_cas gnutls_x509_trust_list_remove_cas;
1527         pgnutls_x509_trust_list_add_named_crt gnutls_x509_trust_list_add_named_crt;
1528         pgnutls_x509_trust_list_add_crls gnutls_x509_trust_list_add_crls;
1529         pgnutls_x509_trust_list_iter_get_ca gnutls_x509_trust_list_iter_get_ca;
1530         pgnutls_x509_trust_list_iter_deinit gnutls_x509_trust_list_iter_deinit;
1531         pgnutls_x509_trust_list_verify_named_crt gnutls_x509_trust_list_verify_named_crt;
1532         pgnutls_x509_trust_list_verify_crt2 gnutls_x509_trust_list_verify_crt2;
1533         pgnutls_x509_trust_list_verify_crt gnutls_x509_trust_list_verify_crt;
1534         pgnutls_x509_trust_list_add_trust_mem gnutls_x509_trust_list_add_trust_mem;
1535         pgnutls_x509_trust_list_add_trust_file gnutls_x509_trust_list_add_trust_file;
1536         pgnutls_x509_trust_list_add_trust_dir gnutls_x509_trust_list_add_trust_dir;
1537         pgnutls_x509_trust_list_remove_trust_file gnutls_x509_trust_list_remove_trust_file;
1538         pgnutls_x509_trust_list_remove_trust_mem gnutls_x509_trust_list_remove_trust_mem;
1539         pgnutls_x509_trust_list_add_system_trust gnutls_x509_trust_list_add_system_trust;
1540         pgnutls_certificate_set_trust_list gnutls_certificate_set_trust_list;
1541         pgnutls_certificate_get_trust_list gnutls_certificate_get_trust_list;
1542         pgnutls_x509_ext_deinit gnutls_x509_ext_deinit;
1543         pgnutls_x509_ext_print gnutls_x509_ext_print;
1544     }
1545 
1546     import bindbc.loader : SharedLib, bindSymbol_stdcall;
1547     void bindX509(SharedLib lib)
1548     {
1549         lib.bindSymbol_stdcall(gnutls_x509_crt_init, "gnutls_x509_crt_init");
1550         lib.bindSymbol_stdcall(gnutls_x509_crt_deinit, "gnutls_x509_crt_deinit");
1551 
1552         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1553             lib.bindSymbol_stdcall(gnutls_x509_crt_set_flags, "gnutls_x509_crt_set_flags");
1554 
1555         lib.bindSymbol_stdcall(gnutls_x509_crt_equals, "gnutls_x509_crt_equals");
1556         lib.bindSymbol_stdcall(gnutls_x509_crt_equals2, "gnutls_x509_crt_equals2");
1557         lib.bindSymbol_stdcall(gnutls_x509_crt_import, "gnutls_x509_crt_import");
1558         lib.bindSymbol_stdcall(gnutls_x509_crt_list_import2, "gnutls_x509_crt_list_import2");
1559         lib.bindSymbol_stdcall(gnutls_x509_crt_list_import, "gnutls_x509_crt_list_import");
1560         lib.bindSymbol_stdcall(gnutls_x509_crt_import_url, "gnutls_x509_crt_import_url");
1561 
1562         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1563             lib.bindSymbol_stdcall(gnutls_x509_crt_list_import_url, "gnutls_x509_crt_list_import_url");
1564 
1565         lib.bindSymbol_stdcall(gnutls_x509_crt_export, "gnutls_x509_crt_export");
1566         lib.bindSymbol_stdcall(gnutls_x509_crt_export2, "gnutls_x509_crt_export2");
1567         lib.bindSymbol_stdcall(gnutls_x509_crt_get_private_key_usage_period, "gnutls_x509_crt_get_private_key_usage_period");
1568         lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer_dn, "gnutls_x509_crt_get_issuer_dn");
1569         lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer_dn2, "gnutls_x509_crt_get_issuer_dn2");
1570 
1571         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1572             lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer_dn3, "gnutls_x509_crt_get_issuer_dn3");
1573 
1574         lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer_dn_oid, "gnutls_x509_crt_get_issuer_dn_oid");
1575         lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer_dn_by_oid, "gnutls_x509_crt_get_issuer_dn_by_oid");
1576         lib.bindSymbol_stdcall(gnutls_x509_crt_get_dn, "gnutls_x509_crt_get_dn");
1577         lib.bindSymbol_stdcall(gnutls_x509_crt_get_dn2, "gnutls_x509_crt_get_dn2");
1578 
1579         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1580             lib.bindSymbol_stdcall(gnutls_x509_crt_get_dn3, "gnutls_x509_crt_get_dn3");
1581 
1582         lib.bindSymbol_stdcall(gnutls_x509_crt_get_dn_oid, "gnutls_x509_crt_get_dn_oid");
1583         lib.bindSymbol_stdcall(gnutls_x509_crt_get_dn_by_oid, "gnutls_x509_crt_get_dn_by_oid");
1584         lib.bindSymbol_stdcall(gnutls_x509_crt_check_hostname, "gnutls_x509_crt_check_hostname");
1585         lib.bindSymbol_stdcall(gnutls_x509_crt_check_hostname2, "gnutls_x509_crt_check_hostname2");
1586         lib.bindSymbol_stdcall(gnutls_x509_crt_check_email, "gnutls_x509_crt_check_email");
1587 
1588         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1589             lib.bindSymbol_stdcall(gnutls_x509_crt_check_ip, "gnutls_x509_crt_check_ip");
1590 
1591         lib.bindSymbol_stdcall(gnutls_x509_crt_get_signature_algorithm, "gnutls_x509_crt_get_signature_algorithm");
1592         lib.bindSymbol_stdcall(gnutls_x509_crt_get_signature, "gnutls_x509_crt_get_signature");
1593         lib.bindSymbol_stdcall(gnutls_x509_crt_get_version, "gnutls_x509_crt_get_version");
1594         lib.bindSymbol_stdcall(gnutls_x509_crt_get_pk_oid, "gnutls_x509_crt_get_pk_oid");
1595         lib.bindSymbol_stdcall(gnutls_x509_crt_get_signature_oid, "gnutls_x509_crt_get_signature_oid");
1596         lib.bindSymbol_stdcall(gnutls_x509_crt_get_key_id, "gnutls_x509_crt_get_key_id");
1597         lib.bindSymbol_stdcall(gnutls_x509_crt_set_private_key_usage_period, "gnutls_x509_crt_set_private_key_usage_period");
1598         lib.bindSymbol_stdcall(gnutls_x509_crt_set_authority_key_id, "gnutls_x509_crt_set_authority_key_id");
1599         lib.bindSymbol_stdcall(gnutls_x509_crt_get_authority_key_id, "gnutls_x509_crt_get_authority_key_id");
1600         lib.bindSymbol_stdcall(gnutls_x509_crt_get_authority_key_gn_serial, "gnutls_x509_crt_get_authority_key_gn_serial");
1601         lib.bindSymbol_stdcall(gnutls_x509_crt_get_subject_key_id, "gnutls_x509_crt_get_subject_key_id");
1602         lib.bindSymbol_stdcall(gnutls_x509_crt_get_subject_unique_id, "gnutls_x509_crt_get_subject_unique_id");
1603         lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer_unique_id, "gnutls_x509_crt_get_issuer_unique_id");
1604         lib.bindSymbol_stdcall(gnutls_x509_crt_set_pin_function, "gnutls_x509_crt_set_pin_function");
1605         lib.bindSymbol_stdcall(gnutls_x509_crt_get_authority_info_access, "gnutls_x509_crt_get_authority_info_access");
1606         lib.bindSymbol_stdcall(gnutls_x509_name_constraints_check, "gnutls_x509_name_constraints_check");
1607         lib.bindSymbol_stdcall(gnutls_x509_name_constraints_check_crt, "gnutls_x509_name_constraints_check_crt");
1608         lib.bindSymbol_stdcall(gnutls_x509_name_constraints_init, "gnutls_x509_name_constraints_init");
1609         lib.bindSymbol_stdcall(gnutls_x509_name_constraints_deinit, "gnutls_x509_name_constraints_deinit");
1610         lib.bindSymbol_stdcall(gnutls_x509_crt_get_name_constraints, "gnutls_x509_crt_get_name_constraints");
1611         lib.bindSymbol_stdcall(gnutls_x509_name_constraints_add_permitted, "gnutls_x509_name_constraints_add_permitted");
1612         lib.bindSymbol_stdcall(gnutls_x509_name_constraints_add_excluded, "gnutls_x509_name_constraints_add_excluded");
1613         lib.bindSymbol_stdcall(gnutls_x509_crt_set_name_constraints, "gnutls_x509_crt_set_name_constraints");
1614         lib.bindSymbol_stdcall(gnutls_x509_name_constraints_get_permitted, "gnutls_x509_name_constraints_get_permitted");
1615         lib.bindSymbol_stdcall(gnutls_x509_name_constraints_get_excluded, "gnutls_x509_name_constraints_get_excluded");
1616 
1617         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_4)
1618             lib.bindSymbol_stdcall(gnutls_x509_cidr_to_rfc5280, "gnutls_x509_cidr_to_rfc5280");
1619 
1620         lib.bindSymbol_stdcall(gnutls_x509_crt_get_crl_dist_points, "gnutls_x509_crt_get_crl_dist_points");
1621         lib.bindSymbol_stdcall(gnutls_x509_crt_set_crl_dist_points2, "gnutls_x509_crt_set_crl_dist_points2");
1622         lib.bindSymbol_stdcall(gnutls_x509_crt_set_crl_dist_points, "gnutls_x509_crt_set_crl_dist_points");
1623         lib.bindSymbol_stdcall(gnutls_x509_crt_cpy_crl_dist_points, "gnutls_x509_crt_cpy_crl_dist_points");
1624         lib.bindSymbol_stdcall(gnutls_x509_crl_sign, "gnutls_x509_crl_sign");
1625         lib.bindSymbol_stdcall(gnutls_x509_crl_sign2, "gnutls_x509_crl_sign2");
1626         lib.bindSymbol_stdcall(gnutls_x509_crt_get_activation_time, "gnutls_x509_crt_get_activation_time");
1627         lib.bindSymbol_stdcall(gnutls_x509_crt_get_expiration_time, "gnutls_x509_crt_get_expiration_time");
1628         lib.bindSymbol_stdcall(gnutls_x509_crt_get_serial, "gnutls_x509_crt_get_serial");
1629 
1630         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1631         {
1632             lib.bindSymbol_stdcall(gnutls_x509_spki_init, "gnutls_x509_spki_init");
1633             lib.bindSymbol_stdcall(gnutls_x509_spki_deinit, "gnutls_x509_spki_deinit");
1634         }
1635 
1636         lib.bindSymbol_stdcall(gnutls_x509_spki_get_rsa_pss_params, "gnutls_x509_spki_get_rsa_pss_params");
1637         lib.bindSymbol_stdcall(gnutls_x509_spki_set_rsa_pss_params, "gnutls_x509_spki_set_rsa_pss_params");
1638         lib.bindSymbol_stdcall(gnutls_x509_crt_get_pk_algorithm, "gnutls_x509_crt_get_pk_algorithm");
1639 
1640         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1641         {
1642             lib.bindSymbol_stdcall(gnutls_x509_crt_set_spki, "gnutls_x509_crt_set_spki");
1643             lib.bindSymbol_stdcall(gnutls_x509_crt_get_spki, "gnutls_x509_crt_get_spki");
1644         }
1645 
1646         lib.bindSymbol_stdcall(gnutls_x509_crt_get_pk_rsa_raw, "gnutls_x509_crt_get_pk_rsa_raw");
1647         lib.bindSymbol_stdcall(gnutls_x509_crt_get_pk_dsa_raw, "gnutls_x509_crt_get_pk_dsa_raw");
1648         lib.bindSymbol_stdcall(gnutls_x509_crt_get_pk_ecc_raw, "gnutls_x509_crt_get_pk_ecc_raw");
1649 
1650         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1651             lib.bindSymbol_stdcall(gnutls_x509_crt_get_pk_gost_raw, "gnutls_x509_crt_get_pk_gost_raw");
1652 
1653         lib.bindSymbol_stdcall(gnutls_x509_crt_get_subject_alt_name, "gnutls_x509_crt_get_subject_alt_name");
1654         lib.bindSymbol_stdcall(gnutls_x509_crt_get_subject_alt_name2, "gnutls_x509_crt_get_subject_alt_name2");
1655         lib.bindSymbol_stdcall(gnutls_x509_crt_get_subject_alt_othername_oid, "gnutls_x509_crt_get_subject_alt_othername_oid");
1656         lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer_alt_name, "gnutls_x509_crt_get_issuer_alt_name");
1657         lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer_alt_name2, "gnutls_x509_crt_get_issuer_alt_name2");
1658         lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer_alt_othername_oid, "gnutls_x509_crt_get_issuer_alt_othername_oid");
1659         lib.bindSymbol_stdcall(gnutls_x509_crt_get_ca_status, "gnutls_x509_crt_get_ca_status");
1660         lib.bindSymbol_stdcall(gnutls_x509_crt_get_basic_constraints, "gnutls_x509_crt_get_basic_constraints");
1661         lib.bindSymbol_stdcall(gnutls_x509_crt_get_key_usage, "gnutls_x509_crt_get_key_usage");
1662         lib.bindSymbol_stdcall(gnutls_x509_crt_set_key_usage, "gnutls_x509_crt_set_key_usage");
1663         lib.bindSymbol_stdcall(gnutls_x509_crt_set_authority_info_access, "gnutls_x509_crt_set_authority_info_access");
1664 
1665         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1666         {
1667             lib.bindSymbol_stdcall(gnutls_x509_crt_get_inhibit_anypolicy, "gnutls_x509_crt_get_inhibit_anypolicy");
1668             lib.bindSymbol_stdcall(gnutls_x509_crt_set_inhibit_anypolicy, "gnutls_x509_crt_set_inhibit_anypolicy");
1669         }
1670 
1671         lib.bindSymbol_stdcall(gnutls_x509_crt_get_proxy, "gnutls_x509_crt_get_proxy");
1672 
1673         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
1674         {
1675             lib.bindSymbol_stdcall(gnutls_x509_tlsfeatures_init, "gnutls_x509_tlsfeatures_init");
1676             lib.bindSymbol_stdcall(gnutls_x509_tlsfeatures_deinit, "gnutls_x509_tlsfeatures_deinit");
1677             lib.bindSymbol_stdcall(gnutls_x509_tlsfeatures_get, "gnutls_x509_tlsfeatures_get");
1678             lib.bindSymbol_stdcall(gnutls_x509_crt_set_tlsfeatures, "gnutls_x509_crt_set_tlsfeatures");
1679             lib.bindSymbol_stdcall(gnutls_x509_crt_get_tlsfeatures, "gnutls_x509_crt_get_tlsfeatures");
1680         }
1681 
1682         lib.bindSymbol_stdcall(gnutls_x509_tlsfeatures_check_crt, "gnutls_x509_tlsfeatures_check_crt");
1683         lib.bindSymbol_stdcall(gnutls_x509_policy_release, "gnutls_x509_policy_release");
1684         lib.bindSymbol_stdcall(gnutls_x509_crt_get_policy, "gnutls_x509_crt_get_policy");
1685         lib.bindSymbol_stdcall(gnutls_x509_crt_set_policy, "gnutls_x509_crt_set_policy");
1686         lib.bindSymbol_stdcall(gnutls_x509_dn_oid_known, "gnutls_x509_dn_oid_known");
1687         lib.bindSymbol_stdcall(gnutls_x509_dn_oid_name, "gnutls_x509_dn_oid_name");
1688         lib.bindSymbol_stdcall(gnutls_x509_crt_get_extension_oid, "gnutls_x509_crt_get_extension_oid");
1689         lib.bindSymbol_stdcall(gnutls_x509_crt_get_extension_by_oid, "gnutls_x509_crt_get_extension_by_oid");
1690         lib.bindSymbol_stdcall(gnutls_x509_crq_get_signature_algorithm, "gnutls_x509_crq_get_signature_algorithm");
1691         lib.bindSymbol_stdcall(gnutls_x509_crq_get_extension_by_oid2, "gnutls_x509_crq_get_extension_by_oid2");
1692         lib.bindSymbol_stdcall(gnutls_x509_crt_get_extension_info, "gnutls_x509_crt_get_extension_info");
1693         lib.bindSymbol_stdcall(gnutls_x509_crt_get_extension_data, "gnutls_x509_crt_get_extension_data");
1694         lib.bindSymbol_stdcall(gnutls_x509_crt_get_extension_data2, "gnutls_x509_crt_get_extension_data2");
1695         lib.bindSymbol_stdcall(gnutls_x509_crt_set_extension_by_oid, "gnutls_x509_crt_set_extension_by_oid");
1696         lib.bindSymbol_stdcall(gnutls_x509_crt_set_dn, "gnutls_x509_crt_set_dn");
1697         lib.bindSymbol_stdcall(gnutls_x509_crt_set_dn_by_oid, "gnutls_x509_crt_set_dn_by_oid");
1698         lib.bindSymbol_stdcall(gnutls_x509_crt_set_issuer_dn_by_oid, "gnutls_x509_crt_set_issuer_dn_by_oid");
1699         lib.bindSymbol_stdcall(gnutls_x509_crt_set_issuer_dn, "gnutls_x509_crt_set_issuer_dn");
1700         lib.bindSymbol_stdcall(gnutls_x509_crt_set_version, "gnutls_x509_crt_set_version");
1701         lib.bindSymbol_stdcall(gnutls_x509_crt_set_key, "gnutls_x509_crt_set_key");
1702         lib.bindSymbol_stdcall(gnutls_x509_crt_set_ca_status, "gnutls_x509_crt_set_ca_status");
1703         lib.bindSymbol_stdcall(gnutls_x509_crt_set_basic_constraints, "gnutls_x509_crt_set_basic_constraints");
1704         lib.bindSymbol_stdcall(gnutls_x509_crt_set_subject_unique_id, "gnutls_x509_crt_set_subject_unique_id");
1705         lib.bindSymbol_stdcall(gnutls_x509_crt_set_issuer_unique_id, "gnutls_x509_crt_set_issuer_unique_id");
1706         lib.bindSymbol_stdcall(gnutls_x509_crt_set_subject_alternative_name, "gnutls_x509_crt_set_subject_alternative_name");
1707         lib.bindSymbol_stdcall(gnutls_x509_crt_set_subject_alt_name, "gnutls_x509_crt_set_subject_alt_name");
1708         lib.bindSymbol_stdcall(gnutls_x509_crt_set_subject_alt_othername, "gnutls_x509_crt_set_subject_alt_othername");
1709         lib.bindSymbol_stdcall(gnutls_x509_crt_set_issuer_alt_name, "gnutls_x509_crt_set_issuer_alt_name");
1710         lib.bindSymbol_stdcall(gnutls_x509_crt_set_issuer_alt_othername, "gnutls_x509_crt_set_issuer_alt_othername");
1711         lib.bindSymbol_stdcall(gnutls_x509_crt_sign, "gnutls_x509_crt_sign");
1712         lib.bindSymbol_stdcall(gnutls_x509_crt_sign2, "gnutls_x509_crt_sign2");
1713         lib.bindSymbol_stdcall(gnutls_x509_crt_set_activation_time, "gnutls_x509_crt_set_activation_time");
1714         lib.bindSymbol_stdcall(gnutls_x509_crt_set_expiration_time, "gnutls_x509_crt_set_expiration_time");
1715         lib.bindSymbol_stdcall(gnutls_x509_crt_set_serial, "gnutls_x509_crt_set_serial");
1716         lib.bindSymbol_stdcall(gnutls_x509_crt_set_subject_key_id, "gnutls_x509_crt_set_subject_key_id");
1717         lib.bindSymbol_stdcall(gnutls_x509_crt_set_proxy_dn, "gnutls_x509_crt_set_proxy_dn");
1718         lib.bindSymbol_stdcall(gnutls_x509_crt_set_proxy, "gnutls_x509_crt_set_proxy");
1719         lib.bindSymbol_stdcall(gnutls_x509_crt_print, "gnutls_x509_crt_print");
1720         lib.bindSymbol_stdcall(gnutls_x509_crl_print, "gnutls_x509_crl_print");
1721         lib.bindSymbol_stdcall(gnutls_x509_crt_get_raw_issuer_dn, "gnutls_x509_crt_get_raw_issuer_dn");
1722         lib.bindSymbol_stdcall(gnutls_x509_crt_get_raw_dn, "gnutls_x509_crt_get_raw_dn");
1723         lib.bindSymbol_stdcall(gnutls_x509_rdn_get, "gnutls_x509_rdn_get");
1724 
1725         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1726             lib.bindSymbol_stdcall(gnutls_x509_rdn_get2, "gnutls_x509_rdn_get2");
1727 
1728         lib.bindSymbol_stdcall(gnutls_x509_rdn_get_oid, "gnutls_x509_rdn_get_oid");
1729         lib.bindSymbol_stdcall(gnutls_x509_rdn_get_by_oid, "gnutls_x509_rdn_get_by_oid");
1730         lib.bindSymbol_stdcall(gnutls_x509_crt_get_subject, "gnutls_x509_crt_get_subject");
1731         lib.bindSymbol_stdcall(gnutls_x509_crt_get_issuer, "gnutls_x509_crt_get_issuer");
1732         lib.bindSymbol_stdcall(gnutls_x509_dn_get_rdn_ava, "gnutls_x509_dn_get_rdn_ava");
1733         lib.bindSymbol_stdcall(gnutls_x509_dn_get_str, "gnutls_x509_dn_get_str");
1734 
1735         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1736             lib.bindSymbol_stdcall(gnutls_x509_dn_get_str2, "gnutls_x509_dn_get_str2");
1737 
1738         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_3)
1739             lib.bindSymbol_stdcall(gnutls_x509_dn_set_str, "gnutls_x509_dn_set_str");
1740 
1741         lib.bindSymbol_stdcall(gnutls_x509_dn_init, "gnutls_x509_dn_init");
1742         lib.bindSymbol_stdcall(gnutls_x509_dn_import, "gnutls_x509_dn_import");
1743         lib.bindSymbol_stdcall(gnutls_x509_dn_export, "gnutls_x509_dn_export");
1744         lib.bindSymbol_stdcall(gnutls_x509_dn_export2, "gnutls_x509_dn_export2");
1745         lib.bindSymbol_stdcall(gnutls_x509_dn_deinit, "gnutls_x509_dn_deinit");
1746         lib.bindSymbol_stdcall(gnutls_x509_crl_init, "gnutls_x509_crl_init");
1747         lib.bindSymbol_stdcall(gnutls_x509_crl_deinit, "gnutls_x509_crl_deinit");
1748         lib.bindSymbol_stdcall(gnutls_x509_crl_import, "gnutls_x509_crl_import");
1749         lib.bindSymbol_stdcall(gnutls_x509_crl_export, "gnutls_x509_crl_export");
1750         lib.bindSymbol_stdcall(gnutls_x509_crl_export2, "gnutls_x509_crl_export2");
1751         lib.bindSymbol_stdcall(gnutls_x509_crl_get_raw_issuer_dn, "gnutls_x509_crl_get_raw_issuer_dn");
1752         lib.bindSymbol_stdcall(gnutls_x509_crl_get_issuer_dn, "gnutls_x509_crl_get_issuer_dn");
1753         lib.bindSymbol_stdcall(gnutls_x509_crl_get_issuer_dn2, "gnutls_x509_crl_get_issuer_dn2");
1754 
1755         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1756             lib.bindSymbol_stdcall(gnutls_x509_crl_get_issuer_dn3, "gnutls_x509_crl_get_issuer_dn3");
1757 
1758         lib.bindSymbol_stdcall(gnutls_x509_crl_get_issuer_dn_by_oid, "gnutls_x509_crl_get_issuer_dn_by_oid");
1759         lib.bindSymbol_stdcall(gnutls_x509_crl_get_dn_oid, "gnutls_x509_crl_get_dn_oid");
1760         lib.bindSymbol_stdcall(gnutls_x509_crl_get_signature_algorithm, "gnutls_x509_crl_get_signature_algorithm");
1761         lib.bindSymbol_stdcall(gnutls_x509_crl_get_signature, "gnutls_x509_crl_get_signature");
1762         lib.bindSymbol_stdcall(gnutls_x509_crl_get_version, "gnutls_x509_crl_get_version");
1763         lib.bindSymbol_stdcall(gnutls_x509_crl_get_signature_oid, "gnutls_x509_crl_get_signature_oid");
1764         lib.bindSymbol_stdcall(gnutls_x509_crl_get_this_update, "gnutls_x509_crl_get_this_update");
1765         lib.bindSymbol_stdcall(gnutls_x509_crl_get_next_update, "gnutls_x509_crl_get_next_update");
1766         lib.bindSymbol_stdcall(gnutls_x509_crl_get_crt_count, "gnutls_x509_crl_get_crt_count");
1767         lib.bindSymbol_stdcall(gnutls_x509_crl_get_crt_serial, "gnutls_x509_crl_get_crt_serial");
1768         lib.bindSymbol_stdcall(gnutls_x509_crl_iter_crt_serial, "gnutls_x509_crl_iter_crt_serial");
1769         lib.bindSymbol_stdcall(gnutls_x509_crl_iter_deinit, "gnutls_x509_crl_iter_deinit");
1770         lib.bindSymbol_stdcall(gnutls_x509_crl_check_issuer, "gnutls_x509_crl_check_issuer");
1771         lib.bindSymbol_stdcall(gnutls_x509_crl_list_import2, "gnutls_x509_crl_list_import2");
1772         lib.bindSymbol_stdcall(gnutls_x509_crl_list_import, "gnutls_x509_crl_list_import");
1773         lib.bindSymbol_stdcall(gnutls_x509_crl_set_version, "gnutls_x509_crl_set_version");
1774         lib.bindSymbol_stdcall(gnutls_x509_crl_set_this_update, "gnutls_x509_crl_set_this_update");
1775         lib.bindSymbol_stdcall(gnutls_x509_crl_set_next_update, "gnutls_x509_crl_set_next_update");
1776         lib.bindSymbol_stdcall(gnutls_x509_crl_set_crt_serial, "gnutls_x509_crl_set_crt_serial");
1777         lib.bindSymbol_stdcall(gnutls_x509_crl_set_crt, "gnutls_x509_crl_set_crt");
1778         lib.bindSymbol_stdcall(gnutls_x509_crl_get_authority_key_id, "gnutls_x509_crl_get_authority_key_id");
1779         lib.bindSymbol_stdcall(gnutls_x509_crl_get_authority_key_gn_serial, "gnutls_x509_crl_get_authority_key_gn_serial");
1780         lib.bindSymbol_stdcall(gnutls_x509_crl_get_number, "gnutls_x509_crl_get_number");
1781         lib.bindSymbol_stdcall(gnutls_x509_crl_get_extension_oid, "gnutls_x509_crl_get_extension_oid");
1782         lib.bindSymbol_stdcall(gnutls_x509_crl_get_extension_info, "gnutls_x509_crl_get_extension_info");
1783         lib.bindSymbol_stdcall(gnutls_x509_crl_get_extension_data, "gnutls_x509_crl_get_extension_data");
1784         lib.bindSymbol_stdcall(gnutls_x509_crl_get_extension_data2, "gnutls_x509_crl_get_extension_data2");
1785         lib.bindSymbol_stdcall(gnutls_x509_crl_set_authority_key_id, "gnutls_x509_crl_set_authority_key_id");
1786         lib.bindSymbol_stdcall(gnutls_x509_crl_set_number, "gnutls_x509_crl_set_number");
1787         lib.bindSymbol_stdcall(gnutls_certificate_verification_profile_get_name, "gnutls_certificate_verification_profile_get_name");
1788         lib.bindSymbol_stdcall(gnutls_certificate_verification_profile_get_id, "gnutls_certificate_verification_profile_get_id");
1789         lib.bindSymbol_stdcall(gnutls_x509_crt_check_issuer, "gnutls_x509_crt_check_issuer");
1790         lib.bindSymbol_stdcall(gnutls_x509_crt_list_verify, "gnutls_x509_crt_list_verify");
1791         lib.bindSymbol_stdcall(gnutls_x509_crt_verify, "gnutls_x509_crt_verify");
1792         lib.bindSymbol_stdcall(gnutls_x509_crl_verify, "gnutls_x509_crl_verify");
1793         lib.bindSymbol_stdcall(gnutls_x509_crt_verify_data2, "gnutls_x509_crt_verify_data2");
1794         lib.bindSymbol_stdcall(gnutls_x509_crt_check_revocation, "gnutls_x509_crt_check_revocation");
1795         lib.bindSymbol_stdcall(gnutls_x509_crt_get_fingerprint, "gnutls_x509_crt_get_fingerprint");
1796         lib.bindSymbol_stdcall(gnutls_x509_crt_get_key_purpose_oid, "gnutls_x509_crt_get_key_purpose_oid");
1797         lib.bindSymbol_stdcall(gnutls_x509_crt_set_key_purpose_oid, "gnutls_x509_crt_set_key_purpose_oid");
1798 
1799         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_6)
1800             lib.bindSymbol_stdcall(gnutls_x509_crt_check_key_purpose, "gnutls_x509_crt_check_key_purpose");
1801 
1802         lib.bindSymbol_stdcall(gnutls_pkcs_schema_get_name, "gnutls_pkcs_schema_get_name");
1803         lib.bindSymbol_stdcall(gnutls_pkcs_schema_get_oid, "gnutls_pkcs_schema_get_oid");
1804         lib.bindSymbol_stdcall(gnutls_x509_privkey_init, "gnutls_x509_privkey_init");
1805         lib.bindSymbol_stdcall(gnutls_x509_privkey_deinit, "gnutls_x509_privkey_deinit");
1806         lib.bindSymbol_stdcall(gnutls_x509_privkey_sec_param, "gnutls_x509_privkey_sec_param");
1807         lib.bindSymbol_stdcall(gnutls_x509_privkey_set_pin_function, "gnutls_x509_privkey_set_pin_function");
1808         lib.bindSymbol_stdcall(gnutls_x509_privkey_cpy, "gnutls_x509_privkey_cpy");
1809         lib.bindSymbol_stdcall(gnutls_x509_privkey_import, "gnutls_x509_privkey_import");
1810         lib.bindSymbol_stdcall(gnutls_x509_privkey_import_pkcs8, "gnutls_x509_privkey_import_pkcs8");
1811         lib.bindSymbol_stdcall(gnutls_x509_privkey_import_openssl, "gnutls_x509_privkey_import_openssl");
1812         lib.bindSymbol_stdcall(gnutls_pkcs8_info, "gnutls_pkcs8_info");
1813         lib.bindSymbol_stdcall(gnutls_x509_privkey_import2, "gnutls_x509_privkey_import2");
1814         lib.bindSymbol_stdcall(gnutls_x509_privkey_import_rsa_raw, "gnutls_x509_privkey_import_rsa_raw");
1815         lib.bindSymbol_stdcall(gnutls_x509_privkey_import_rsa_raw2, "gnutls_x509_privkey_import_rsa_raw2");
1816         lib.bindSymbol_stdcall(gnutls_x509_privkey_import_ecc_raw, "gnutls_x509_privkey_import_ecc_raw");
1817 
1818         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1819             lib.bindSymbol_stdcall(gnutls_x509_privkey_import_gost_raw, "gnutls_x509_privkey_import_gost_raw");
1820 
1821         lib.bindSymbol_stdcall(gnutls_x509_privkey_fix, "gnutls_x509_privkey_fix");
1822         lib.bindSymbol_stdcall(gnutls_x509_privkey_export_dsa_raw, "gnutls_x509_privkey_export_dsa_raw");
1823         lib.bindSymbol_stdcall(gnutls_x509_privkey_import_dsa_raw, "gnutls_x509_privkey_import_dsa_raw");
1824         lib.bindSymbol_stdcall(gnutls_x509_privkey_get_pk_algorithm, "gnutls_x509_privkey_get_pk_algorithm");
1825         lib.bindSymbol_stdcall(gnutls_x509_privkey_get_pk_algorithm2, "gnutls_x509_privkey_get_pk_algorithm2");
1826 
1827         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1828         {
1829             lib.bindSymbol_stdcall(gnutls_x509_privkey_get_spki, "gnutls_x509_privkey_get_spki");
1830             lib.bindSymbol_stdcall(gnutls_x509_privkey_set_spki, "gnutls_x509_privkey_set_spki");
1831         }
1832 
1833         lib.bindSymbol_stdcall(gnutls_x509_privkey_get_key_id, "gnutls_x509_privkey_get_key_id");
1834         lib.bindSymbol_stdcall(gnutls_x509_privkey_generate, "gnutls_x509_privkey_generate");
1835         lib.bindSymbol_stdcall(gnutls_x509_privkey_set_flags, "gnutls_x509_privkey_set_flags");
1836         lib.bindSymbol_stdcall(gnutls_x509_privkey_generate2, "gnutls_x509_privkey_generate2");
1837         lib.bindSymbol_stdcall(gnutls_x509_privkey_verify_seed, "gnutls_x509_privkey_verify_seed");
1838         lib.bindSymbol_stdcall(gnutls_x509_privkey_get_seed, "gnutls_x509_privkey_get_seed");
1839         lib.bindSymbol_stdcall(gnutls_x509_privkey_verify_params, "gnutls_x509_privkey_verify_params");
1840         lib.bindSymbol_stdcall(gnutls_x509_privkey_export, "gnutls_x509_privkey_export");
1841         lib.bindSymbol_stdcall(gnutls_x509_privkey_export2, "gnutls_x509_privkey_export2");
1842         lib.bindSymbol_stdcall(gnutls_x509_privkey_export_pkcs8, "gnutls_x509_privkey_export_pkcs8");
1843         lib.bindSymbol_stdcall(gnutls_x509_privkey_export2_pkcs8, "gnutls_x509_privkey_export2_pkcs8");
1844         lib.bindSymbol_stdcall(gnutls_x509_privkey_export_rsa_raw2, "gnutls_x509_privkey_export_rsa_raw2");
1845         lib.bindSymbol_stdcall(gnutls_x509_privkey_export_rsa_raw, "gnutls_x509_privkey_export_rsa_raw");
1846         lib.bindSymbol_stdcall(gnutls_x509_privkey_export_ecc_raw, "gnutls_x509_privkey_export_ecc_raw");
1847 
1848         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_3)
1849             lib.bindSymbol_stdcall(gnutls_x509_privkey_export_gost_raw, "gnutls_x509_privkey_export_gost_raw");
1850 
1851         lib.bindSymbol_stdcall(gnutls_x509_privkey_sign_data, "gnutls_x509_privkey_sign_data");
1852         lib.bindSymbol_stdcall(gnutls_x509_crq_sign, "gnutls_x509_crq_sign");
1853         lib.bindSymbol_stdcall(gnutls_x509_crq_sign2, "gnutls_x509_crq_sign2");
1854         lib.bindSymbol_stdcall(gnutls_x509_crq_print, "gnutls_x509_crq_print");
1855         lib.bindSymbol_stdcall(gnutls_x509_crq_verify, "gnutls_x509_crq_verify");
1856         lib.bindSymbol_stdcall(gnutls_x509_crq_init, "gnutls_x509_crq_init");
1857         lib.bindSymbol_stdcall(gnutls_x509_crq_deinit, "gnutls_x509_crq_deinit");
1858         lib.bindSymbol_stdcall(gnutls_x509_crq_import, "gnutls_x509_crq_import");
1859         lib.bindSymbol_stdcall(gnutls_x509_crq_get_private_key_usage_period, "gnutls_x509_crq_get_private_key_usage_period");
1860         lib.bindSymbol_stdcall(gnutls_x509_crq_get_dn, "gnutls_x509_crq_get_dn");
1861         lib.bindSymbol_stdcall(gnutls_x509_crq_get_dn2, "gnutls_x509_crq_get_dn2");
1862 
1863         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_7)
1864             lib.bindSymbol_stdcall(gnutls_x509_crq_get_dn3, "gnutls_x509_crq_get_dn3");
1865 
1866         lib.bindSymbol_stdcall(gnutls_x509_crq_get_dn_oid, "gnutls_x509_crq_get_dn_oid");
1867         lib.bindSymbol_stdcall(gnutls_x509_crq_get_dn_by_oid, "gnutls_x509_crq_get_dn_by_oid");
1868         lib.bindSymbol_stdcall(gnutls_x509_crq_set_dn, "gnutls_x509_crq_set_dn");
1869         lib.bindSymbol_stdcall(gnutls_x509_crq_set_dn_by_oid, "gnutls_x509_crq_set_dn_by_oid");
1870         lib.bindSymbol_stdcall(gnutls_x509_crq_set_version, "gnutls_x509_crq_set_version");
1871         lib.bindSymbol_stdcall(gnutls_x509_crq_get_version, "gnutls_x509_crq_get_version");
1872         lib.bindSymbol_stdcall(gnutls_x509_crq_set_key, "gnutls_x509_crq_set_key");
1873 
1874         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_3)
1875             lib.bindSymbol_stdcall(gnutls_x509_crq_set_extension_by_oid, "gnutls_x509_crq_set_extension_by_oid");
1876 
1877         lib.bindSymbol_stdcall(gnutls_x509_crq_set_challenge_password, "gnutls_x509_crq_set_challenge_password");
1878         lib.bindSymbol_stdcall(gnutls_x509_crq_get_challenge_password, "gnutls_x509_crq_get_challenge_password");
1879         lib.bindSymbol_stdcall(gnutls_x509_crq_set_attribute_by_oid, "gnutls_x509_crq_set_attribute_by_oid");
1880         lib.bindSymbol_stdcall(gnutls_x509_crq_get_attribute_by_oid, "gnutls_x509_crq_get_attribute_by_oid");
1881         lib.bindSymbol_stdcall(gnutls_x509_crq_export, "gnutls_x509_crq_export");
1882         lib.bindSymbol_stdcall(gnutls_x509_crq_export2, "gnutls_x509_crq_export2");
1883         lib.bindSymbol_stdcall(gnutls_x509_crt_set_crq, "gnutls_x509_crt_set_crq");
1884         lib.bindSymbol_stdcall(gnutls_x509_crt_set_crq_extensions, "gnutls_x509_crt_set_crq_extensions");
1885 
1886         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
1887             lib.bindSymbol_stdcall(gnutls_x509_crt_set_crq_extension_by_oid, "gnutls_x509_crt_set_crq_extension_by_oid");
1888 
1889         lib.bindSymbol_stdcall(gnutls_x509_crq_set_private_key_usage_period, "gnutls_x509_crq_set_private_key_usage_period");
1890         lib.bindSymbol_stdcall(gnutls_x509_crq_set_key_rsa_raw, "gnutls_x509_crq_set_key_rsa_raw");
1891         lib.bindSymbol_stdcall(gnutls_x509_crq_set_subject_alt_name, "gnutls_x509_crq_set_subject_alt_name");
1892         lib.bindSymbol_stdcall(gnutls_x509_crq_set_subject_alt_othername, "gnutls_x509_crq_set_subject_alt_othername");
1893         lib.bindSymbol_stdcall(gnutls_x509_crq_set_key_usage, "gnutls_x509_crq_set_key_usage");
1894         lib.bindSymbol_stdcall(gnutls_x509_crq_set_basic_constraints, "gnutls_x509_crq_set_basic_constraints");
1895         lib.bindSymbol_stdcall(gnutls_x509_crq_set_key_purpose_oid, "gnutls_x509_crq_set_key_purpose_oid");
1896         lib.bindSymbol_stdcall(gnutls_x509_crq_get_key_purpose_oid, "gnutls_x509_crq_get_key_purpose_oid");
1897         lib.bindSymbol_stdcall(gnutls_x509_crq_get_extension_data, "gnutls_x509_crq_get_extension_data");
1898         lib.bindSymbol_stdcall(gnutls_x509_crq_get_extension_data2, "gnutls_x509_crq_get_extension_data2");
1899         lib.bindSymbol_stdcall(gnutls_x509_crq_get_extension_info, "gnutls_x509_crq_get_extension_info");
1900         lib.bindSymbol_stdcall(gnutls_x509_crq_get_attribute_data, "gnutls_x509_crq_get_attribute_data");
1901         lib.bindSymbol_stdcall(gnutls_x509_crq_get_attribute_info, "gnutls_x509_crq_get_attribute_info");
1902         lib.bindSymbol_stdcall(gnutls_x509_crq_get_pk_algorithm, "gnutls_x509_crq_get_pk_algorithm");
1903 
1904         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_6_0)
1905         {
1906             lib.bindSymbol_stdcall(gnutls_x509_crq_get_spki, "gnutls_x509_crq_get_spki");
1907             lib.bindSymbol_stdcall(gnutls_x509_crq_set_spki, "gnutls_x509_crq_set_spki");
1908         }
1909 
1910         lib.bindSymbol_stdcall(gnutls_x509_crq_get_signature_oid, "gnutls_x509_crq_get_signature_oid");
1911         lib.bindSymbol_stdcall(gnutls_x509_crq_get_pk_oid, "gnutls_x509_crq_get_pk_oid");
1912         lib.bindSymbol_stdcall(gnutls_x509_crq_get_key_id, "gnutls_x509_crq_get_key_id");
1913         lib.bindSymbol_stdcall(gnutls_x509_crq_get_key_rsa_raw, "gnutls_x509_crq_get_key_rsa_raw");
1914         lib.bindSymbol_stdcall(gnutls_x509_crq_get_key_usage, "gnutls_x509_crq_get_key_usage");
1915         lib.bindSymbol_stdcall(gnutls_x509_crq_get_basic_constraints, "gnutls_x509_crq_get_basic_constraints");
1916         lib.bindSymbol_stdcall(gnutls_x509_crq_get_subject_alt_name, "gnutls_x509_crq_get_subject_alt_name");
1917         lib.bindSymbol_stdcall(gnutls_x509_crq_get_subject_alt_othername_oid, "gnutls_x509_crq_get_subject_alt_othername_oid");
1918         lib.bindSymbol_stdcall(gnutls_x509_crq_get_extension_by_oid, "gnutls_x509_crq_get_extension_by_oid");
1919 
1920         static if (gnuTLSSupport >= GnuTLSSupport.gnutls_3_5_1)
1921         {
1922             lib.bindSymbol_stdcall(gnutls_x509_crq_get_tlsfeatures, "gnutls_x509_crq_get_tlsfeatures");
1923             lib.bindSymbol_stdcall(gnutls_x509_crq_set_tlsfeatures, "gnutls_x509_crq_set_tlsfeatures");
1924         }
1925 
1926         lib.bindSymbol_stdcall(gnutls_x509_crt_get_extension_by_oid2, "gnutls_x509_crt_get_extension_by_oid2");
1927         lib.bindSymbol_stdcall(gnutls_x509_trust_list_init, "gnutls_x509_trust_list_init");
1928         lib.bindSymbol_stdcall(gnutls_x509_trust_list_deinit, "gnutls_x509_trust_list_deinit");
1929         lib.bindSymbol_stdcall(gnutls_x509_trust_list_get_issuer, "gnutls_x509_trust_list_get_issuer");
1930         lib.bindSymbol_stdcall(gnutls_x509_trust_list_get_issuer_by_dn, "gnutls_x509_trust_list_get_issuer_by_dn");
1931         lib.bindSymbol_stdcall(gnutls_x509_trust_list_get_issuer_by_subject_key_id, "gnutls_x509_trust_list_get_issuer_by_subject_key_id");
1932         lib.bindSymbol_stdcall(gnutls_x509_trust_list_add_cas, "gnutls_x509_trust_list_add_cas");
1933         lib.bindSymbol_stdcall(gnutls_x509_trust_list_remove_cas, "gnutls_x509_trust_list_remove_cas");
1934         lib.bindSymbol_stdcall(gnutls_x509_trust_list_add_named_crt, "gnutls_x509_trust_list_add_named_crt");
1935         lib.bindSymbol_stdcall(gnutls_x509_trust_list_add_crls, "gnutls_x509_trust_list_add_crls");
1936         lib.bindSymbol_stdcall(gnutls_x509_trust_list_iter_get_ca, "gnutls_x509_trust_list_iter_get_ca");
1937         lib.bindSymbol_stdcall(gnutls_x509_trust_list_iter_deinit, "gnutls_x509_trust_list_iter_deinit");
1938         lib.bindSymbol_stdcall(gnutls_x509_trust_list_verify_named_crt, "gnutls_x509_trust_list_verify_named_crt");
1939         lib.bindSymbol_stdcall(gnutls_x509_trust_list_verify_crt2, "gnutls_x509_trust_list_verify_crt2");
1940         lib.bindSymbol_stdcall(gnutls_x509_trust_list_verify_crt, "gnutls_x509_trust_list_verify_crt");
1941         lib.bindSymbol_stdcall(gnutls_x509_trust_list_add_trust_mem, "gnutls_x509_trust_list_add_trust_mem");
1942         lib.bindSymbol_stdcall(gnutls_x509_trust_list_add_trust_file, "gnutls_x509_trust_list_add_trust_file");
1943         lib.bindSymbol_stdcall(gnutls_x509_trust_list_add_trust_dir, "gnutls_x509_trust_list_add_trust_dir");
1944         lib.bindSymbol_stdcall(gnutls_x509_trust_list_remove_trust_file, "gnutls_x509_trust_list_remove_trust_file");
1945         lib.bindSymbol_stdcall(gnutls_x509_trust_list_remove_trust_mem, "gnutls_x509_trust_list_remove_trust_mem");
1946         lib.bindSymbol_stdcall(gnutls_x509_trust_list_add_system_trust, "gnutls_x509_trust_list_add_system_trust");
1947         lib.bindSymbol_stdcall(gnutls_certificate_set_trust_list, "gnutls_certificate_set_trust_list");
1948         lib.bindSymbol_stdcall(gnutls_certificate_get_trust_list, "gnutls_certificate_get_trust_list");
1949         lib.bindSymbol_stdcall(gnutls_x509_ext_deinit, "gnutls_x509_ext_deinit");
1950         lib.bindSymbol_stdcall(gnutls_x509_ext_print, "gnutls_x509_ext_print");
1951     }
1952 }