summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2013-08-18 21:45:04 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-08-25 01:32:20 +0300
commit0c382d457fa3d7af102798c2c6cb90919349675d (patch)
tree47e906ab1430a84249b7b4677651b90a800385a7 /tests
parent9b3fccf68d34a96585bb4311e7b2d7dd86864e91 (diff)
downloadgnutls-0c382d457fa3d7af102798c2c6cb90919349675d.tar.gz
fix transport parameter casts in tests
Diffstat (limited to 'tests')
-rw-r--r--tests/anonself.c4
-rw-r--r--tests/dhepskself.c4
-rw-r--r--tests/dtls/dtls-stress.c4
-rw-r--r--tests/mini-alpn.c4
-rw-r--r--tests/mini-deflate.c4
-rw-r--r--tests/mini-dtls-heartbeat.c4
-rw-r--r--tests/mini-dtls-hello-verify.c6
-rw-r--r--tests/mini-dtls-large.c4
-rw-r--r--tests/mini-dtls-record.c4
-rw-r--r--tests/mini-dtls-rehandshake.c4
-rw-r--r--tests/mini-dtls-srtp.c4
-rw-r--r--tests/mini-eagain-dtls.c4
-rw-r--r--tests/mini-eagain.c4
-rw-r--r--tests/mini-emsgsize-dtls.c4
-rw-r--r--tests/mini-handshake-timeout.c4
-rw-r--r--tests/mini-loss-time.c4
-rw-r--r--tests/mini-overhead.c4
-rw-r--r--tests/mini-record-range.c4
-rw-r--r--tests/mini-record.c4
-rw-r--r--tests/mini-rehandshake.c4
-rw-r--r--tests/mini-termination.c4
-rw-r--r--tests/mini-x509-2.c4
-rw-r--r--tests/mini-x509-callbacks.c4
-rw-r--r--tests/mini-x509-cas.c4
-rw-r--r--tests/mini-x509.c4
-rw-r--r--tests/mini-xssl.c4
-rw-r--r--tests/openpgp-auth.c8
-rw-r--r--tests/openpgp-auth2.c8
-rw-r--r--tests/openpgpself.c4
-rw-r--r--tests/pskself.c4
-rw-r--r--tests/record-sizes-range.c4
-rw-r--r--tests/record-sizes.c4
-rw-r--r--tests/resume-dtls.c4
-rw-r--r--tests/resume.c4
-rw-r--r--tests/safe-renegotiation/srn0.c4
-rw-r--r--tests/safe-renegotiation/srn1.c4
-rw-r--r--tests/safe-renegotiation/srn2.c4
-rw-r--r--tests/safe-renegotiation/srn3.c4
-rw-r--r--tests/safe-renegotiation/srn4.c4
-rw-r--r--tests/safe-renegotiation/srn5.c4
-rw-r--r--tests/srp/mini-srp.c4
-rw-r--r--tests/suite/mini-eagain2.c2
-rw-r--r--tests/suite/mini-record-timing.c4
-rw-r--r--tests/x509dn.c4
-rw-r--r--tests/x509self.c4
45 files changed, 90 insertions, 98 deletions
diff --git a/tests/anonself.c b/tests/anonself.c
index 843647164e..9cdaaf576c 100644
--- a/tests/anonself.c
+++ b/tests/anonself.c
@@ -93,7 +93,7 @@ client (int sd)
*/
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
/* Perform the TLS handshake
*/
@@ -225,7 +225,7 @@ server (int sd)
session = initialize_tls_session ();
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
ret = gnutls_handshake (session);
if (ret < 0)
{
diff --git a/tests/dhepskself.c b/tests/dhepskself.c
index ef7373bae2..dcb91fa15e 100644
--- a/tests/dhepskself.c
+++ b/tests/dhepskself.c
@@ -94,7 +94,7 @@ client (int sd)
*/
gnutls_credentials_set (session, GNUTLS_CRD_PSK, pskcred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
/* Perform the TLS handshake
*/
@@ -227,7 +227,7 @@ server (int sd)
session = initialize_tls_session ();
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
ret = gnutls_handshake (session);
if (ret < 0)
{
diff --git a/tests/dtls/dtls-stress.c b/tests/dtls/dtls-stress.c
index 814ea1b9a3..7e758bbbf3 100644
--- a/tests/dtls/dtls-stress.c
+++ b/tests/dtls/dtls-stress.c
@@ -396,7 +396,7 @@ static void filter_run_next(gnutls_transport_ptr_t fd,
if (fn) {
fn(fd, buffer, len);
} else {
- send((intptr_t) fd, buffer, len, 0);
+ send((int)(intptr_t) fd, buffer, len, 0);
}
filter_current_idx--;
}
@@ -613,7 +613,7 @@ static void session_init(int sock, int server)
gnutls_init(&session, GNUTLS_DATAGRAM | (server ? GNUTLS_SERVER : GNUTLS_CLIENT)
| GNUTLS_NONBLOCK * nonblock);
gnutls_priority_set_direct(session, "+CTYPE-OPENPGP:+CIPHER-ALL:+MAC-ALL:+ECDHE-RSA:+ANON-ECDH", 0);
- gnutls_transport_set_ptr(session, (gnutls_transport_ptr_t) (intptr_t) sock);
+ gnutls_transport_set_int(session, sock);
if (full) {
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, cred);
diff --git a/tests/mini-alpn.c b/tests/mini-alpn.c
index 27f8d0fa36..69ddd88191 100644
--- a/tests/mini-alpn.c
+++ b/tests/mini-alpn.c
@@ -117,7 +117,7 @@ client (int fd, const char* protocol1, const char* protocol2)
*/
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -221,7 +221,7 @@ server (int fd, const char* protocol1, const char* protocol2)
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/mini-deflate.c b/tests/mini-deflate.c
index f0789d7cab..f90d8cab36 100644
--- a/tests/mini-deflate.c
+++ b/tests/mini-deflate.c
@@ -88,7 +88,7 @@ doit (void)
gnutls_dh_set_prime_bits (server, 1024);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_anon_allocate_client_credentials (&c_anoncred);
@@ -102,7 +102,7 @@ doit (void)
gnutls_credentials_set (client, GNUTLS_CRD_ANON, c_anoncred);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
HANDSHAKE(client, server);
diff --git a/tests/mini-dtls-heartbeat.c b/tests/mini-dtls-heartbeat.c
index 9fd6a487a1..5b4d995aeb 100644
--- a/tests/mini-dtls-heartbeat.c
+++ b/tests/mini-dtls-heartbeat.c
@@ -109,7 +109,7 @@ client (int fd, int server_init)
*/
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -248,7 +248,7 @@ server (int fd, int server_init)
session = initialize_tls_session ();
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/mini-dtls-hello-verify.c b/tests/mini-dtls-hello-verify.c
index fd45258f68..534d8a6178 100644
--- a/tests/mini-dtls-hello-verify.c
+++ b/tests/mini-dtls-hello-verify.c
@@ -110,7 +110,7 @@ client (int fd)
*/
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
gnutls_transport_set_push_function (session, push);
/* Perform the TLS handshake
@@ -223,7 +223,7 @@ gnutls_session_t session;
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
gnutls_transport_set_push_function (session, push);
for (;;)
@@ -241,7 +241,7 @@ gnutls_session_t session;
{
if (debug) success("Sending hello verify request\n");
- ret = gnutls_dtls_cookie_send(&cookie_key, CLI_ADDR, CLI_ADDR_LEN, &prestate, (gnutls_transport_ptr_t)fd, push);
+ ret = gnutls_dtls_cookie_send(&cookie_key, CLI_ADDR, CLI_ADDR_LEN, &prestate, (gnutls_transport_ptr_t)(long)fd, push);
if (ret < 0)
{
fail("Cannot send data\n");
diff --git a/tests/mini-dtls-large.c b/tests/mini-dtls-large.c
index 58c76afd4d..2aeea92421 100644
--- a/tests/mini-dtls-large.c
+++ b/tests/mini-dtls-large.c
@@ -108,7 +108,7 @@ client (int fd)
*/
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -199,7 +199,7 @@ server (int fd)
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/mini-dtls-record.c b/tests/mini-dtls-record.c
index 6ff6a4a65b..5128d2ed9d 100644
--- a/tests/mini-dtls-record.c
+++ b/tests/mini-dtls-record.c
@@ -217,7 +217,7 @@ client (int fd)
*/
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -334,7 +334,7 @@ server (int fd)
NULL);
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/mini-dtls-rehandshake.c b/tests/mini-dtls-rehandshake.c
index c0af043a88..187d9297b4 100644
--- a/tests/mini-dtls-rehandshake.c
+++ b/tests/mini-dtls-rehandshake.c
@@ -111,7 +111,7 @@ client (int fd, int server_init)
*/
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
gnutls_transport_set_push_function (session, push);
/* Perform the TLS handshake
@@ -253,7 +253,7 @@ char buffer[MAX_BUF + 1];
session = initialize_tls_session ();
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
gnutls_transport_set_push_function (session, push);
do
diff --git a/tests/mini-dtls-srtp.c b/tests/mini-dtls-srtp.c
index 85686b53d4..6d3d8000bd 100644
--- a/tests/mini-dtls-srtp.c
+++ b/tests/mini-dtls-srtp.c
@@ -121,7 +121,7 @@ client (int fd, int profile)
*/
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -243,7 +243,7 @@ server (int fd, int profile)
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/mini-eagain-dtls.c b/tests/mini-eagain-dtls.c
index fe05621f17..93041114f4 100644
--- a/tests/mini-eagain-dtls.c
+++ b/tests/mini-eagain-dtls.c
@@ -84,7 +84,7 @@ doit (void)
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
gnutls_transport_set_pull_timeout_function (server, server_pull_timeout_func);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_anon_allocate_client_credentials (&c_anoncred);
@@ -96,7 +96,7 @@ doit (void)
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
gnutls_transport_set_pull_timeout_function (client, client_pull_timeout_func);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
handshake = 1;
HANDSHAKE(client, server);
diff --git a/tests/mini-eagain.c b/tests/mini-eagain.c
index 7d7d779c81..da856932f1 100644
--- a/tests/mini-eagain.c
+++ b/tests/mini-eagain.c
@@ -84,7 +84,7 @@ doit (void)
gnutls_dh_set_prime_bits (server, 1024);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_anon_allocate_client_credentials (&c_anoncred);
@@ -95,7 +95,7 @@ doit (void)
gnutls_credentials_set (client, GNUTLS_CRD_ANON, c_anoncred);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
handshake = 1;
HANDSHAKE(client, server);
diff --git a/tests/mini-emsgsize-dtls.c b/tests/mini-emsgsize-dtls.c
index dadb82f085..ba1313d4bb 100644
--- a/tests/mini-emsgsize-dtls.c
+++ b/tests/mini-emsgsize-dtls.c
@@ -131,7 +131,7 @@ doit (void)
gnutls_transport_set_push_function (server, server_push_300);
gnutls_transport_set_pull_function (server, server_pull);
gnutls_transport_set_pull_timeout_function (server, server_pull_timeout_func);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_anon_allocate_client_credentials (&c_anoncred);
@@ -143,7 +143,7 @@ doit (void)
gnutls_transport_set_push_function (client, client_push_300);
gnutls_transport_set_pull_function (client, client_pull);
gnutls_transport_set_pull_timeout_function (client, client_pull_timeout_func);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
handshake = 1;
HANDSHAKE_DTLS(client, server);
diff --git a/tests/mini-handshake-timeout.c b/tests/mini-handshake-timeout.c
index 0b220097ab..7079aff7ee 100644
--- a/tests/mini-handshake-timeout.c
+++ b/tests/mini-handshake-timeout.c
@@ -97,7 +97,7 @@ client (int fd, int wait)
*/
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -167,7 +167,7 @@ gnutls_anon_server_credentials_t anoncred;
initialize_tls_session (&session);
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
if (wait) sleep(25);
else do
diff --git a/tests/mini-loss-time.c b/tests/mini-loss-time.c
index 659a5fcc44..6b88eb9378 100644
--- a/tests/mini-loss-time.c
+++ b/tests/mini-loss-time.c
@@ -152,7 +152,7 @@ client (int fd, int packet)
counter = 0;
packet_to_lose = packet;
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
gnutls_transport_set_push_function (session, push);
/* Perform the TLS handshake
@@ -226,7 +226,7 @@ int ret;
counter = 0;
packet_to_lose = packet;
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
gnutls_transport_set_push_function (session, push);
do
diff --git a/tests/mini-overhead.c b/tests/mini-overhead.c
index 1802079461..fb6ceae352 100644
--- a/tests/mini-overhead.c
+++ b/tests/mini-overhead.c
@@ -152,7 +152,7 @@ client (int fd, const char* prio, unsigned overhead)
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, x509_cred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -254,7 +254,7 @@ gnutls_session_t session;
session = initialize_tls_session (prio);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/mini-record-range.c b/tests/mini-record-range.c
index 5d53d4aa51..532ace27a3 100644
--- a/tests/mini-record-range.c
+++ b/tests/mini-record-range.c
@@ -162,7 +162,7 @@ client (int fd, const char* prio)
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, x509_cred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -276,7 +276,7 @@ gnutls_range_st range;
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, x509_cred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/mini-record.c b/tests/mini-record.c
index 88a8ccbe4f..4f0316f4e9 100644
--- a/tests/mini-record.c
+++ b/tests/mini-record.c
@@ -191,7 +191,7 @@ client (int fd, const char* prio)
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, x509_cred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
gnutls_transport_set_push_function (session, push);
/* Perform the TLS handshake
@@ -301,7 +301,7 @@ gnutls_certificate_credentials_t x509_cred;
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, x509_cred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
gnutls_transport_set_push_function (session, push_crippled);
do
diff --git a/tests/mini-rehandshake.c b/tests/mini-rehandshake.c
index ad5f9b9f4f..d3fe336319 100644
--- a/tests/mini-rehandshake.c
+++ b/tests/mini-rehandshake.c
@@ -110,7 +110,7 @@ doit (void)
gnutls_priority_set_direct (server, "NORMAL", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -119,7 +119,7 @@ doit (void)
gnutls_priority_set_direct (client, "NORMAL", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
HANDSHAKE(client, server);
diff --git a/tests/mini-termination.c b/tests/mini-termination.c
index f7c406feff..c4741b59ed 100644
--- a/tests/mini-termination.c
+++ b/tests/mini-termination.c
@@ -147,7 +147,7 @@ client (int fd, const char* prio)
gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, x509_cred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -258,7 +258,7 @@ gnutls_session_t session;
session = initialize_tls_session (prio);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/mini-x509-2.c b/tests/mini-x509-2.c
index f34dc956d6..7e98e5ab8d 100644
--- a/tests/mini-x509-2.c
+++ b/tests/mini-x509-2.c
@@ -145,7 +145,7 @@ void doit(void)
gnutls_priority_set_direct (server, "NORMAL:-CIPHER-ALL:+AES-128-GCM", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -154,7 +154,7 @@ void doit(void)
gnutls_priority_set_direct (client, "NORMAL", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
HANDSHAKE(client, server);
diff --git a/tests/mini-x509-callbacks.c b/tests/mini-x509-callbacks.c
index 64315525ec..9531c1cc2e 100644
--- a/tests/mini-x509-callbacks.c
+++ b/tests/mini-x509-callbacks.c
@@ -160,7 +160,7 @@ void doit(void)
gnutls_priority_set_direct (server, "NORMAL", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
gnutls_certificate_set_verify_function (serverx509cred, server_callback);
gnutls_certificate_server_set_request (server, GNUTLS_CERT_REQUEST);
gnutls_handshake_set_post_client_hello_function (server, post_client_hello_callback);
@@ -173,7 +173,7 @@ void doit(void)
gnutls_priority_set_direct (client, "NORMAL", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
gnutls_certificate_set_verify_function (clientx509cred, client_callback);
HANDSHAKE(client, server);
diff --git a/tests/mini-x509-cas.c b/tests/mini-x509-cas.c
index e17c438507..5e42093292 100644
--- a/tests/mini-x509-cas.c
+++ b/tests/mini-x509-cas.c
@@ -127,7 +127,7 @@ void doit(void)
gnutls_priority_set_direct (server, "NORMAL", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -136,7 +136,7 @@ void doit(void)
gnutls_priority_set_direct (client, "NORMAL", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
HANDSHAKE(client, server);
diff --git a/tests/mini-x509.c b/tests/mini-x509.c
index 8c8e51b2f6..d05dbf821e 100644
--- a/tests/mini-x509.c
+++ b/tests/mini-x509.c
@@ -109,7 +109,7 @@ void doit(void)
gnutls_priority_set_direct (server, "NORMAL:-CIPHER-ALL:+ARCFOUR-128", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -118,7 +118,7 @@ void doit(void)
gnutls_priority_set_direct (client, "NORMAL", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
HANDSHAKE(client, server);
diff --git a/tests/mini-xssl.c b/tests/mini-xssl.c
index 1eef7c84d9..f448ca9644 100644
--- a/tests/mini-xssl.c
+++ b/tests/mini-xssl.c
@@ -201,7 +201,7 @@ client (int fd, unsigned int vmethod, unsigned use_cert)
/* Initialize TLS session
*/
- ret = xssl_client_init(&sb, "localhost", NULL, (gnutls_transport_ptr_t)fd,
+ ret = xssl_client_init(&sb, "localhost", NULL, (gnutls_transport_ptr_t)(long)fd,
NULL, cred, &status, 0);
if (ret < 0)
{
@@ -299,7 +299,7 @@ server (int fd, unsigned vmethod)
/* Initialize TLS session
*/
- ret = xssl_server_init(&sb, (gnutls_transport_ptr_t)fd,
+ ret = xssl_server_init(&sb, (gnutls_transport_ptr_t)(long)fd,
NULL, cred, NULL, 0);
if (ret < 0)
err_quit(ret);
diff --git a/tests/openpgp-auth.c b/tests/openpgp-auth.c
index d2a1e95f5f..ac2b616357 100644
--- a/tests/openpgp-auth.c
+++ b/tests/openpgp-auth.c
@@ -137,9 +137,7 @@ doit ()
gnutls_priority_set_direct (session,
"NONE:+VERS-TLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+DHE-DSS:+DHE-RSA:+CTYPE-OPENPGP",
NULL);
- gnutls_transport_set_ptr (session,
- (gnutls_transport_ptr_t) (intptr_t)
- sockets[0]);
+ gnutls_transport_set_int (session, sockets[0]);
err = gnutls_certificate_allocate_credentials (&cred);
if (err != 0)
@@ -209,9 +207,7 @@ doit ()
gnutls_priority_set_direct (session,
"NONE:+VERS-TLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+DHE-DSS:+DHE-RSA:+RSA:+CTYPE-OPENPGP",
NULL);
- gnutls_transport_set_ptr (session,
- (gnutls_transport_ptr_t) (intptr_t)
- sockets[1]);
+ gnutls_transport_set_int (session, sockets[1]);
err = gnutls_certificate_allocate_credentials (&cred);
if (err != 0)
diff --git a/tests/openpgp-auth2.c b/tests/openpgp-auth2.c
index 9de1497d78..ab2f3a92bc 100644
--- a/tests/openpgp-auth2.c
+++ b/tests/openpgp-auth2.c
@@ -119,9 +119,7 @@ doit ()
fail ("client session %d\n", err);
gnutls_priority_set_direct (session, "NONE:+VERS-TLS1.2:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+DHE-DSS:+DHE-RSA:+CTYPE-OPENPGP", NULL);
- gnutls_transport_set_ptr (session,
- (gnutls_transport_ptr_t) (intptr_t)
- sockets[0]);
+ gnutls_transport_set_int (session, sockets[0]);
err = gnutls_certificate_allocate_credentials (&cred);
if (err != 0)
@@ -182,9 +180,7 @@ doit ()
fail ("server session %d\n", err);
gnutls_priority_set_direct (session, "NONE:+VERS-TLS1.2:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+DHE-DSS:+DHE-RSA:+CTYPE-OPENPGP", NULL);
- gnutls_transport_set_ptr (session,
- (gnutls_transport_ptr_t) (intptr_t)
- sockets[1]);
+ gnutls_transport_set_int (session, sockets[1]);
err = gnutls_certificate_allocate_credentials (&cred);
if (err != 0)
diff --git a/tests/openpgpself.c b/tests/openpgpself.c
index 80b016d853..950c67f64e 100644
--- a/tests/openpgpself.c
+++ b/tests/openpgpself.c
@@ -186,7 +186,7 @@ client (int sds[])
*/
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, xcred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
/* Perform the TLS handshake
*/
@@ -532,7 +532,7 @@ server (int sds[])
session = initialize_tls_session ();
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
ret = gnutls_handshake (session);
if (ret < 0)
{
diff --git a/tests/pskself.c b/tests/pskself.c
index ed5229dba4..3c924dddf2 100644
--- a/tests/pskself.c
+++ b/tests/pskself.c
@@ -98,7 +98,7 @@ client (int sd)
*/
gnutls_credentials_set (session, GNUTLS_CRD_PSK, pskcred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
/* Perform the TLS handshake
*/
@@ -216,7 +216,7 @@ server (int sd)
session = initialize_tls_session ();
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
ret = gnutls_handshake (session);
if (ret < 0)
{
diff --git a/tests/record-sizes-range.c b/tests/record-sizes-range.c
index 9ad1595772..e3eac2fc87 100644
--- a/tests/record-sizes-range.c
+++ b/tests/record-sizes-range.c
@@ -122,7 +122,7 @@ doit (void)
gnutls_dh_set_prime_bits (server, 1024);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_anon_allocate_client_credentials (&c_anoncred);
@@ -131,7 +131,7 @@ doit (void)
gnutls_credentials_set (client, GNUTLS_CRD_ANON, c_anoncred);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
memset(b1, 0, sizeof(b1));
HANDSHAKE(client, server);
diff --git a/tests/record-sizes.c b/tests/record-sizes.c
index 7c84c5f5fb..67773ba324 100644
--- a/tests/record-sizes.c
+++ b/tests/record-sizes.c
@@ -82,7 +82,7 @@ doit (void)
gnutls_dh_set_prime_bits (server, 1024);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_anon_allocate_client_credentials (&c_anoncred);
@@ -91,7 +91,7 @@ doit (void)
gnutls_credentials_set (client, GNUTLS_CRD_ANON, c_anoncred);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
memset(b1, 0, sizeof(b1));
HANDSHAKE(client, server);
diff --git a/tests/resume-dtls.c b/tests/resume-dtls.c
index 65cf3c2ea5..fdb5545255 100644
--- a/tests/resume-dtls.c
+++ b/tests/resume-dtls.c
@@ -140,7 +140,7 @@ client (int sds[], struct params_res *params)
gnutls_free (session_data.data);
}
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
/* Perform the TLS handshake
*/
@@ -340,7 +340,7 @@ server (int sds[], struct params_res *params)
session = initialize_tls_session (params);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
ret = gnutls_handshake (session);
if (ret < 0)
{
diff --git a/tests/resume.c b/tests/resume.c
index 6156007ef9..fda40013d9 100644
--- a/tests/resume.c
+++ b/tests/resume.c
@@ -141,7 +141,7 @@ client (int sds[], struct params_res *params)
gnutls_free (session_data.data);
}
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
/* Perform the TLS handshake
*/
@@ -341,7 +341,7 @@ server (int sds[], struct params_res *params)
session = initialize_tls_session (params);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
ret = gnutls_handshake (session);
if (ret < 0)
{
diff --git a/tests/safe-renegotiation/srn0.c b/tests/safe-renegotiation/srn0.c
index 6de25f5018..3ef03687e1 100644
--- a/tests/safe-renegotiation/srn0.c
+++ b/tests/safe-renegotiation/srn0.c
@@ -115,7 +115,7 @@ void doit(void)
gnutls_priority_set_direct (server, "NORMAL", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -124,7 +124,7 @@ void doit(void)
gnutls_priority_set_direct (client, "NORMAL", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
HANDSHAKE(client, server);
diff --git a/tests/safe-renegotiation/srn1.c b/tests/safe-renegotiation/srn1.c
index 4d400d0b0d..6a1df1ac98 100644
--- a/tests/safe-renegotiation/srn1.c
+++ b/tests/safe-renegotiation/srn1.c
@@ -114,7 +114,7 @@ void doit(void)
gnutls_priority_set_direct (server, "NORMAL:%SAFE_RENEGOTIATION", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -124,7 +124,7 @@ void doit(void)
NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
/* Check that initially no session use the extension. */
if (gnutls_safe_renegotiation_status (server)
diff --git a/tests/safe-renegotiation/srn2.c b/tests/safe-renegotiation/srn2.c
index 613470f749..789c29cc89 100644
--- a/tests/safe-renegotiation/srn2.c
+++ b/tests/safe-renegotiation/srn2.c
@@ -112,7 +112,7 @@ void doit(void)
gnutls_priority_set_direct (server, "NORMAL", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -121,7 +121,7 @@ void doit(void)
gnutls_priority_set_direct (client, "NORMAL", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
/* Check that initially no session use the extension. */
if (gnutls_safe_renegotiation_status (server)
diff --git a/tests/safe-renegotiation/srn3.c b/tests/safe-renegotiation/srn3.c
index aef6f18fe4..ecade2afad 100644
--- a/tests/safe-renegotiation/srn3.c
+++ b/tests/safe-renegotiation/srn3.c
@@ -115,7 +115,7 @@ void doit(void)
NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -124,7 +124,7 @@ void doit(void)
gnutls_priority_set_direct (client, "NORMAL:%SAFE_RENEGOTIATION", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
/* Check that initially no session use the extension. */
if (gnutls_safe_renegotiation_status (server)
diff --git a/tests/safe-renegotiation/srn4.c b/tests/safe-renegotiation/srn4.c
index 5e47154604..45552612da 100644
--- a/tests/safe-renegotiation/srn4.c
+++ b/tests/safe-renegotiation/srn4.c
@@ -114,7 +114,7 @@ void doit(void)
gnutls_priority_set_direct (server, "NORMAL", NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -124,7 +124,7 @@ void doit(void)
NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
HANDSHAKE(client, server);
diff --git a/tests/safe-renegotiation/srn5.c b/tests/safe-renegotiation/srn5.c
index fd2a2cf41d..8b7926347f 100644
--- a/tests/safe-renegotiation/srn5.c
+++ b/tests/safe-renegotiation/srn5.c
@@ -116,7 +116,7 @@ void doit(void)
NULL);
gnutls_transport_set_push_function (server, server_push);
gnutls_transport_set_pull_function (server, server_pull);
- gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+ gnutls_transport_set_ptr (server, server);
/* Init client */
gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -125,7 +125,7 @@ void doit(void)
gnutls_priority_set_direct (client, "NORMAL", NULL);
gnutls_transport_set_push_function (client, client_push);
gnutls_transport_set_pull_function (client, client_pull);
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+ gnutls_transport_set_ptr (client, client);
HANDSHAKE(client, server);
diff --git a/tests/srp/mini-srp.c b/tests/srp/mini-srp.c
index f6c7d0e484..70a684f0d9 100644
--- a/tests/srp/mini-srp.c
+++ b/tests/srp/mini-srp.c
@@ -140,7 +140,7 @@ client (int fd, const char* prio)
gnutls_credentials_set (session, GNUTLS_CRD_SRP, srp_cred);
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, x509_cred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -239,7 +239,7 @@ gnutls_session_t session;
session = initialize_tls_session (prio);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/suite/mini-eagain2.c b/tests/suite/mini-eagain2.c
index e1ee2115cb..11a91a4ddb 100644
--- a/tests/suite/mini-eagain2.c
+++ b/tests/suite/mini-eagain2.c
@@ -188,7 +188,7 @@ main (void)
sd = tcp_connect ();
/* associate gnutls with socket */
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (client, sd);
/* add a callback for data being available for send/receive on socket */
if (!ecore_main_fd_handler_add(sd, ECORE_FD_READ | ECORE_FD_WRITE, (Ecore_Fd_Cb)_process_data, client, NULL, NULL))
{
diff --git a/tests/suite/mini-record-timing.c b/tests/suite/mini-record-timing.c
index 527c3ba5de..bdc7a45105 100644
--- a/tests/suite/mini-record-timing.c
+++ b/tests/suite/mini-record-timing.c
@@ -305,7 +305,7 @@ restart:
/* put the anonymous credentials to the current session
*/
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, x509_cred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
/* Perform the TLS handshake
*/
@@ -483,7 +483,7 @@ restart:
}
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, x509_cred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
+ gnutls_transport_set_int (session, fd);
do
{
diff --git a/tests/x509dn.c b/tests/x509dn.c
index 1ecc51941e..0af95e5c4f 100644
--- a/tests/x509dn.c
+++ b/tests/x509dn.c
@@ -223,7 +223,7 @@ client (int sd)
*/
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, xcred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
/* Perform the TLS handshake
*/
@@ -409,7 +409,7 @@ server (int sd)
session = initialize_tls_session ();
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
ret = gnutls_handshake (session);
if (ret < 0)
{
diff --git a/tests/x509self.c b/tests/x509self.c
index e52c0558c2..91a696d843 100644
--- a/tests/x509self.c
+++ b/tests/x509self.c
@@ -152,7 +152,7 @@ client (int sd)
*/
gnutls_credentials_set (session, GNUTLS_CRD_CERTIFICATE, xcred);
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
/* Perform the TLS handshake
*/
@@ -371,7 +371,7 @@ server (int sd)
session = initialize_tls_session ();
- gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
+ gnutls_transport_set_int (session, sd);
ret = gnutls_handshake (session);
if (ret < 0)
{