summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-11-08 08:37:24 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-11-08 08:37:24 +0000
commit510ec8f1753836621f1118b05f926b46afaaac11 (patch)
tree581b08a19ff8f2685bc19de0c4241044943780bf /src
parent0c900bc575ed5611a1e57af074f0d2f878909476 (diff)
downloadgnutls-510ec8f1753836621f1118b05f926b46afaaac11.tar.gz
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/certtool-gaa.c89
-rw-r--r--src/certtool-gaa.h30
-rw-r--r--src/certtool.gaa1
-rw-r--r--src/common.c11
-rw-r--r--src/crypt-gaa.c33
-rw-r--r--src/crypt-gaa.h14
-rw-r--r--src/crypt.gaa1
-rw-r--r--src/tests.c32
-rw-r--r--src/tests.h2
-rw-r--r--src/tls_test-gaa.c30
-rw-r--r--src/tls_test-gaa.h8
-rw-r--r--src/tls_test.c2
-rw-r--r--src/tls_test.gaa11
13 files changed, 149 insertions, 115 deletions
diff --git a/src/certtool-gaa.c b/src/certtool-gaa.c
index 6f00ac3e0f..0bff82bdbc 100644
--- a/src/certtool-gaa.c
+++ b/src/certtool-gaa.c
@@ -6,6 +6,7 @@
/* C declarations */
+#include <config.h>
#ifdef _WIN32
# include <windows.h>
#endif
@@ -168,35 +169,35 @@ typedef struct _gaainfo gaainfo;
struct _gaainfo
{
-#line 75 "certtool.gaa"
+#line 76 "certtool.gaa"
int debug;
-#line 72 "certtool.gaa"
+#line 73 "certtool.gaa"
char *infile;
-#line 69 "certtool.gaa"
+#line 70 "certtool.gaa"
char *outfile;
-#line 66 "certtool.gaa"
+#line 67 "certtool.gaa"
int bits;
-#line 63 "certtool.gaa"
+#line 64 "certtool.gaa"
int outcert_format;
-#line 60 "certtool.gaa"
+#line 61 "certtool.gaa"
int incert_format;
-#line 57 "certtool.gaa"
+#line 58 "certtool.gaa"
int export;
-#line 54 "certtool.gaa"
+#line 55 "certtool.gaa"
int pkcs8;
-#line 43 "certtool.gaa"
+#line 44 "certtool.gaa"
char *pass;
-#line 40 "certtool.gaa"
+#line 41 "certtool.gaa"
char *ca;
-#line 37 "certtool.gaa"
+#line 38 "certtool.gaa"
char *ca_privkey;
-#line 34 "certtool.gaa"
+#line 35 "certtool.gaa"
char *cert;
-#line 31 "certtool.gaa"
+#line 32 "certtool.gaa"
char *request;
-#line 28 "certtool.gaa"
+#line 29 "certtool.gaa"
char *privkey;
-#line 13 "certtool.gaa"
+#line 14 "certtool.gaa"
int action;
#line 114 "gaa.skel"
@@ -662,21 +663,21 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
{
case GAAOPTID_copyright:
OK = 0;
-#line 81 "certtool.gaa"
+#line 82 "certtool.gaa"
{ print_license(); exit(0); ;};
return GAA_OK;
break;
case GAAOPTID_version:
OK = 0;
-#line 80 "certtool.gaa"
+#line 81 "certtool.gaa"
{ certtool_version(); exit(0); ;};
return GAA_OK;
break;
case GAAOPTID_help:
OK = 0;
-#line 78 "certtool.gaa"
+#line 79 "certtool.gaa"
{ gaa_help(); exit(0); ;};
return GAA_OK;
@@ -686,7 +687,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_debug.arg1, gaa_getint, GAATMP_debug.size1);
gaa_index++;
-#line 76 "certtool.gaa"
+#line 77 "certtool.gaa"
{ gaaval->debug = GAATMP_debug.arg1 ;};
return GAA_OK;
@@ -696,7 +697,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_infile.arg1, gaa_getstr, GAATMP_infile.size1);
gaa_index++;
-#line 73 "certtool.gaa"
+#line 74 "certtool.gaa"
{ gaaval->infile = GAATMP_infile.arg1 ;};
return GAA_OK;
@@ -706,7 +707,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_outfile.arg1, gaa_getstr, GAATMP_outfile.size1);
gaa_index++;
-#line 70 "certtool.gaa"
+#line 71 "certtool.gaa"
{ gaaval->outfile = GAATMP_outfile.arg1 ;};
return GAA_OK;
@@ -716,63 +717,63 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_bits.arg1, gaa_getint, GAATMP_bits.size1);
gaa_index++;
-#line 67 "certtool.gaa"
+#line 68 "certtool.gaa"
{ gaaval->bits = GAATMP_bits.arg1 ;};
return GAA_OK;
break;
case GAAOPTID_outder:
OK = 0;
-#line 64 "certtool.gaa"
+#line 65 "certtool.gaa"
{ gaaval->outcert_format=1 ;};
return GAA_OK;
break;
case GAAOPTID_inder:
OK = 0;
-#line 61 "certtool.gaa"
+#line 62 "certtool.gaa"
{ gaaval->incert_format=1 ;};
return GAA_OK;
break;
case GAAOPTID_export_ciphers:
OK = 0;
-#line 58 "certtool.gaa"
+#line 59 "certtool.gaa"
{ gaaval->export=1 ;};
return GAA_OK;
break;
case GAAOPTID_pkcs8:
OK = 0;
-#line 55 "certtool.gaa"
+#line 56 "certtool.gaa"
{ gaaval->pkcs8=1 ;};
return GAA_OK;
break;
case GAAOPTID_to_p12:
OK = 0;
-#line 52 "certtool.gaa"
+#line 53 "certtool.gaa"
{ gaaval->action = 8; ;};
return GAA_OK;
break;
case GAAOPTID_key_info:
OK = 0;
-#line 50 "certtool.gaa"
+#line 51 "certtool.gaa"
{ gaaval->action = 6; ;};
return GAA_OK;
break;
case GAAOPTID_p12_info:
OK = 0;
-#line 48 "certtool.gaa"
+#line 49 "certtool.gaa"
{ gaaval->action = 9; ;};
return GAA_OK;
break;
case GAAOPTID_certificate_info:
OK = 0;
-#line 46 "certtool.gaa"
+#line 47 "certtool.gaa"
{ gaaval->action = 2; ;};
return GAA_OK;
@@ -782,7 +783,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_password.arg1, gaa_getstr, GAATMP_password.size1);
gaa_index++;
-#line 44 "certtool.gaa"
+#line 45 "certtool.gaa"
{ gaaval->pass = GAATMP_password.arg1 ;};
return GAA_OK;
@@ -792,7 +793,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_load_ca_certificate.arg1, gaa_getstr, GAATMP_load_ca_certificate.size1);
gaa_index++;
-#line 41 "certtool.gaa"
+#line 42 "certtool.gaa"
{ gaaval->ca = GAATMP_load_ca_certificate.arg1 ;};
return GAA_OK;
@@ -802,7 +803,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_load_ca_privkey.arg1, gaa_getstr, GAATMP_load_ca_privkey.size1);
gaa_index++;
-#line 38 "certtool.gaa"
+#line 39 "certtool.gaa"
{ gaaval->ca_privkey = GAATMP_load_ca_privkey.arg1 ;};
return GAA_OK;
@@ -812,7 +813,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_load_certificate.arg1, gaa_getstr, GAATMP_load_certificate.size1);
gaa_index++;
-#line 35 "certtool.gaa"
+#line 36 "certtool.gaa"
{ gaaval->cert = GAATMP_load_certificate.arg1 ;};
return GAA_OK;
@@ -822,7 +823,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_load_request.arg1, gaa_getstr, GAATMP_load_request.size1);
gaa_index++;
-#line 32 "certtool.gaa"
+#line 33 "certtool.gaa"
{ gaaval->request = GAATMP_load_request.arg1 ;};
return GAA_OK;
@@ -832,56 +833,56 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_load_privkey.arg1, gaa_getstr, GAATMP_load_privkey.size1);
gaa_index++;
-#line 29 "certtool.gaa"
+#line 30 "certtool.gaa"
{ gaaval->privkey = GAATMP_load_privkey.arg1 ;};
return GAA_OK;
break;
case GAAOPTID_generate_dh_params:
OK = 0;
-#line 26 "certtool.gaa"
+#line 27 "certtool.gaa"
{ gaaval->action=10; ;};
return GAA_OK;
break;
case GAAOPTID_verify_chain:
OK = 0;
-#line 24 "certtool.gaa"
+#line 25 "certtool.gaa"
{ gaaval->action=5; ;};
return GAA_OK;
break;
case GAAOPTID_generate_request:
OK = 0;
-#line 22 "certtool.gaa"
+#line 23 "certtool.gaa"
{ gaaval->action=3; ;};
return GAA_OK;
break;
case GAAOPTID_generate_privkey:
OK = 0;
-#line 20 "certtool.gaa"
+#line 21 "certtool.gaa"
{ gaaval->action=1; ;};
return GAA_OK;
break;
case GAAOPTID_update_certificate:
OK = 0;
-#line 18 "certtool.gaa"
+#line 19 "certtool.gaa"
{ gaaval->action=7; ;};
return GAA_OK;
break;
case GAAOPTID_generate_certificate:
OK = 0;
-#line 16 "certtool.gaa"
+#line 17 "certtool.gaa"
{ gaaval->action=4; ;};
return GAA_OK;
break;
case GAAOPTID_generate_self_signed:
OK = 0;
-#line 14 "certtool.gaa"
+#line 15 "certtool.gaa"
{ gaaval->action=0; ;};
return GAA_OK;
@@ -910,7 +911,7 @@ int gaa(int argc, char **argv, gaainfo *gaaval)
if(inited == 0)
{
-#line 83 "certtool.gaa"
+#line 84 "certtool.gaa"
{ gaaval->bits = 1024; gaaval->pkcs8 = 0; gaaval->privkey = NULL; gaaval->ca=NULL; gaaval->ca_privkey = NULL;
gaaval->debug=1; gaaval->request = NULL; gaaval->infile = NULL; gaaval->outfile = NULL; gaaval->cert = NULL;
gaaval->incert_format = 0; gaaval->outcert_format = 0; gaaval->action=-1; gaaval->pass = NULL;
diff --git a/src/certtool-gaa.h b/src/certtool-gaa.h
index 1c71592bd7..14261b1b58 100644
--- a/src/certtool-gaa.h
+++ b/src/certtool-gaa.h
@@ -8,35 +8,35 @@ typedef struct _gaainfo gaainfo;
struct _gaainfo
{
-#line 75 "certtool.gaa"
+#line 76 "certtool.gaa"
int debug;
-#line 72 "certtool.gaa"
+#line 73 "certtool.gaa"
char *infile;
-#line 69 "certtool.gaa"
+#line 70 "certtool.gaa"
char *outfile;
-#line 66 "certtool.gaa"
+#line 67 "certtool.gaa"
int bits;
-#line 63 "certtool.gaa"
+#line 64 "certtool.gaa"
int outcert_format;
-#line 60 "certtool.gaa"
+#line 61 "certtool.gaa"
int incert_format;
-#line 57 "certtool.gaa"
+#line 58 "certtool.gaa"
int export;
-#line 54 "certtool.gaa"
+#line 55 "certtool.gaa"
int pkcs8;
-#line 43 "certtool.gaa"
+#line 44 "certtool.gaa"
char *pass;
-#line 40 "certtool.gaa"
+#line 41 "certtool.gaa"
char *ca;
-#line 37 "certtool.gaa"
+#line 38 "certtool.gaa"
char *ca_privkey;
-#line 34 "certtool.gaa"
+#line 35 "certtool.gaa"
char *cert;
-#line 31 "certtool.gaa"
+#line 32 "certtool.gaa"
char *request;
-#line 28 "certtool.gaa"
+#line 29 "certtool.gaa"
char *privkey;
-#line 13 "certtool.gaa"
+#line 14 "certtool.gaa"
int action;
#line 114 "gaa.skel"
diff --git a/src/certtool.gaa b/src/certtool.gaa
index 590dea9418..9272d75b3e 100644
--- a/src/certtool.gaa
+++ b/src/certtool.gaa
@@ -2,6 +2,7 @@
/* C declarations */
+#include <config.h>
#ifdef _WIN32
# include <windows.h>
#endif
diff --git a/src/common.c b/src/common.c
index 8ed9d98602..8eab7f8bca 100644
--- a/src/common.c
+++ b/src/common.c
@@ -637,12 +637,21 @@ void parse_comp(char **comp, int ncomp, int *comp_priority)
}
#ifndef HAVE_INET_NTOP
+
+#ifdef _WIN32
+# include <winsock.h>
+#else
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+#endif
+
const char *inet_ntop(int af, const void *src,
char *dst, size_t cnt)
{
char* ret;
- ret = inet_atop( src);
+ ret = inet_ntoa( *((struct in_addr*)src));
if (strlen(ret) > cnt) {
return NULL;
diff --git a/src/crypt-gaa.c b/src/crypt-gaa.c
index 90c0a00eda..f434c3248c 100644
--- a/src/crypt-gaa.c
+++ b/src/crypt-gaa.c
@@ -6,6 +6,7 @@
/* C declarations */
+#include <config.h>
#ifdef _WIN32
# include <windows.h>
#endif
@@ -148,19 +149,19 @@ typedef struct _gaainfo gaainfo;
struct _gaainfo
{
-#line 31 "crypt.gaa"
+#line 32 "crypt.gaa"
char *create_conf;
-#line 28 "crypt.gaa"
+#line 29 "crypt.gaa"
char *passwd_conf;
-#line 25 "crypt.gaa"
+#line 26 "crypt.gaa"
int verify;
-#line 22 "crypt.gaa"
+#line 23 "crypt.gaa"
int salt;
-#line 19 "crypt.gaa"
+#line 20 "crypt.gaa"
int index;
-#line 16 "crypt.gaa"
+#line 17 "crypt.gaa"
char *passwd;
-#line 13 "crypt.gaa"
+#line 14 "crypt.gaa"
char *username;
#line 114 "gaa.skel"
@@ -538,7 +539,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
{
case GAAOPTID_help:
OK = 0;
-#line 34 "crypt.gaa"
+#line 35 "crypt.gaa"
{ gaa_help(); exit(0); ;};
return GAA_OK;
@@ -548,7 +549,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_create_conf.arg1, gaa_getstr, GAATMP_create_conf.size1);
gaa_index++;
-#line 32 "crypt.gaa"
+#line 33 "crypt.gaa"
{ gaaval->create_conf = GAATMP_create_conf.arg1 ;};
return GAA_OK;
@@ -558,14 +559,14 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_passwd_conf.arg1, gaa_getstr, GAATMP_passwd_conf.size1);
gaa_index++;
-#line 29 "crypt.gaa"
+#line 30 "crypt.gaa"
{ gaaval->passwd_conf = GAATMP_passwd_conf.arg1 ;};
return GAA_OK;
break;
case GAAOPTID_verify:
OK = 0;
-#line 26 "crypt.gaa"
+#line 27 "crypt.gaa"
{ gaaval->verify = 1 ;};
return GAA_OK;
@@ -575,7 +576,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_salt.arg1, gaa_getint, GAATMP_salt.size1);
gaa_index++;
-#line 23 "crypt.gaa"
+#line 24 "crypt.gaa"
{ gaaval->salt = GAATMP_salt.arg1 ;};
return GAA_OK;
@@ -585,7 +586,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_index.arg1, gaa_getint, GAATMP_index.size1);
gaa_index++;
-#line 20 "crypt.gaa"
+#line 21 "crypt.gaa"
{ gaaval->index = GAATMP_index.arg1 ;};
return GAA_OK;
@@ -595,7 +596,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_passwd.arg1, gaa_getstr, GAATMP_passwd.size1);
gaa_index++;
-#line 17 "crypt.gaa"
+#line 18 "crypt.gaa"
{ gaaval->passwd = GAATMP_passwd.arg1 ;};
return GAA_OK;
@@ -605,7 +606,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_username.arg1, gaa_getstr, GAATMP_username.size1);
gaa_index++;
-#line 14 "crypt.gaa"
+#line 15 "crypt.gaa"
{ gaaval->username = GAATMP_username.arg1 ;};
return GAA_OK;
@@ -634,7 +635,7 @@ int gaa(int argc, char **argv, gaainfo *gaaval)
if(inited == 0)
{
-#line 36 "crypt.gaa"
+#line 37 "crypt.gaa"
{ gaaval->username=NULL; gaaval->passwd=NULL; gaaval->salt=0;
gaaval->create_conf=NULL; gaaval->passwd_conf=NULL; gaaval->verify = 0;
gaaval->index = 1; ;};
diff --git a/src/crypt-gaa.h b/src/crypt-gaa.h
index 3957425cde..f904827a54 100644
--- a/src/crypt-gaa.h
+++ b/src/crypt-gaa.h
@@ -8,19 +8,19 @@ typedef struct _gaainfo gaainfo;
struct _gaainfo
{
-#line 31 "crypt.gaa"
+#line 32 "crypt.gaa"
char *create_conf;
-#line 28 "crypt.gaa"
+#line 29 "crypt.gaa"
char *passwd_conf;
-#line 25 "crypt.gaa"
+#line 26 "crypt.gaa"
int verify;
-#line 22 "crypt.gaa"
+#line 23 "crypt.gaa"
int salt;
-#line 19 "crypt.gaa"
+#line 20 "crypt.gaa"
int index;
-#line 16 "crypt.gaa"
+#line 17 "crypt.gaa"
char *passwd;
-#line 13 "crypt.gaa"
+#line 14 "crypt.gaa"
char *username;
#line 114 "gaa.skel"
diff --git a/src/crypt.gaa b/src/crypt.gaa
index 476f6813bf..b3d639bef9 100644
--- a/src/crypt.gaa
+++ b/src/crypt.gaa
@@ -2,6 +2,7 @@
/* C declarations */
+#include <config.h>
#ifdef _WIN32
# include <windows.h>
#endif
diff --git a/src/tests.c b/src/tests.c
index be350fb0ca..c70c7a5eb1 100644
--- a/src/tests.c
+++ b/src/tests.c
@@ -87,7 +87,7 @@ int ret, alert;
return SUCCEED; /* SRP was detected */
}
- if (ret < 0) return FAILED;
+ if (ret < 0) return GFAILED;
gnutls_session_get_data(session, NULL, &session_data_size);
@@ -232,7 +232,7 @@ int ret;
int test_dhe_bits( gnutls_session session) {
int ret;
- if (dh_bits == 0) return FAILED;
+ if (dh_bits == 0) return GFAILED;
printf( " %d", dh_bits);
return SUCCEED;
@@ -276,10 +276,10 @@ int old, secs = 6;
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
ret = do_handshake( session);
- if (ret==FAILED) return ret;
+ if (ret==GFAILED) return ret;
ret = gnutls_bye( session, GNUTLS_SHUT_WR);
- if (ret<0) return FAILED;
+ if (ret<0) return GFAILED;
#ifndef _WIN32
old = siginterrupt( SIGALRM, 1);
@@ -302,7 +302,7 @@ int old, secs = 6;
if (alrm == 0) return UNSURE;
- return FAILED;
+ return GFAILED;
}
@@ -332,12 +332,12 @@ int ret;
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
ret = do_handshake( session);
- if (ret==FAILED) return ret;
+ if (ret==GFAILED) return ret;
if ( gnutls_certificate_type_get(session) == GNUTLS_CRT_OPENPGP)
return SUCCEED;
- return FAILED;
+ return GFAILED;
}
int test_unknown_ciphersuites( gnutls_session session) {
@@ -442,7 +442,7 @@ int ret;
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
ret = do_handshake( session);
- if (ret==FAILED) {
+ if (ret==GFAILED) {
/* disable TLS 1.0 */
if (ssl3_ok!=0) {
protocol_priority[0] = GNUTLS_SSL3;
@@ -470,7 +470,7 @@ int ret;
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
ret = do_handshake( session);
- if (ret == FAILED) return FAILED;
+ if (ret == GFAILED) return GFAILED;
if (gnutls_protocol_get_version(session)==GNUTLS_TLS1) return SUCCEED;
return UNSURE;
@@ -488,12 +488,12 @@ int ret;
gnutls_record_set_max_size( session, 512);
ret = do_handshake( session);
- if (ret == FAILED) return ret;
+ if (ret == GFAILED) return ret;
ret = gnutls_record_get_max_size(session);
if (ret==512) return SUCCEED;
- return FAILED;
+ return GFAILED;
}
int test_hello_extension( gnutls_session session) {
@@ -538,7 +538,7 @@ int ret;
if (ret!=SUCCEED) return ret;
if (tls1_ok!=0 && gnutls_protocol_get_version( session)==GNUTLS_SSL3)
- return FAILED;
+ return GFAILED;
return SUCCEED;
}
@@ -634,7 +634,7 @@ int tmp_session_id_size;
tmp_session_id_size = session_id_size;
ret = do_handshake( session);
- if (ret == FAILED) return ret;
+ if (ret == GFAILED) return ret;
/* check if we actually resumed the previous session */
@@ -646,7 +646,7 @@ int tmp_session_id_size;
if (memcmp(tmp_session_id, session_id, tmp_session_id_size) == 0)
return SUCCEED;
else
- return FAILED;
+ return GFAILED;
}
@@ -665,7 +665,7 @@ int ret;
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
ret = do_handshake( session);
- if (ret == FAILED) return ret;
+ if (ret == GFAILED) return ret;
printf("\n");
print_cert_info( session, hostname);
@@ -721,7 +721,7 @@ int ret;
gnutls_certificate_client_set_select_function( session, cert_callback);
ret = do_handshake( session);
- if (ret ==FAILED) return ret;
+ if (ret ==GFAILED) return ret;
return SUCCEED;
}
diff --git a/src/tests.h b/src/tests.h
index df430b7412..f666f423d5 100644
--- a/src/tests.h
+++ b/src/tests.h
@@ -1,5 +1,5 @@
#define SUCCEED 1
-#define FAILED 0
+#define GFAILED 0
#define UNSURE -1
int test_srp( gnutls_session state);
diff --git a/src/tls_test-gaa.c b/src/tls_test-gaa.c
index f6a1109bea..0235aeddf6 100644
--- a/src/tls_test-gaa.c
+++ b/src/tls_test-gaa.c
@@ -1,6 +1,16 @@
/* File generated by GAA 1.6.2
*/
#define GAA_NO_WIN32
+#line 1 "tls_test.gaa"
+
+
+/* C declarations */
+
+#include <config.h>
+#ifdef _WIN32
+# include <windows.h>
+#endif
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -135,13 +145,13 @@ typedef struct _gaainfo gaainfo;
struct _gaainfo
{
-#line 15 "tls_test.gaa"
+#line 26 "tls_test.gaa"
char *rest_args;
-#line 9 "tls_test.gaa"
+#line 20 "tls_test.gaa"
int more_info;
-#line 6 "tls_test.gaa"
+#line 17 "tls_test.gaa"
int debug;
-#line 3 "tls_test.gaa"
+#line 14 "tls_test.gaa"
int pp;
#line 114 "gaa.skel"
@@ -486,14 +496,14 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
{
case GAAOPTID_help:
OK = 0;
-#line 12 "tls_test.gaa"
+#line 23 "tls_test.gaa"
{ gaa_help(); exit(0); ;};
return GAA_OK;
break;
case GAAOPTID_verbose:
OK = 0;
-#line 10 "tls_test.gaa"
+#line 21 "tls_test.gaa"
{ gaaval->more_info = 1 ;};
return GAA_OK;
@@ -503,7 +513,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_debug.arg1, gaa_getint, GAATMP_debug.size1);
gaa_index++;
-#line 7 "tls_test.gaa"
+#line 18 "tls_test.gaa"
{ gaaval->debug = GAATMP_debug.arg1 ;};
return GAA_OK;
@@ -513,7 +523,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAATMP_port.arg1, gaa_getint, GAATMP_port.size1);
gaa_index++;
-#line 4 "tls_test.gaa"
+#line 15 "tls_test.gaa"
{ gaaval->pp = GAATMP_port.arg1 ;};
return GAA_OK;
@@ -522,7 +532,7 @@ int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list)
GAA_TESTMOREARGS;
GAA_FILL(GAAREST_tmp.arg1, gaa_getstr, GAAREST_tmp.size1);
gaa_index++;
-#line 16 "tls_test.gaa"
+#line 27 "tls_test.gaa"
{ gaaval->rest_args = GAAREST_tmp.arg1; ;};
return GAA_OK;
@@ -551,7 +561,7 @@ int gaa(int argc, char **argv, gaainfo *gaaval)
if(inited == 0)
{
-#line 18 "tls_test.gaa"
+#line 29 "tls_test.gaa"
{ gaaval->rest_args=NULL; gaaval->pp = 443; gaaval->more_info = 0; ;};
}
diff --git a/src/tls_test-gaa.h b/src/tls_test-gaa.h
index 22805265b6..1bdfc00f56 100644
--- a/src/tls_test-gaa.h
+++ b/src/tls_test-gaa.h
@@ -8,13 +8,13 @@ typedef struct _gaainfo gaainfo;
struct _gaainfo
{
-#line 15 "tls_test.gaa"
+#line 26 "tls_test.gaa"
char *rest_args;
-#line 9 "tls_test.gaa"
+#line 20 "tls_test.gaa"
int more_info;
-#line 6 "tls_test.gaa"
+#line 17 "tls_test.gaa"
int debug;
-#line 3 "tls_test.gaa"
+#line 14 "tls_test.gaa"
int pp;
#line 114 "gaa.skel"
diff --git a/src/tls_test.c b/src/tls_test.c
index ed7159adbc..39a2a000f6 100644
--- a/src/tls_test.c
+++ b/src/tls_test.c
@@ -240,7 +240,7 @@ int main(int argc, char **argv)
printf(" %s\n", tls_tests[i].suc_str);
if (i==0) tls1_ok = 1;
if (i==1) ssl3_ok = 1;
- } else if (ret==FAILED)
+ } else if (ret==GFAILED)
printf(" %s\n", tls_tests[i].fail_str);
else printf(" %s\n", tls_tests[i].unsure_str);
diff --git a/src/tls_test.gaa b/src/tls_test.gaa
index dfa4948429..f640bfb2bb 100644
--- a/src/tls_test.gaa
+++ b/src/tls_test.gaa
@@ -1,3 +1,14 @@
+#{
+
+/* C declarations */
+
+#include <config.h>
+#ifdef _WIN32
+# include <windows.h>
+#endif
+
+#}
+
helpnode "GNU TLS debug client\nUsage: gnutls-cli-debug [options] hostname\n\n"
#int pp;