summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-11-14 12:50:33 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-11-14 12:50:33 +0000
commitf248ebfafeb6523cdafef464298db962307a411c (patch)
tree94fadca03c0884a442056747b28892018368dcc6 /includes
parent86eaad6293176bed3b3ea78ef4954d97c37b3ae7 (diff)
downloadgnutls-f248ebfafeb6523cdafef464298db962307a411c.tar.gz
Compatibility header for gnutls4 is no longer included in gnutls.h. Added deprecated warnings to gnutls8 stuff.
Diffstat (limited to 'includes')
-rw-r--r--includes/gnutls/compat8.h66
-rw-r--r--includes/gnutls/x509.h16
2 files changed, 50 insertions, 32 deletions
diff --git a/includes/gnutls/compat8.h b/includes/gnutls/compat8.h
index 3fe274135b..a26c9dc968 100644
--- a/includes/gnutls/compat8.h
+++ b/includes/gnutls/compat8.h
@@ -11,6 +11,24 @@
#define GNUTLS_X509_S_SIZE 256
#define GNUTLS_X509_EMAIL_SIZE 256
+#ifdef __GNUC__
+
+#define _GT_GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+
+#if _GT_GCC_VERSION >= 30100
+# ifndef DEPRECATED
+# define DEPRECATED __attribute__ ((__deprecated__))
+# endif
+#endif
+
+#endif
+
+#ifndef DEPRECATED
+# define DEPRECATED
+#endif
+
typedef struct {
char common_name[GNUTLS_X509_CN_SIZE];
char country[GNUTLS_X509_C_SIZE];
@@ -19,49 +37,49 @@ typedef struct {
char locality_name[GNUTLS_X509_L_SIZE];
char state_or_province_name[GNUTLS_X509_S_SIZE];
char email[GNUTLS_X509_EMAIL_SIZE];
-} gnutls_x509_dn;
+} gnutls_x509_dn DEPRECATED;
typedef struct {
char name[GNUTLS_X509_CN_SIZE];
char email[GNUTLS_X509_CN_SIZE];
-} gnutls_openpgp_name;
+} gnutls_openpgp_name DEPRECATED;
-int gnutls_x509_extract_dn( const gnutls_datum*, gnutls_x509_dn*);
+int gnutls_x509_extract_dn( const gnutls_datum*, gnutls_x509_dn*) DEPRECATED;
int gnutls_x509_extract_dn_string(const gnutls_datum * idn,
- char *buf, unsigned int sizeof_buf);
-int gnutls_x509_extract_certificate_dn( const gnutls_datum*, gnutls_x509_dn*);
+ char *buf, unsigned int sizeof_buf) DEPRECATED;
+int gnutls_x509_extract_certificate_dn( const gnutls_datum*, gnutls_x509_dn*) DEPRECATED;
int gnutls_x509_extract_certificate_dn_string(char *buf, unsigned int sizeof_buf,
- const gnutls_datum * cert, int issuer);
-int gnutls_x509_extract_certificate_issuer_dn( const gnutls_datum*, gnutls_x509_dn *);
-int gnutls_x509_extract_certificate_version( const gnutls_datum*);
-int gnutls_x509_extract_certificate_serial(const gnutls_datum * cert, char* result, int* result_size);
-time_t gnutls_x509_extract_certificate_activation_time( const gnutls_datum*);
-time_t gnutls_x509_extract_certificate_expiration_time( const gnutls_datum*);
-int gnutls_x509_extract_certificate_subject_alt_name( const gnutls_datum*, int seq, char*, int*);
-int gnutls_x509_pkcs7_extract_certificate(const gnutls_datum * pkcs7_struct, int indx, char* certificate, int* certificate_size);
-int gnutls_x509_extract_certificate_pk_algorithm( const gnutls_datum * cert, int* bits);
-int gnutls_x509_extract_certificate_ca_status(const gnutls_datum * cert);
-int gnutls_x509_extract_key_pk_algorithm( const gnutls_datum * key);
-
-int gnutls_x509_verify_certificate( const gnutls_datum* cert_list, int cert_list_length, const gnutls_datum * CA_list, int CA_list_length, const gnutls_datum* CRL_list, int CRL_list_length);
+ const gnutls_datum * cert, int issuer) DEPRECATED;
+int gnutls_x509_extract_certificate_issuer_dn( const gnutls_datum*, gnutls_x509_dn *) DEPRECATED;
+int gnutls_x509_extract_certificate_version( const gnutls_datum*) DEPRECATED;
+int gnutls_x509_extract_certificate_serial(const gnutls_datum * cert, char* result, int* result_size) DEPRECATED;
+time_t gnutls_x509_extract_certificate_activation_time( const gnutls_datum*) DEPRECATED;
+time_t gnutls_x509_extract_certificate_expiration_time( const gnutls_datum*) DEPRECATED;
+int gnutls_x509_extract_certificate_subject_alt_name( const gnutls_datum*, int seq, char*, int*) DEPRECATED;
+int gnutls_x509_pkcs7_extract_certificate(const gnutls_datum * pkcs7_struct, int indx, char* certificate, int* certificate_size) DEPRECATED;
+int gnutls_x509_extract_certificate_pk_algorithm( const gnutls_datum * cert, int* bits) DEPRECATED;
+int gnutls_x509_extract_certificate_ca_status(const gnutls_datum * cert) DEPRECATED;
+int gnutls_x509_extract_key_pk_algorithm( const gnutls_datum * key) DEPRECATED;
+
+int gnutls_x509_verify_certificate( const gnutls_datum* cert_list, int cert_list_length, const gnutls_datum * CA_list, int CA_list_length, const gnutls_datum* CRL_list, int CRL_list_length) DEPRECATED;
int gnutls_x509_check_certificates_hostname(const gnutls_datum * cert,
- const char *hostname);
+ const char *hostname) DEPRECATED;
#define gnutls_x509_fingerprint gnutls_fingerprint
#define gnutls_x509_certificate_format gnutls_x509_crt_fmt
-int gnutls_x509_extract_key_pk_algorithm( const gnutls_datum * key);
+int gnutls_x509_extract_key_pk_algorithm( const gnutls_datum * key) DEPRECATED;
int gnutls_rsa_params_set(gnutls_rsa_params rsa_params,
gnutls_datum m, gnutls_datum e, gnutls_datum d,
gnutls_datum p, gnutls_datum q, gnutls_datum u,
- int bits);
+ int bits) DEPRECATED;
int gnutls_rsa_params_generate(gnutls_datum * m, gnutls_datum *e,
gnutls_datum *d, gnutls_datum *p, gnutls_datum* q,
- gnutls_datum* u, int bits);
+ gnutls_datum* u, int bits) DEPRECATED;
-int gnutls_dh_params_set( gnutls_dh_params, gnutls_datum prime, gnutls_datum generator, int bits);
-int gnutls_dh_params_generate( gnutls_datum* prime, gnutls_datum* generator, int bits);
+int gnutls_dh_params_set( gnutls_dh_params, gnutls_datum prime, gnutls_datum generator, int bits) DEPRECATED;
+int gnutls_dh_params_generate( gnutls_datum* prime, gnutls_datum* generator, int bits) DEPRECATED;
#define gnutls_certificate_set_rsa_params gnutls_certificate_set_rsa_export_params
diff --git a/includes/gnutls/x509.h b/includes/gnutls/x509.h
index 59db880077..a26222cefa 100644
--- a/includes/gnutls/x509.h
+++ b/includes/gnutls/x509.h
@@ -56,11 +56,11 @@ int gnutls_x509_crt_export( gnutls_x509_crt cert,
int gnutls_x509_crt_get_issuer_dn(gnutls_x509_crt cert, char *buf,
size_t *sizeof_buf);
int gnutls_x509_crt_get_issuer_dn_by_oid(gnutls_x509_crt cert,
- const char* oid, int indx, char *buf, size_t *sizeof_buf);
+ const char* oid, int indx, void *buf, size_t *sizeof_buf);
int gnutls_x509_crt_get_dn(gnutls_x509_crt cert, char *buf,
size_t *sizeof_buf);
-int gnutls_x509_crt_get_dn_by_oid(gnutls_x509_crt cert,
- const char* oid, int indx, char *buf, size_t *sizeof_buf);
+int gnutls_x509_crt_get_dn_by_oid(gnutls_x509_crt cert, const char* oid,
+ int indx, void *buf, size_t *sizeof_buf);
int gnutls_x509_crt_check_hostname(gnutls_x509_crt cert,
const char *hostname);
@@ -110,9 +110,9 @@ int gnutls_x509_crt_to_xml(gnutls_x509_crt cert, gnutls_datum* res, int detail);
/* X.509 Certificate writing.
*/
int gnutls_x509_crt_set_dn_by_oid(gnutls_x509_crt crt, const char* oid,
- const char *name, unsigned int sizeof_name);
+ const void *name, unsigned int sizeof_name);
int gnutls_x509_crt_set_issuer_dn_by_oid(gnutls_x509_crt crt, const char* oid,
- const char *name, unsigned int sizeof_name);
+ const void *name, unsigned int sizeof_name);
int gnutls_x509_crt_set_version(gnutls_x509_crt crt, unsigned int version);
int gnutls_x509_crt_set_key(gnutls_x509_crt crt, gnutls_x509_privkey key);
int gnutls_x509_crt_set_ca_status(gnutls_x509_crt crt, unsigned int ca);
@@ -149,7 +149,7 @@ int gnutls_x509_crl_export( gnutls_x509_crl crl,
int gnutls_x509_crl_get_issuer_dn(const gnutls_x509_crl crl,
char *buf, size_t *sizeof_buf);
int gnutls_x509_crl_get_issuer_dn_by_oid(gnutls_x509_crl crl,
- const char* oid, int indx, char *buf, size_t *sizeof_buf);
+ const char* oid, int indx, void *buf, size_t *sizeof_buf);
int gnutls_x509_crl_get_signature_algorithm(gnutls_x509_crl crl);
int gnutls_x509_crl_get_version(gnutls_x509_crl crl);
@@ -292,9 +292,9 @@ int gnutls_x509_crq_get_pk_algorithm( gnutls_x509_crq crq, unsigned int* bits);
int gnutls_x509_crq_get_dn(gnutls_x509_crq crq, char *buf,
size_t *sizeof_buf);
int gnutls_x509_crq_get_dn_by_oid(gnutls_x509_crq crq, const char* oid,
- int indx, char *buf, size_t *sizeof_buf);
+ int indx, void *buf, size_t *sizeof_buf);
int gnutls_x509_crq_set_dn_by_oid(gnutls_x509_crq crq, const char* oid,
- const char *name, unsigned int sizeof_name);
+ const void *name, unsigned int sizeof_name);
int gnutls_x509_crq_set_version(gnutls_x509_crq crq, unsigned int version);
int gnutls_x509_crq_set_key(gnutls_x509_crq crq, gnutls_x509_privkey key);
int gnutls_x509_crq_sign(gnutls_x509_crq crq, gnutls_x509_privkey key);