summaryrefslogtreecommitdiff
path: root/includes/gnutls/compat4.h
blob: 2193d96ea1ff774dccfc34f8366fa861f25b67b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/* defines for compatibility with older versions.
 */

#define gnutls_DN gnutls_x509_dn
#define GNUTLS_X509_SUBJECT_ALT_NAME gnutls_x509_subject_alt_name

#define GNUTLS_RSA_PARAMS gnutls_rsa_params
#define GNUTLS_DH_PARAMS gnutls_dh_params
#define GNUTLS_STATE gnutls_session
#define GNUTLS_LIST const int*
#define GNUTLS_TRANSPORT_PTR gnutls_transport_ptr
#define GNUTLS_PKAlgorithm gnutls_pk_algorithm
#define GNUTLS_X509_CertificateFmt gnutls_x509_certificate_format
#define GNUTLS_CertificateType gnutls_certificate_type
#define GNUTLS_Version gnutls_protocol_version
#define GNUTLS_CloseRequest gnutls_close_request
#define GNUTLS_OpenPGPKeyStatus gnutls_openpgp_key_status
#define GNUTLS_CertificateRequest gnutls_certificate_request
#define GNUTLS_CertificateStatus gnutls_certificate_status
#define GNUTLS_ConnectionEnd gnutls_connection_end
#define GNUTLS_CompressionMethod gnutls_compression_method
#define GNUTLS_DigestAlgorithm gnutls_digest_algorithm
#define GNUTLS_CredType gnutls_credentials_type
#define GNUTLS_KXAlgorithm gnutls_kx_algorithm
#define GNUTLS_BulkCipherAlgorithm gnutls_cipher_algorithm
#define GNUTLS_MACAlgorithm gnutls_mac_algorithm
#define GNUTLS_AlertLevel gnutls_alert_level
#define GNUTLS_AlertDescription gnutls_alert_description
#define GNUTLS_CERTIFICATE_CLIENT_CREDENTIALS gnutls_certificate_client_credentials
#define GNUTLS_CERTIFICATE_SERVER_CREDENTIALS gnutls_certificate_server_credentials
#define GNUTLS_CERTIFICATE_CREDENTIALS gnutls_certificate_credentials
#define GNUTLS_ANON_SERVER_CREDENTIALS gnutls_anon_server_credentials
#define GNUTLS_ANON_CLIENT_CREDENTIALS gnutls_anon_client_credentials
#define gnutls_transport_set_push_func gnutls_transport_set_push_function
#define gnutls_transport_set_pull_func gnutls_transport_set_pull_function
#define gnutls_global_set_log_func gnutls_global_set_log_function
#define gnutls_global_set_mem_func gnutls_global_set_mem_functions

#define gnutls_certificate_free_sc gnutls_certificate_free_credentials
#define gnutls_certificate_allocate_sc gnutls_certificate_allocate_credentials
#define gnutls_certificate_free_cred gnutls_certificate_free_credentials
#define gnutls_certificate_allocate_cred gnutls_certificate_allocate_credentials

#define gnutls_anon_free_client_sc gnutls_anon_free_client_credentials
#define gnutls_anon_allocate_client_sc gnutls_anon_allocate_client_credentials
#define gnutls_anon_free_server_sc gnutls_anon_free_server_credentials
#define gnutls_anon_allocate_server_sc gnutls_anon_allocate_server_credentials

#define gnutls_anon_free_client_cred gnutls_anon_free_client_credentials
#define gnutls_anon_allocate_client_cred gnutls_anon_allocate_client_credentials
#define gnutls_anon_free_server_cred gnutls_anon_free_server_credentials
#define gnutls_anon_allocate_server_cred gnutls_anon_allocate_server_credentials

#define gnutls_state_get_ptr gnutls_session_get_ptr
#define gnutls_state_set_ptr gnutls_session_set_ptr
#define gnutls_handshake_set_exportable_detection(x,y) 0
#define gnutls_cert_type_get gnutls_certificate_type_get
#define gnutls_cert_type_set_priority gnutls_certificate_type_set_priority
#define gnutls_cert_type_get_name gnutls_certificate_type_get_name
#define gnutls_cred_set	gnutls_credentials_set

#define gnutls_b64_encode_fmt gnutls_pem_base64_encode
#define gnutls_b64_encode_fmt2 gnutls_pem_base64_encode_alloc
#define gnutls_b64_decode_fmt(a,b,c) gnutls_pem_base64_decode( NULL,a,b,c)
#define gnutls_b64_decode_fmt2(a,b)  gnutls_pem_base64_decode_alloc(NULL,a,b)

#define gnutls_handshake_get_direction gnutls_record_get_direction

#define gnutls_certificate_client_select_func gnutls_certificate_client_select_function
#define gnutls_certificate_server_select_func gnutls_certificate_server_select_function

#define gnutls_certificate_client_set_select_func gnutls_certificate_client_set_select_function
#define gnutls_certificate_server_set_select_func gnutls_certificate_server_set_select_function

/* Defines for gnutls-extra */

#define gnutls_srp_server_select_func gnutls_srp_server_select_function
#define gnutls_srp_server_set_select_func gnutls_srp_server_set_select_function

#define GNUTLS_SRP_SERVER_CREDENTIALS gnutls_srp_server_credentials
#define GNUTLS_SRP_CLIENT_CREDENTIALS gnutls_srp_client_credentials

#define gnutls_srp_free_client_sc gnutls_srp_free_client_credentials
#define gnutls_srp_allocate_client_sc gnutls_srp_allocate_client_credentials
#define gnutls_srp_free_client_cred gnutls_srp_free_client_credentials
#define gnutls_srp_allocate_client_cred gnutls_srp_allocate_client_credentials
#define gnutls_srp_set_client_cred gnutls_srp_set_client_credentials

#define gnutls_srp_free_server_sc gnutls_srp_free_server_credentials
#define gnutls_srp_allocate_server_sc gnutls_srp_allocate_server_credentials
#define gnutls_srp_free_server_cred gnutls_srp_free_server_credentials
#define gnutls_srp_allocate_server_cred gnutls_srp_allocate_server_credentials
#define gnutls_srp_set_server_cred_file gnutls_srp_set_server_credentials_file

#define gnutls_set_server_name gnutls_server_name_set
#define gnutls_get_server_name gnutls_server_name_get

#define GNUTLS_E_PARSING_ERROR GNUTLS_E_BASE64_DECODING_ERROR
#define GNUTLS_E_PWD_ERROR GNUTLS_E_SRP_PWD_ERROR
#define GNUTLS_E_ASCII_ARMOR_ERROR GNUTLS_E_BASE64_DECODING_ERROR