wmbiff: Fix compiler warnings from deprecated gnutls types.

This commit is contained in:
Doug Torrance 2014-11-07 21:31:23 -06:00 committed by Carlos R. Mafra
parent ef5a71aa20
commit 5280405ca6
3 changed files with 22 additions and 22 deletions

View file

@ -34,10 +34,10 @@ static const char *my_ctime(const time_t * tv)
}
void print_x509_info(gnutls_session session, const char* hostname)
void print_x509_info(gnutls_session_t session, const char* hostname)
{
gnutls_x509_crt crt;
const gnutls_datum *cert_list;
gnutls_x509_crt_t crt;
const gnutls_datum_t *cert_list;
unsigned int cert_list_size = 0;
int ret;
char digest[20];
@ -107,7 +107,7 @@ void print_x509_info(gnutls_session session, const char* hostname)
if (xml) {
#ifdef ENABLE_PKI
gnutls_datum xml_data;
gnutls_datum_t xml_data;
ret = gnutls_x509_crt_to_xml( crt, &xml_data, 0);
if (ret < 0) {
@ -200,7 +200,7 @@ void print_x509_info(gnutls_session session, const char* hostname)
#ifdef HAVE_LIBOPENCDK
void print_openpgp_info(gnutls_session session, const char* hostname)
void print_openpgp_info(gnutls_session_t session, const char* hostname)
{
char digest[20];
@ -212,7 +212,7 @@ void print_openpgp_info(gnutls_session session, const char* hostname)
char name[256];
size_t name_len = sizeof(name);
gnutls_openpgp_key crt;
const gnutls_datum *cert_list;
const gnutls_datum_t *cert_list;
unsigned int cert_list_size = 0;
time_t expiret;
time_t activet;
@ -259,7 +259,7 @@ void print_openpgp_info(gnutls_session session, const char* hostname)
}
if (xml) {
gnutls_datum xml_data;
gnutls_datum_t xml_data;
ret = gnutls_openpgp_key_to_xml( crt, &xml_data, 0);
if (ret < 0) {
@ -332,7 +332,7 @@ void print_openpgp_info(gnutls_session session, const char* hostname)
#endif
void print_cert_vrfy(gnutls_session session)
void print_cert_vrfy(gnutls_session_t session)
{
unsigned int status;
@ -369,11 +369,11 @@ void print_cert_vrfy(gnutls_session session)
}
}
int print_info(gnutls_session session, const char* hostname)
int print_info(gnutls_session_t session, const char* hostname)
{
const char *tmp;
gnutls_credentials_type cred;
gnutls_kx_algorithm kx;
gnutls_credentials_type_t cred;
gnutls_kx_algorithm_t kx;
/* print the key exchange's algorithm name
@ -454,7 +454,7 @@ int print_info(gnutls_session session, const char* hostname)
return 0;
}
void print_cert_info(gnutls_session session, const char* hostname)
void print_cert_info(gnutls_session_t session, const char* hostname)
{
printf("- Certificate type: ");

View file

@ -25,8 +25,8 @@
extern const char str_unknown[];
int print_info( gnutls_session state, const char* hostname);
void print_cert_info( gnutls_session state, const char* hostname);
int print_info( gnutls_session_t state, const char* hostname);
void print_cert_info( gnutls_session_t state, const char* hostname);
void print_list(void);
void parse_comp( char** comp, int ncomp, int* comp_priority);

View file

@ -58,8 +58,8 @@ struct connection_state {
int sd;
char *name;
#ifdef USE_GNUTLS
gnutls_session tls_state;
gnutls_certificate_credentials xcred;
gnutls_session_t tls_state;
gnutls_certificate_credentials_t xcred;
#else
/*@null@ */ void *tls_state;
/*@null@ */ void *xcred;
@ -364,13 +364,13 @@ warn_certificate(const struct connection_state *scs, const char *msg)
#define CERT_SEP "-----BEGIN"
/* this bit is based on read_ca_file() in gnutls */
static int tls_compare_certificates(const gnutls_datum * peercert)
static int tls_compare_certificates(const gnutls_datum_t * peercert)
{
gnutls_datum cert;
gnutls_datum_t cert;
unsigned char *ptr;
FILE *fd1;
int ret;
gnutls_datum b64_data;
gnutls_datum_t b64_data;
unsigned char *b64_data_data;
struct stat filestat;
@ -427,9 +427,9 @@ tls_check_certificate(struct connection_state *scs,
{
int ret;
unsigned int certstat;
const gnutls_datum *cert_list;
const gnutls_datum_t *cert_list;
unsigned int cert_list_size = 0;
gnutls_x509_crt cert;
gnutls_x509_crt_t cert;
if (gnutls_auth_get_type(scs->tls_state) != GNUTLS_CRD_CERTIFICATE) {
bad_certificate(scs, "Unable to get certificate from peer.\n");
@ -598,7 +598,7 @@ struct connection_state *initialize_gnutls(int sd, char *name, Pop3 pc,
gnutls_cred_set(scs->tls_state, GNUTLS_CRD_CERTIFICATE,
scs->xcred);
gnutls_transport_set_ptr(scs->tls_state,
(gnutls_transport_ptr) sd);
(gnutls_transport_ptr_t) sd);
do {
zok = gnutls_handshake(scs->tls_state);
}