diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-11-12 11:09:30 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-11-12 11:09:30 +0000 |
commit | 265c994eef78c2f412b703af27fd461a3581f3d7 (patch) | |
tree | 849b7a8d5835b54d63d02a69e91cf35514d0309d /includes | |
parent | ec711f96ed72999e0881fa5e58292279c5071114 (diff) | |
download | gnutls-265c994eef78c2f412b703af27fd461a3581f3d7.tar.gz |
added compat.h which has definitions for compatibility with older (0.4.x and 0.5.y, y<5) versions.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/gnutls/compat.h | 89 | ||||
-rw-r--r-- | includes/gnutls/extra.h | 2 |
2 files changed, 89 insertions, 2 deletions
diff --git a/includes/gnutls/compat.h b/includes/gnutls/compat.h new file mode 100644 index 0000000000..d71bafcb91 --- /dev/null +++ b/includes/gnutls/compat.h @@ -0,0 +1,89 @@ +/* defines for compatibility with older versions. + */ +#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 diff --git a/includes/gnutls/extra.h b/includes/gnutls/extra.h index da4b744997..092e925536 100644 --- a/includes/gnutls/extra.h +++ b/includes/gnutls/extra.h @@ -43,10 +43,8 @@ int gnutls_srp_set_server_credentials_file( gnutls_srp_server_credentials res, c const char* gnutls_srp_server_get_username( gnutls_session state); typedef int gnutls_srp_server_select_function(gnutls_session, char **, char**, int); -#define gnutls_srp_server_select_func gnutls_srp_server_select_function void gnutls_srp_server_set_select_function( gnutls_session, gnutls_srp_server_select_function *); -#define gnutls_srp_server_set_select_func gnutls_srp_server_set_select_function /* Openpgp certificate stuff */ int gnutls_openpgp_fingerprint( const gnutls_datum* data, char* result, size_t* result_size); |