File indexing completed on 2025-01-18 10:00:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #ifndef GNUTLS_COMPAT_H
0026 #define GNUTLS_COMPAT_H
0027
0028 #ifdef __cplusplus
0029 extern "C" {
0030 #endif
0031
0032 #ifdef __GNUC__
0033
0034 #define _GNUTLS_GCC_VERSION \
0035 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
0036
0037 #if !defined GNUTLS_INTERNAL_BUILD
0038 #if _GNUTLS_GCC_VERSION >= 30100
0039 #define _GNUTLS_GCC_ATTR_DEPRECATED __attribute__((__deprecated__))
0040 #endif
0041 #endif
0042
0043 #endif
0044
0045 #ifndef _GNUTLS_GCC_ATTR_DEPRECATED
0046 #define _GNUTLS_GCC_ATTR_DEPRECATED
0047 #endif
0048
0049
0050 typedef unsigned int gnutls_connection_end_t _GNUTLS_GCC_ATTR_DEPRECATED;
0051
0052
0053 typedef gnutls_cipher_algorithm_t gnutls_cipher_algorithm
0054 _GNUTLS_GCC_ATTR_DEPRECATED;
0055 typedef gnutls_kx_algorithm_t gnutls_kx_algorithm _GNUTLS_GCC_ATTR_DEPRECATED;
0056 typedef gnutls_mac_algorithm_t gnutls_mac_algorithm _GNUTLS_GCC_ATTR_DEPRECATED;
0057 typedef gnutls_digest_algorithm_t gnutls_digest_algorithm
0058 _GNUTLS_GCC_ATTR_DEPRECATED;
0059 typedef gnutls_compression_method_t gnutls_compression_method
0060 _GNUTLS_GCC_ATTR_DEPRECATED;
0061 typedef gnutls_connection_end_t gnutls_connection_end
0062 _GNUTLS_GCC_ATTR_DEPRECATED;
0063 typedef gnutls_x509_crt_fmt_t gnutls_x509_crt_fmt _GNUTLS_GCC_ATTR_DEPRECATED;
0064 typedef gnutls_pk_algorithm_t gnutls_pk_algorithm _GNUTLS_GCC_ATTR_DEPRECATED;
0065 typedef gnutls_sign_algorithm_t gnutls_sign_algorithm
0066 _GNUTLS_GCC_ATTR_DEPRECATED;
0067 typedef gnutls_close_request_t gnutls_close_request _GNUTLS_GCC_ATTR_DEPRECATED;
0068 typedef gnutls_certificate_request_t gnutls_certificate_request
0069 _GNUTLS_GCC_ATTR_DEPRECATED;
0070 typedef gnutls_certificate_status_t gnutls_certificate_status
0071 _GNUTLS_GCC_ATTR_DEPRECATED;
0072 typedef gnutls_session_t gnutls_session _GNUTLS_GCC_ATTR_DEPRECATED;
0073 typedef gnutls_alert_level_t gnutls_alert_level _GNUTLS_GCC_ATTR_DEPRECATED;
0074 typedef gnutls_alert_description_t gnutls_alert_description
0075 _GNUTLS_GCC_ATTR_DEPRECATED;
0076 typedef gnutls_x509_subject_alt_name_t gnutls_x509_subject_alt_name
0077 _GNUTLS_GCC_ATTR_DEPRECATED;
0078 typedef gnutls_openpgp_privkey_t gnutls_openpgp_privkey
0079 _GNUTLS_GCC_ATTR_DEPRECATED;
0080 typedef gnutls_openpgp_keyring_t gnutls_openpgp_keyring
0081 _GNUTLS_GCC_ATTR_DEPRECATED;
0082 typedef gnutls_x509_crt_t gnutls_x509_crt _GNUTLS_GCC_ATTR_DEPRECATED;
0083 typedef gnutls_x509_privkey_t gnutls_x509_privkey _GNUTLS_GCC_ATTR_DEPRECATED;
0084 typedef gnutls_x509_crl_t gnutls_x509_crl _GNUTLS_GCC_ATTR_DEPRECATED;
0085 typedef gnutls_x509_crq_t gnutls_x509_crq _GNUTLS_GCC_ATTR_DEPRECATED;
0086 typedef gnutls_certificate_credentials_t gnutls_certificate_credentials
0087 _GNUTLS_GCC_ATTR_DEPRECATED;
0088 typedef gnutls_anon_server_credentials_t gnutls_anon_server_credentials
0089 _GNUTLS_GCC_ATTR_DEPRECATED;
0090 typedef gnutls_anon_client_credentials_t gnutls_anon_client_credentials
0091 _GNUTLS_GCC_ATTR_DEPRECATED;
0092 typedef gnutls_srp_client_credentials_t gnutls_srp_client_credentials
0093 _GNUTLS_GCC_ATTR_DEPRECATED;
0094 typedef gnutls_srp_server_credentials_t gnutls_srp_server_credentials
0095 _GNUTLS_GCC_ATTR_DEPRECATED;
0096 typedef gnutls_dh_params_t gnutls_dh_params _GNUTLS_GCC_ATTR_DEPRECATED;
0097 typedef gnutls_rsa_params_t gnutls_rsa_params _GNUTLS_GCC_ATTR_DEPRECATED;
0098 typedef gnutls_params_type_t gnutls_params_type _GNUTLS_GCC_ATTR_DEPRECATED;
0099 typedef gnutls_credentials_type_t gnutls_credentials_type
0100 _GNUTLS_GCC_ATTR_DEPRECATED;
0101 typedef gnutls_certificate_type_t gnutls_certificate_type
0102 _GNUTLS_GCC_ATTR_DEPRECATED;
0103 typedef gnutls_datum_t gnutls_datum _GNUTLS_GCC_ATTR_DEPRECATED;
0104 typedef gnutls_transport_ptr_t gnutls_transport_ptr _GNUTLS_GCC_ATTR_DEPRECATED;
0105
0106
0107 #define GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT (0)
0108
0109
0110
0111 #define GNUTLS_A_MISSING_SRP_USERNAME GNUTLS_A_UNKNOWN_PSK_IDENTITY
0112 #define GNUTLS_A_UNKNOWN_SRP_USERNAME GNUTLS_A_UNKNOWN_PSK_IDENTITY
0113
0114
0115 #define GNUTLS_OPENPGP_KEY GNUTLS_OPENPGP_CERT
0116 #define GNUTLS_OPENPGP_KEY_FINGERPRINT GNUTLS_OPENPGP_CERT_FINGERPRINT
0117 #define gnutls_openpgp_send_key gnutls_openpgp_send_cert
0118 typedef gnutls_openpgp_crt_status_t gnutls_openpgp_key_status_t
0119 _GNUTLS_GCC_ATTR_DEPRECATED;
0120 typedef gnutls_openpgp_crt_t gnutls_openpgp_key_t _GNUTLS_GCC_ATTR_DEPRECATED;
0121 #define gnutls_openpgp_key_init gnutls_openpgp_crt_init
0122 #define gnutls_openpgp_key_deinit gnutls_openpgp_crt_deinit
0123 #define gnutls_openpgp_key_import gnutls_openpgp_crt_import
0124 #define gnutls_openpgp_key_export gnutls_openpgp_crt_export
0125 #define gnutls_openpgp_key_get_key_usage gnutls_openpgp_crt_get_key_usage
0126 #define gnutls_openpgp_key_get_fingerprint gnutls_openpgp_crt_get_fingerprint
0127 #define gnutls_openpgp_key_get_pk_algorithm gnutls_openpgp_crt_get_pk_algorithm
0128 #define gnutls_openpgp_key_get_name gnutls_openpgp_crt_get_name
0129 #define gnutls_openpgp_key_get_version gnutls_openpgp_crt_get_version
0130 #define gnutls_openpgp_key_get_creation_time \
0131 gnutls_openpgp_crt_get_creation_time
0132 #define gnutls_openpgp_key_get_expiration_time \
0133 gnutls_openpgp_crt_get_expiration_time
0134 #define gnutls_openpgp_key_get_id gnutls_openpgp_crt_get_id
0135 #define gnutls_openpgp_key_check_hostname gnutls_openpgp_crt_check_hostname
0136
0137
0138 #define gnutls_openpgp_crt_get_id gnutls_openpgp_crt_get_key_id
0139
0140
0141
0142 #define GNUTLS_X509_CRT_FULL GNUTLS_CRT_PRINT_FULL
0143 #define GNUTLS_X509_CRT_ONELINE GNUTLS_CRT_PRINT_ONELINE
0144 #define GNUTLS_X509_CRT_UNSIGNED_FULL GNUTLS_CRT_PRINT_UNSIGNED_FULL
0145
0146
0147 #define LIBGNUTLS_VERSION GNUTLS_VERSION
0148 #define LIBGNUTLS_VERSION_MAJOR GNUTLS_VERSION_MAJOR
0149 #define LIBGNUTLS_VERSION_MINOR GNUTLS_VERSION_MINOR
0150 #define LIBGNUTLS_VERSION_PATCH GNUTLS_VERSION_PATCH
0151 #define LIBGNUTLS_VERSION_NUMBER GNUTLS_VERSION_NUMBER
0152 #define LIBGNUTLS_EXTRA_VERSION GNUTLS_VERSION
0153
0154
0155
0156
0157 int gnutls_x509_privkey_sign_hash(
0158 gnutls_x509_privkey_t key, const gnutls_datum_t *hash,
0159 gnutls_datum_t *signature) _GNUTLS_GCC_ATTR_DEPRECATED;
0160
0161 int gnutls_openpgp_privkey_sign_hash(
0162 gnutls_openpgp_privkey_t key, const gnutls_datum_t *hash,
0163 gnutls_datum_t *signature) _GNUTLS_GCC_ATTR_DEPRECATED;
0164
0165
0166 int gnutls_x509_crt_get_preferred_hash_algorithm(
0167 gnutls_x509_crt_t crt, gnutls_digest_algorithm_t *hash,
0168 unsigned int *mand) _GNUTLS_GCC_ATTR_DEPRECATED;
0169
0170
0171
0172 #ifdef _ISOC99_SOURCE
0173
0174
0175
0176 static inline const void *gnutls_session_get_server_random(
0177 gnutls_session_t session) _GNUTLS_GCC_ATTR_DEPRECATED;
0178 static inline const void *
0179 gnutls_session_get_server_random(gnutls_session_t session)
0180 {
0181 gnutls_datum_t rnd;
0182 gnutls_session_get_random(session, NULL, &rnd);
0183 return rnd.data;
0184 }
0185
0186 static inline const void *gnutls_session_get_client_random(
0187 gnutls_session_t session) _GNUTLS_GCC_ATTR_DEPRECATED;
0188 static inline const void *
0189 gnutls_session_get_client_random(gnutls_session_t session)
0190 {
0191 gnutls_datum_t rnd;
0192 gnutls_session_get_random(session, &rnd, NULL);
0193 return rnd.data;
0194 }
0195 #endif
0196
0197 void gnutls_global_set_mem_functions(gnutls_alloc_function alloc_func,
0198 gnutls_alloc_function secure_alloc_func,
0199 gnutls_is_secure_function is_secure_func,
0200 gnutls_realloc_function realloc_func,
0201 gnutls_free_function free_func)
0202 _GNUTLS_GCC_ATTR_DEPRECATED;
0203
0204
0205 #define GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA 0
0206
0207
0208 gnutls_compression_method_t
0209 gnutls_compression_get(gnutls_session_t session) _GNUTLS_GCC_ATTR_DEPRECATED;
0210
0211 const char *gnutls_compression_get_name(gnutls_compression_method_t algorithm)
0212 __GNUTLS_CONST__ _GNUTLS_GCC_ATTR_DEPRECATED;
0213
0214 gnutls_compression_method_t gnutls_compression_get_id(const char *name)
0215 __GNUTLS_CONST__ _GNUTLS_GCC_ATTR_DEPRECATED;
0216
0217 const gnutls_compression_method_t *
0218 gnutls_compression_list(void) __GNUTLS_PURE__ _GNUTLS_GCC_ATTR_DEPRECATED;
0219
0220 int gnutls_priority_compression_list(gnutls_priority_t pcache,
0221 const unsigned int **list)
0222 _GNUTLS_GCC_ATTR_DEPRECATED;
0223
0224 #ifdef __cplusplus
0225 }
0226 #endif
0227
0228 #endif