From 901d828f30314c1b68314672b8d978f512ead328 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 17 Nov 2008 13:19:26 +0100 Subject: Never include config.h in *.h files. --- src/cli.gaa | 1 + src/common.h | 1 - src/serv.c | 2 ++ src/serv.gaa | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cli.gaa b/src/cli.gaa index c015db5746..d1672177ad 100644 --- a/src/cli.gaa +++ b/src/cli.gaa @@ -2,6 +2,7 @@ /* C declarations */ +#include #include void cli_version(void); diff --git a/src/common.h b/src/common.h index 5ca2b3b97c..01e0fa5cc4 100644 --- a/src/common.h +++ b/src/common.h @@ -1,7 +1,6 @@ #define PORT 5556 #define SERVER "127.0.0.1" -#include #include #include diff --git a/src/serv.c b/src/serv.c index 21359852bc..dbd76c225e 100644 --- a/src/serv.c +++ b/src/serv.c @@ -23,6 +23,8 @@ * (which means it is quite unreadable) */ +#include + #include "common.h" #include "serv-gaa.h" #include diff --git a/src/serv.gaa b/src/serv.gaa index a2c4620557..63a85f39af 100644 --- a/src/serv.gaa +++ b/src/serv.gaa @@ -1,5 +1,6 @@ #{ +#include #include void serv_version(void); -- cgit v1.2.1 From fb8b44ff7770773597f7d32a4c31956d6a6aa5d4 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 17 Nov 2008 13:25:58 +0100 Subject: Work around gnulib+mingw problem. --- src/common.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/common.c b/src/common.c index cc50888154..1edfe3356d 100644 --- a/src/common.c +++ b/src/common.c @@ -19,6 +19,13 @@ */ #include + +/* Work around problem reported in + .*/ +#if GETTIMEOFDAY_CLOBBERS_LOCALTIME +#undef localtime +#endif + #include #include #include -- cgit v1.2.1 From 7d65bf35fd359963aefbff7eb6d7335c3b72d962 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 17 Nov 2008 13:26:18 +0100 Subject: Generated. --- src/cli-gaa.c | 153 +++++++++++++++++++++++++++++---------------------------- src/cli-gaa.h | 78 ++++++++++++++--------------- src/serv-gaa.c | 151 ++++++++++++++++++++++++++++---------------------------- src/serv-gaa.h | 76 ++++++++++++++-------------- 4 files changed, 230 insertions(+), 228 deletions(-) (limited to 'src') diff --git a/src/cli-gaa.c b/src/cli-gaa.c index a6016dd101..29fd0d7b36 100644 --- a/src/cli-gaa.c +++ b/src/cli-gaa.c @@ -6,6 +6,7 @@ /* C declarations */ +#include #include void cli_version(void); @@ -175,83 +176,83 @@ typedef struct _gaainfo gaainfo; struct _gaainfo { -#line 120 "cli.gaa" +#line 121 "cli.gaa" char *rest_args; -#line 112 "cli.gaa" +#line 113 "cli.gaa" int insecure; -#line 109 "cli.gaa" +#line 110 "cli.gaa" char *port; -#line 106 "cli.gaa" +#line 107 "cli.gaa" char *opaque_prf_input; -#line 103 "cli.gaa" +#line 104 "cli.gaa" char *psk_key; -#line 100 "cli.gaa" +#line 101 "cli.gaa" char *psk_username; -#line 97 "cli.gaa" +#line 98 "cli.gaa" char *srp_passwd; -#line 94 "cli.gaa" +#line 95 "cli.gaa" char *srp_username; -#line 91 "cli.gaa" +#line 92 "cli.gaa" char *x509_certfile; -#line 88 "cli.gaa" +#line 89 "cli.gaa" char *x509_keyfile; -#line 85 "cli.gaa" +#line 86 "cli.gaa" char *pgp_subkey; -#line 82 "cli.gaa" +#line 83 "cli.gaa" char *pgp_certfile; -#line 79 "cli.gaa" +#line 80 "cli.gaa" char *pgp_keyring; -#line 76 "cli.gaa" +#line 77 "cli.gaa" char *pgp_keyfile; -#line 73 "cli.gaa" +#line 74 "cli.gaa" char *x509_crlfile; -#line 70 "cli.gaa" +#line 71 "cli.gaa" char *x509_cafile; -#line 67 "cli.gaa" +#line 68 "cli.gaa" char *priorities; -#line 64 "cli.gaa" +#line 65 "cli.gaa" char **ctype; -#line 63 "cli.gaa" +#line 64 "cli.gaa" int nctype; -#line 60 "cli.gaa" +#line 61 "cli.gaa" char **kx; -#line 59 "cli.gaa" +#line 60 "cli.gaa" int nkx; -#line 56 "cli.gaa" +#line 57 "cli.gaa" char **macs; -#line 55 "cli.gaa" +#line 56 "cli.gaa" int nmacs; -#line 52 "cli.gaa" +#line 53 "cli.gaa" char **comp; -#line 51 "cli.gaa" +#line 52 "cli.gaa" int ncomp; -#line 48 "cli.gaa" +#line 49 "cli.gaa" char **proto; -#line 47 "cli.gaa" +#line 48 "cli.gaa" int nproto; -#line 44 "cli.gaa" +#line 45 "cli.gaa" char **ciphers; -#line 43 "cli.gaa" +#line 44 "cli.gaa" int nciphers; -#line 40 "cli.gaa" +#line 41 "cli.gaa" int verbose; -#line 37 "cli.gaa" +#line 38 "cli.gaa" int record_size; -#line 34 "cli.gaa" +#line 35 "cli.gaa" int print_cert; -#line 31 "cli.gaa" +#line 32 "cli.gaa" int disable_extensions; -#line 28 "cli.gaa" +#line 29 "cli.gaa" int fingerprint; -#line 25 "cli.gaa" +#line 26 "cli.gaa" int fmtder; -#line 22 "cli.gaa" +#line 23 "cli.gaa" int crlf; -#line 19 "cli.gaa" +#line 20 "cli.gaa" int starttls; -#line 16 "cli.gaa" +#line 17 "cli.gaa" int resume; -#line 13 "cli.gaa" +#line 14 "cli.gaa" int debug; #line 114 "gaa.skel" @@ -817,28 +818,28 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) { case GAAOPTID_version: OK = 0; -#line 118 "cli.gaa" +#line 119 "cli.gaa" { cli_version(); exit(0); ;}; return GAA_OK; break; case GAAOPTID_help: OK = 0; -#line 116 "cli.gaa" +#line 117 "cli.gaa" { gaa_help(); exit(0); ;}; return GAA_OK; break; case GAAOPTID_list: OK = 0; -#line 115 "cli.gaa" +#line 116 "cli.gaa" { print_list(gaaval->verbose); exit(0); ;}; return GAA_OK; break; case GAAOPTID_insecure: OK = 0; -#line 113 "cli.gaa" +#line 114 "cli.gaa" { gaaval->insecure = 1 ;}; return GAA_OK; @@ -848,7 +849,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_port.arg1, gaa_getstr, GAATMP_port.size1); gaa_index++; -#line 110 "cli.gaa" +#line 111 "cli.gaa" { gaaval->port = GAATMP_port.arg1 ;}; return GAA_OK; @@ -858,7 +859,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_opaque_prf_input.arg1, gaa_getstr, GAATMP_opaque_prf_input.size1); gaa_index++; -#line 107 "cli.gaa" +#line 108 "cli.gaa" { gaaval->opaque_prf_input = GAATMP_opaque_prf_input.arg1 ;}; return GAA_OK; @@ -868,7 +869,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pskkey.arg1, gaa_getstr, GAATMP_pskkey.size1); gaa_index++; -#line 104 "cli.gaa" +#line 105 "cli.gaa" { gaaval->psk_key = GAATMP_pskkey.arg1 ;}; return GAA_OK; @@ -878,7 +879,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pskusername.arg1, gaa_getstr, GAATMP_pskusername.size1); gaa_index++; -#line 101 "cli.gaa" +#line 102 "cli.gaa" { gaaval->psk_username = GAATMP_pskusername.arg1 ;}; return GAA_OK; @@ -888,7 +889,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_srppasswd.arg1, gaa_getstr, GAATMP_srppasswd.size1); gaa_index++; -#line 98 "cli.gaa" +#line 99 "cli.gaa" { gaaval->srp_passwd = GAATMP_srppasswd.arg1 ;}; return GAA_OK; @@ -898,7 +899,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_srpusername.arg1, gaa_getstr, GAATMP_srpusername.size1); gaa_index++; -#line 95 "cli.gaa" +#line 96 "cli.gaa" { gaaval->srp_username = GAATMP_srpusername.arg1 ;}; return GAA_OK; @@ -908,7 +909,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509certfile.arg1, gaa_getstr, GAATMP_x509certfile.size1); gaa_index++; -#line 92 "cli.gaa" +#line 93 "cli.gaa" { gaaval->x509_certfile = GAATMP_x509certfile.arg1 ;}; return GAA_OK; @@ -918,7 +919,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509keyfile.arg1, gaa_getstr, GAATMP_x509keyfile.size1); gaa_index++; -#line 89 "cli.gaa" +#line 90 "cli.gaa" { gaaval->x509_keyfile = GAATMP_x509keyfile.arg1 ;}; return GAA_OK; @@ -928,7 +929,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pgpsubkey.arg1, gaa_getstr, GAATMP_pgpsubkey.size1); gaa_index++; -#line 86 "cli.gaa" +#line 87 "cli.gaa" { gaaval->pgp_subkey = GAATMP_pgpsubkey.arg1 ;}; return GAA_OK; @@ -938,7 +939,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pgpcertfile.arg1, gaa_getstr, GAATMP_pgpcertfile.size1); gaa_index++; -#line 83 "cli.gaa" +#line 84 "cli.gaa" { gaaval->pgp_certfile = GAATMP_pgpcertfile.arg1 ;}; return GAA_OK; @@ -948,7 +949,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pgpkeyring.arg1, gaa_getstr, GAATMP_pgpkeyring.size1); gaa_index++; -#line 80 "cli.gaa" +#line 81 "cli.gaa" { gaaval->pgp_keyring = GAATMP_pgpkeyring.arg1 ;}; return GAA_OK; @@ -958,7 +959,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pgpkeyfile.arg1, gaa_getstr, GAATMP_pgpkeyfile.size1); gaa_index++; -#line 77 "cli.gaa" +#line 78 "cli.gaa" { gaaval->pgp_keyfile = GAATMP_pgpkeyfile.arg1 ;}; return GAA_OK; @@ -968,7 +969,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509crlfile.arg1, gaa_getstr, GAATMP_x509crlfile.size1); gaa_index++; -#line 74 "cli.gaa" +#line 75 "cli.gaa" { gaaval->x509_crlfile = GAATMP_x509crlfile.arg1 ;}; return GAA_OK; @@ -978,7 +979,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509cafile.arg1, gaa_getstr, GAATMP_x509cafile.size1); gaa_index++; -#line 71 "cli.gaa" +#line 72 "cli.gaa" { gaaval->x509_cafile = GAATMP_x509cafile.arg1 ;}; return GAA_OK; @@ -988,7 +989,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_priority.arg1, gaa_getstr, GAATMP_priority.size1); gaa_index++; -#line 68 "cli.gaa" +#line 69 "cli.gaa" { gaaval->priorities = GAATMP_priority.arg1 ;}; return GAA_OK; @@ -996,7 +997,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_ctypes: OK = 0; GAA_LIST_FILL(GAATMP_ctypes.arg1, gaa_getstr, char*, GAATMP_ctypes.size1); -#line 65 "cli.gaa" +#line 66 "cli.gaa" { gaaval->ctype = GAATMP_ctypes.arg1; gaaval->nctype = GAATMP_ctypes.size1 ;}; return GAA_OK; @@ -1004,7 +1005,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_kx: OK = 0; GAA_LIST_FILL(GAATMP_kx.arg1, gaa_getstr, char*, GAATMP_kx.size1); -#line 61 "cli.gaa" +#line 62 "cli.gaa" { gaaval->kx = GAATMP_kx.arg1; gaaval->nkx = GAATMP_kx.size1 ;}; return GAA_OK; @@ -1012,7 +1013,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_macs: OK = 0; GAA_LIST_FILL(GAATMP_macs.arg1, gaa_getstr, char*, GAATMP_macs.size1); -#line 57 "cli.gaa" +#line 58 "cli.gaa" { gaaval->macs = GAATMP_macs.arg1; gaaval->nmacs = GAATMP_macs.size1 ;}; return GAA_OK; @@ -1020,7 +1021,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_comp: OK = 0; GAA_LIST_FILL(GAATMP_comp.arg1, gaa_getstr, char*, GAATMP_comp.size1); -#line 53 "cli.gaa" +#line 54 "cli.gaa" { gaaval->comp = GAATMP_comp.arg1; gaaval->ncomp = GAATMP_comp.size1 ;}; return GAA_OK; @@ -1028,7 +1029,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_protocols: OK = 0; GAA_LIST_FILL(GAATMP_protocols.arg1, gaa_getstr, char*, GAATMP_protocols.size1); -#line 49 "cli.gaa" +#line 50 "cli.gaa" { gaaval->proto = GAATMP_protocols.arg1; gaaval->nproto = GAATMP_protocols.size1 ;}; return GAA_OK; @@ -1036,14 +1037,14 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_ciphers: OK = 0; GAA_LIST_FILL(GAATMP_ciphers.arg1, gaa_getstr, char*, GAATMP_ciphers.size1); -#line 45 "cli.gaa" +#line 46 "cli.gaa" { gaaval->ciphers = GAATMP_ciphers.arg1; gaaval->nciphers = GAATMP_ciphers.size1 ;}; return GAA_OK; break; case GAAOPTID_verbose: OK = 0; -#line 41 "cli.gaa" +#line 42 "cli.gaa" { gaaval->verbose = 1 ;}; return GAA_OK; @@ -1053,56 +1054,56 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_recordsize.arg1, gaa_getint, GAATMP_recordsize.size1); gaa_index++; -#line 38 "cli.gaa" +#line 39 "cli.gaa" { gaaval->record_size = GAATMP_recordsize.arg1 ;}; return GAA_OK; break; case GAAOPTID_print_cert: OK = 0; -#line 35 "cli.gaa" +#line 36 "cli.gaa" { gaaval->print_cert = 1 ;}; return GAA_OK; break; case GAAOPTID_disable_extensions: OK = 0; -#line 32 "cli.gaa" +#line 33 "cli.gaa" { gaaval->disable_extensions = 1 ;}; return GAA_OK; break; case GAAOPTID_fingerprint: OK = 0; -#line 29 "cli.gaa" +#line 30 "cli.gaa" { gaaval->fingerprint = 1 ;}; return GAA_OK; break; case GAAOPTID_x509fmtder: OK = 0; -#line 26 "cli.gaa" +#line 27 "cli.gaa" { gaaval->fmtder = 1 ;}; return GAA_OK; break; case GAAOPTID_crlf: OK = 0; -#line 23 "cli.gaa" +#line 24 "cli.gaa" { gaaval->crlf = 1 ;}; return GAA_OK; break; case GAAOPTID_starttls: OK = 0; -#line 20 "cli.gaa" +#line 21 "cli.gaa" { gaaval->starttls = 1 ;}; return GAA_OK; break; case GAAOPTID_resume: OK = 0; -#line 17 "cli.gaa" +#line 18 "cli.gaa" { gaaval->resume = 1 ;}; return GAA_OK; @@ -1112,7 +1113,7 @@ static 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 14 "cli.gaa" +#line 15 "cli.gaa" { gaaval->debug = GAATMP_debug.arg1 ;}; return GAA_OK; @@ -1121,7 +1122,7 @@ static 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 121 "cli.gaa" +#line 122 "cli.gaa" { gaaval->rest_args = GAAREST_tmp.arg1; ;}; return GAA_OK; @@ -1153,7 +1154,7 @@ int gaa(int argc, char **argv, gaainfo *gaaval) if(inited == 0) { -#line 123 "cli.gaa" +#line 124 "cli.gaa" { gaaval->resume=0; gaaval->port="443"; gaaval->rest_args=NULL; gaaval->ciphers=NULL; gaaval->kx=NULL; gaaval->comp=NULL; gaaval->macs=NULL; gaaval->ctype=NULL; gaaval->nciphers=0; gaaval->nkx=0; gaaval->ncomp=0; gaaval->nmacs=0; gaaval->nctype = 0; gaaval->record_size=0; diff --git a/src/cli-gaa.h b/src/cli-gaa.h index 47e5813a15..6e5af932fe 100644 --- a/src/cli-gaa.h +++ b/src/cli-gaa.h @@ -8,83 +8,83 @@ typedef struct _gaainfo gaainfo; struct _gaainfo { -#line 120 "cli.gaa" +#line 121 "cli.gaa" char *rest_args; -#line 112 "cli.gaa" +#line 113 "cli.gaa" int insecure; -#line 109 "cli.gaa" +#line 110 "cli.gaa" char *port; -#line 106 "cli.gaa" +#line 107 "cli.gaa" char *opaque_prf_input; -#line 103 "cli.gaa" +#line 104 "cli.gaa" char *psk_key; -#line 100 "cli.gaa" +#line 101 "cli.gaa" char *psk_username; -#line 97 "cli.gaa" +#line 98 "cli.gaa" char *srp_passwd; -#line 94 "cli.gaa" +#line 95 "cli.gaa" char *srp_username; -#line 91 "cli.gaa" +#line 92 "cli.gaa" char *x509_certfile; -#line 88 "cli.gaa" +#line 89 "cli.gaa" char *x509_keyfile; -#line 85 "cli.gaa" +#line 86 "cli.gaa" char *pgp_subkey; -#line 82 "cli.gaa" +#line 83 "cli.gaa" char *pgp_certfile; -#line 79 "cli.gaa" +#line 80 "cli.gaa" char *pgp_keyring; -#line 76 "cli.gaa" +#line 77 "cli.gaa" char *pgp_keyfile; -#line 73 "cli.gaa" +#line 74 "cli.gaa" char *x509_crlfile; -#line 70 "cli.gaa" +#line 71 "cli.gaa" char *x509_cafile; -#line 67 "cli.gaa" +#line 68 "cli.gaa" char *priorities; -#line 64 "cli.gaa" +#line 65 "cli.gaa" char **ctype; -#line 63 "cli.gaa" +#line 64 "cli.gaa" int nctype; -#line 60 "cli.gaa" +#line 61 "cli.gaa" char **kx; -#line 59 "cli.gaa" +#line 60 "cli.gaa" int nkx; -#line 56 "cli.gaa" +#line 57 "cli.gaa" char **macs; -#line 55 "cli.gaa" +#line 56 "cli.gaa" int nmacs; -#line 52 "cli.gaa" +#line 53 "cli.gaa" char **comp; -#line 51 "cli.gaa" +#line 52 "cli.gaa" int ncomp; -#line 48 "cli.gaa" +#line 49 "cli.gaa" char **proto; -#line 47 "cli.gaa" +#line 48 "cli.gaa" int nproto; -#line 44 "cli.gaa" +#line 45 "cli.gaa" char **ciphers; -#line 43 "cli.gaa" +#line 44 "cli.gaa" int nciphers; -#line 40 "cli.gaa" +#line 41 "cli.gaa" int verbose; -#line 37 "cli.gaa" +#line 38 "cli.gaa" int record_size; -#line 34 "cli.gaa" +#line 35 "cli.gaa" int print_cert; -#line 31 "cli.gaa" +#line 32 "cli.gaa" int disable_extensions; -#line 28 "cli.gaa" +#line 29 "cli.gaa" int fingerprint; -#line 25 "cli.gaa" +#line 26 "cli.gaa" int fmtder; -#line 22 "cli.gaa" +#line 23 "cli.gaa" int crlf; -#line 19 "cli.gaa" +#line 20 "cli.gaa" int starttls; -#line 16 "cli.gaa" +#line 17 "cli.gaa" int resume; -#line 13 "cli.gaa" +#line 14 "cli.gaa" int debug; #line 114 "gaa.skel" diff --git a/src/serv-gaa.c b/src/serv-gaa.c index 07043182ee..011861e3b2 100644 --- a/src/serv-gaa.c +++ b/src/serv-gaa.c @@ -4,6 +4,7 @@ #line 1 "serv.gaa" +#include #include void serv_version(void); @@ -174,81 +175,81 @@ typedef struct _gaainfo gaainfo; struct _gaainfo { -#line 111 "serv.gaa" +#line 112 "serv.gaa" char *priorities; -#line 108 "serv.gaa" +#line 109 "serv.gaa" char **ctype; -#line 107 "serv.gaa" +#line 108 "serv.gaa" int nctype; -#line 104 "serv.gaa" +#line 105 "serv.gaa" char **kx; -#line 103 "serv.gaa" +#line 104 "serv.gaa" int nkx; -#line 100 "serv.gaa" +#line 101 "serv.gaa" char **macs; -#line 99 "serv.gaa" +#line 100 "serv.gaa" int nmacs; -#line 96 "serv.gaa" +#line 97 "serv.gaa" char **comp; -#line 95 "serv.gaa" +#line 96 "serv.gaa" int ncomp; -#line 92 "serv.gaa" +#line 93 "serv.gaa" char **proto; -#line 91 "serv.gaa" +#line 92 "serv.gaa" int nproto; -#line 88 "serv.gaa" +#line 89 "serv.gaa" char **ciphers; -#line 87 "serv.gaa" +#line 88 "serv.gaa" int nciphers; -#line 84 "serv.gaa" +#line 85 "serv.gaa" char *opaque_prf_input; -#line 81 "serv.gaa" +#line 82 "serv.gaa" char *srp_passwd_conf; -#line 78 "serv.gaa" +#line 79 "serv.gaa" char *srp_passwd; -#line 75 "serv.gaa" +#line 76 "serv.gaa" char *psk_hint; -#line 72 "serv.gaa" +#line 73 "serv.gaa" char *psk_passwd; -#line 69 "serv.gaa" +#line 70 "serv.gaa" int disable_client_cert; -#line 66 "serv.gaa" +#line 67 "serv.gaa" int require_cert; -#line 63 "serv.gaa" +#line 64 "serv.gaa" char *x509_dsacertfile; -#line 60 "serv.gaa" +#line 61 "serv.gaa" char *x509_dsakeyfile; -#line 57 "serv.gaa" +#line 58 "serv.gaa" char *x509_certfile; -#line 54 "serv.gaa" +#line 55 "serv.gaa" char *x509_keyfile; -#line 51 "serv.gaa" +#line 52 "serv.gaa" char *pgp_subkey; -#line 48 "serv.gaa" +#line 49 "serv.gaa" char *pgp_certfile; -#line 45 "serv.gaa" +#line 46 "serv.gaa" char *pgp_keyfile; -#line 42 "serv.gaa" +#line 43 "serv.gaa" char *pgp_keyring; -#line 39 "serv.gaa" +#line 40 "serv.gaa" char *x509_crlfile; -#line 36 "serv.gaa" +#line 37 "serv.gaa" char *x509_cafile; -#line 33 "serv.gaa" +#line 34 "serv.gaa" int fmtder; -#line 30 "serv.gaa" +#line 31 "serv.gaa" char *dh_params_file; -#line 26 "serv.gaa" +#line 27 "serv.gaa" int http; -#line 23 "serv.gaa" +#line 24 "serv.gaa" int nodb; -#line 20 "serv.gaa" +#line 21 "serv.gaa" int quiet; -#line 17 "serv.gaa" +#line 18 "serv.gaa" int port; -#line 14 "serv.gaa" +#line 15 "serv.gaa" int generate; -#line 11 "serv.gaa" +#line 12 "serv.gaa" int debug; #line 114 "gaa.skel" @@ -824,21 +825,21 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) { case GAAOPTID_version: OK = 0; -#line 117 "serv.gaa" +#line 118 "serv.gaa" { serv_version(); exit(0); ;}; return GAA_OK; break; case GAAOPTID_help: OK = 0; -#line 115 "serv.gaa" +#line 116 "serv.gaa" { gaa_help(); exit(0); ;}; return GAA_OK; break; case GAAOPTID_list: OK = 0; -#line 114 "serv.gaa" +#line 115 "serv.gaa" { print_list(0); exit(0); ;}; return GAA_OK; @@ -848,7 +849,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_priority.arg1, gaa_getstr, GAATMP_priority.size1); gaa_index++; -#line 112 "serv.gaa" +#line 113 "serv.gaa" { gaaval->priorities = GAATMP_priority.arg1 ;}; return GAA_OK; @@ -856,7 +857,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_ctypes: OK = 0; GAA_LIST_FILL(GAATMP_ctypes.arg1, gaa_getstr, char*, GAATMP_ctypes.size1); -#line 109 "serv.gaa" +#line 110 "serv.gaa" { gaaval->ctype = GAATMP_ctypes.arg1; gaaval->nctype = GAATMP_ctypes.size1 ;}; return GAA_OK; @@ -864,7 +865,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_kx: OK = 0; GAA_LIST_FILL(GAATMP_kx.arg1, gaa_getstr, char*, GAATMP_kx.size1); -#line 105 "serv.gaa" +#line 106 "serv.gaa" { gaaval->kx = GAATMP_kx.arg1; gaaval->nkx = GAATMP_kx.size1 ;}; return GAA_OK; @@ -872,7 +873,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_macs: OK = 0; GAA_LIST_FILL(GAATMP_macs.arg1, gaa_getstr, char*, GAATMP_macs.size1); -#line 101 "serv.gaa" +#line 102 "serv.gaa" { gaaval->macs = GAATMP_macs.arg1; gaaval->nmacs = GAATMP_macs.size1 ;}; return GAA_OK; @@ -880,7 +881,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_comp: OK = 0; GAA_LIST_FILL(GAATMP_comp.arg1, gaa_getstr, char*, GAATMP_comp.size1); -#line 97 "serv.gaa" +#line 98 "serv.gaa" { gaaval->comp = GAATMP_comp.arg1; gaaval->ncomp = GAATMP_comp.size1 ;}; return GAA_OK; @@ -888,7 +889,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_protocols: OK = 0; GAA_LIST_FILL(GAATMP_protocols.arg1, gaa_getstr, char*, GAATMP_protocols.size1); -#line 93 "serv.gaa" +#line 94 "serv.gaa" { gaaval->proto = GAATMP_protocols.arg1; gaaval->nproto = GAATMP_protocols.size1 ;}; return GAA_OK; @@ -896,7 +897,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) case GAAOPTID_ciphers: OK = 0; GAA_LIST_FILL(GAATMP_ciphers.arg1, gaa_getstr, char*, GAATMP_ciphers.size1); -#line 89 "serv.gaa" +#line 90 "serv.gaa" { gaaval->ciphers = GAATMP_ciphers.arg1; gaaval->nciphers = GAATMP_ciphers.size1 ;}; return GAA_OK; @@ -906,7 +907,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_opaque_prf_input.arg1, gaa_getstr, GAATMP_opaque_prf_input.size1); gaa_index++; -#line 85 "serv.gaa" +#line 86 "serv.gaa" { gaaval->opaque_prf_input = GAATMP_opaque_prf_input.arg1 ;}; return GAA_OK; @@ -916,7 +917,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_srppasswdconf.arg1, gaa_getstr, GAATMP_srppasswdconf.size1); gaa_index++; -#line 82 "serv.gaa" +#line 83 "serv.gaa" { gaaval->srp_passwd_conf = GAATMP_srppasswdconf.arg1 ;}; return GAA_OK; @@ -926,7 +927,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_srppasswd.arg1, gaa_getstr, GAATMP_srppasswd.size1); gaa_index++; -#line 79 "serv.gaa" +#line 80 "serv.gaa" { gaaval->srp_passwd = GAATMP_srppasswd.arg1 ;}; return GAA_OK; @@ -936,7 +937,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pskhint.arg1, gaa_getstr, GAATMP_pskhint.size1); gaa_index++; -#line 76 "serv.gaa" +#line 77 "serv.gaa" { gaaval->psk_hint = GAATMP_pskhint.arg1 ;}; return GAA_OK; @@ -946,21 +947,21 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pskpasswd.arg1, gaa_getstr, GAATMP_pskpasswd.size1); gaa_index++; -#line 73 "serv.gaa" +#line 74 "serv.gaa" { gaaval->psk_passwd = GAATMP_pskpasswd.arg1 ;}; return GAA_OK; break; case GAAOPTID_disable_client_cert: OK = 0; -#line 70 "serv.gaa" +#line 71 "serv.gaa" { gaaval->disable_client_cert = 1 ;}; return GAA_OK; break; case GAAOPTID_require_cert: OK = 0; -#line 67 "serv.gaa" +#line 68 "serv.gaa" { gaaval->require_cert = 1 ;}; return GAA_OK; @@ -970,7 +971,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509dsacertfile.arg1, gaa_getstr, GAATMP_x509dsacertfile.size1); gaa_index++; -#line 64 "serv.gaa" +#line 65 "serv.gaa" { gaaval->x509_dsacertfile = GAATMP_x509dsacertfile.arg1 ;}; return GAA_OK; @@ -980,7 +981,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509dsakeyfile.arg1, gaa_getstr, GAATMP_x509dsakeyfile.size1); gaa_index++; -#line 61 "serv.gaa" +#line 62 "serv.gaa" { gaaval->x509_dsakeyfile = GAATMP_x509dsakeyfile.arg1 ;}; return GAA_OK; @@ -990,7 +991,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509certfile.arg1, gaa_getstr, GAATMP_x509certfile.size1); gaa_index++; -#line 58 "serv.gaa" +#line 59 "serv.gaa" { gaaval->x509_certfile = GAATMP_x509certfile.arg1 ;}; return GAA_OK; @@ -1000,7 +1001,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509keyfile.arg1, gaa_getstr, GAATMP_x509keyfile.size1); gaa_index++; -#line 55 "serv.gaa" +#line 56 "serv.gaa" { gaaval->x509_keyfile = GAATMP_x509keyfile.arg1 ;}; return GAA_OK; @@ -1010,7 +1011,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pgpsubkey.arg1, gaa_getstr, GAATMP_pgpsubkey.size1); gaa_index++; -#line 52 "serv.gaa" +#line 53 "serv.gaa" { gaaval->pgp_subkey = GAATMP_pgpsubkey.arg1 ;}; return GAA_OK; @@ -1020,7 +1021,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pgpcertfile.arg1, gaa_getstr, GAATMP_pgpcertfile.size1); gaa_index++; -#line 49 "serv.gaa" +#line 50 "serv.gaa" { gaaval->pgp_certfile = GAATMP_pgpcertfile.arg1 ;}; return GAA_OK; @@ -1030,7 +1031,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pgpkeyfile.arg1, gaa_getstr, GAATMP_pgpkeyfile.size1); gaa_index++; -#line 46 "serv.gaa" +#line 47 "serv.gaa" { gaaval->pgp_keyfile = GAATMP_pgpkeyfile.arg1 ;}; return GAA_OK; @@ -1040,7 +1041,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_pgpkeyring.arg1, gaa_getstr, GAATMP_pgpkeyring.size1); gaa_index++; -#line 43 "serv.gaa" +#line 44 "serv.gaa" { gaaval->pgp_keyring = GAATMP_pgpkeyring.arg1 ;}; return GAA_OK; @@ -1050,7 +1051,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509crlfile.arg1, gaa_getstr, GAATMP_x509crlfile.size1); gaa_index++; -#line 40 "serv.gaa" +#line 41 "serv.gaa" { gaaval->x509_crlfile = GAATMP_x509crlfile.arg1 ;}; return GAA_OK; @@ -1060,14 +1061,14 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_x509cafile.arg1, gaa_getstr, GAATMP_x509cafile.size1); gaa_index++; -#line 37 "serv.gaa" +#line 38 "serv.gaa" { gaaval->x509_cafile = GAATMP_x509cafile.arg1 ;}; return GAA_OK; break; case GAAOPTID_x509fmtder: OK = 0; -#line 34 "serv.gaa" +#line 35 "serv.gaa" { gaaval->fmtder = 1 ;}; return GAA_OK; @@ -1077,35 +1078,35 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo *gaaval, char *opt_list) GAA_TESTMOREARGS; GAA_FILL(GAATMP_dhparams.arg1, gaa_getstr, GAATMP_dhparams.size1); gaa_index++; -#line 31 "serv.gaa" +#line 32 "serv.gaa" { gaaval->dh_params_file = GAATMP_dhparams.arg1 ;}; return GAA_OK; break; case GAAOPTID_echo: OK = 0; -#line 28 "serv.gaa" +#line 29 "serv.gaa" { gaaval->http = 0 ;}; return GAA_OK; break; case GAAOPTID_http: OK = 0; -#line 27 "serv.gaa" +#line 28 "serv.gaa" { gaaval->http = 1 ;}; return GAA_OK; break; case GAAOPTID_nodb: OK = 0; -#line 24 "serv.gaa" +#line 25 "serv.gaa" { gaaval->nodb = 1 ;}; return GAA_OK; break; case GAAOPTID_quiet: OK = 0; -#line 21 "serv.gaa" +#line 22 "serv.gaa" { gaaval->quiet = 1 ;}; return GAA_OK; @@ -1115,14 +1116,14 @@ static 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 18 "serv.gaa" +#line 19 "serv.gaa" { gaaval->port = GAATMP_port.arg1 ;}; return GAA_OK; break; case GAAOPTID_generate: OK = 0; -#line 15 "serv.gaa" +#line 16 "serv.gaa" { gaaval->generate = 1 ;}; return GAA_OK; @@ -1132,7 +1133,7 @@ static 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 12 "serv.gaa" +#line 13 "serv.gaa" { gaaval->debug = GAATMP_debug.arg1 ;}; return GAA_OK; @@ -1164,7 +1165,7 @@ int gaa(int argc, char **argv, gaainfo *gaaval) if(inited == 0) { -#line 121 "serv.gaa" +#line 122 "serv.gaa" { gaaval->generate=0; gaaval->port=5556; gaaval->http=0; gaaval->ciphers=NULL; gaaval->kx=NULL; gaaval->comp=NULL; gaaval->macs=NULL; gaaval->ctype=NULL; gaaval->nciphers=0; gaaval->nkx=0; gaaval->ncomp=0; gaaval->nmacs=0; gaaval->nctype = 0; gaaval->nodb = 0; diff --git a/src/serv-gaa.h b/src/serv-gaa.h index bb11535f6a..90b72266b9 100644 --- a/src/serv-gaa.h +++ b/src/serv-gaa.h @@ -8,81 +8,81 @@ typedef struct _gaainfo gaainfo; struct _gaainfo { -#line 111 "serv.gaa" +#line 112 "serv.gaa" char *priorities; -#line 108 "serv.gaa" +#line 109 "serv.gaa" char **ctype; -#line 107 "serv.gaa" +#line 108 "serv.gaa" int nctype; -#line 104 "serv.gaa" +#line 105 "serv.gaa" char **kx; -#line 103 "serv.gaa" +#line 104 "serv.gaa" int nkx; -#line 100 "serv.gaa" +#line 101 "serv.gaa" char **macs; -#line 99 "serv.gaa" +#line 100 "serv.gaa" int nmacs; -#line 96 "serv.gaa" +#line 97 "serv.gaa" char **comp; -#line 95 "serv.gaa" +#line 96 "serv.gaa" int ncomp; -#line 92 "serv.gaa" +#line 93 "serv.gaa" char **proto; -#line 91 "serv.gaa" +#line 92 "serv.gaa" int nproto; -#line 88 "serv.gaa" +#line 89 "serv.gaa" char **ciphers; -#line 87 "serv.gaa" +#line 88 "serv.gaa" int nciphers; -#line 84 "serv.gaa" +#line 85 "serv.gaa" char *opaque_prf_input; -#line 81 "serv.gaa" +#line 82 "serv.gaa" char *srp_passwd_conf; -#line 78 "serv.gaa" +#line 79 "serv.gaa" char *srp_passwd; -#line 75 "serv.gaa" +#line 76 "serv.gaa" char *psk_hint; -#line 72 "serv.gaa" +#line 73 "serv.gaa" char *psk_passwd; -#line 69 "serv.gaa" +#line 70 "serv.gaa" int disable_client_cert; -#line 66 "serv.gaa" +#line 67 "serv.gaa" int require_cert; -#line 63 "serv.gaa" +#line 64 "serv.gaa" char *x509_dsacertfile; -#line 60 "serv.gaa" +#line 61 "serv.gaa" char *x509_dsakeyfile; -#line 57 "serv.gaa" +#line 58 "serv.gaa" char *x509_certfile; -#line 54 "serv.gaa" +#line 55 "serv.gaa" char *x509_keyfile; -#line 51 "serv.gaa" +#line 52 "serv.gaa" char *pgp_subkey; -#line 48 "serv.gaa" +#line 49 "serv.gaa" char *pgp_certfile; -#line 45 "serv.gaa" +#line 46 "serv.gaa" char *pgp_keyfile; -#line 42 "serv.gaa" +#line 43 "serv.gaa" char *pgp_keyring; -#line 39 "serv.gaa" +#line 40 "serv.gaa" char *x509_crlfile; -#line 36 "serv.gaa" +#line 37 "serv.gaa" char *x509_cafile; -#line 33 "serv.gaa" +#line 34 "serv.gaa" int fmtder; -#line 30 "serv.gaa" +#line 31 "serv.gaa" char *dh_params_file; -#line 26 "serv.gaa" +#line 27 "serv.gaa" int http; -#line 23 "serv.gaa" +#line 24 "serv.gaa" int nodb; -#line 20 "serv.gaa" +#line 21 "serv.gaa" int quiet; -#line 17 "serv.gaa" +#line 18 "serv.gaa" int port; -#line 14 "serv.gaa" +#line 15 "serv.gaa" int generate; -#line 11 "serv.gaa" +#line 12 "serv.gaa" int debug; #line 114 "gaa.skel" -- cgit v1.2.1 From 73ed8d8b99030c336ec1c95291b5d5571eecbbd0 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 17 Nov 2008 21:15:50 +0100 Subject: Use more warnings. Fix many warnings. --- src/Makefile.am | 64 ++++++++++++++++++++++++++++++++++++++------------------- src/cli.c | 4 +++- src/common.h | 6 ++++++ src/crypt.c | 7 ++++--- src/prime.c | 2 ++ src/psk.c | 4 +++- src/serv.c | 4 ++++ src/tls_test.c | 12 ++++++----- 8 files changed, 72 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 0bc02b4ee0..19811bb072 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,14 +21,14 @@ EXTRA_DIST = README README.srptool SUBDIRS = cfg -INCS = \ +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = \ -I$(srcdir)/../gl \ -I$(builddir)/../gl \ -I$(builddir)/../lib/includes \ -I$(srcdir)/../lib/includes \ -I$(srcdir)/../libextra/includes \ -I$(srcdir)/cfg -AM_CPPFLAGS = $(WARN_CFLAGS) $(INCS) bin_PROGRAMS = gnutls-serv gnutls-cli psktool gnutls-cli-debug if ENABLE_PKI @@ -38,43 +38,65 @@ if ENABLE_SRP bin_PROGRAMS += srptool endif -gnutls_serv_SOURCES = serv.gaa serv-gaa.h serv-gaa.c list.h serv.c \ - common.h common.c certtool-common.h +noinst_LTLIBRARIES = + +gnutls_serv_SOURCES = list.h serv.c common.h common.c certtool-common.h gnutls_serv_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ - ../gl/libgnu.la + ../gl/libgnu.la libcmd-serv.la +noinst_LTLIBRARIES += libcmd-serv.la +libcmd_serv_la_CFLAGS = +libcmd_serv_la_SOURCES = serv.gaa serv-gaa.h serv-gaa.c if ENABLE_SRP -srptool_SOURCES = crypt.gaa crypt-gaa.h crypt-gaa.c crypt.c -srptool_LDADD = ../lib/libgnutls.la ../gl/libgnu.la ../lib/gl/liblgnu.la +srptool_SOURCES = crypt.c +srptool_LDADD = ../lib/libgnutls.la ../gl/libgnu.la ../lib/gl/liblgnu.la \ + libcmd-srp.la +noinst_LTLIBRARIES += libcmd-srp.la +libcmd_srp_la_CFLAGS = +libcmd_srp_la_SOURCES = crypt.gaa crypt-gaa.h crypt-gaa.c endif -psktool_SOURCES = psk.gaa psk-gaa.h psk-gaa.c psk.c -psktool_LDADD = ../lib/libgnutls.la ../gl/libgnu.la ../lib/gl/liblgnu.la +psktool_SOURCES = psk.c +psktool_LDADD = ../lib/libgnutls.la ../gl/libgnu.la ../lib/gl/liblgnu.la \ + libcmd-psk.la +noinst_LTLIBRARIES += libcmd-psk.la +libcmd_psk_la_CFLAGS = +libcmd_psk_la_SOURCES = psk.gaa psk-gaa.h psk-gaa.c -gnutls_cli_SOURCES = cli.gaa cli-gaa.h cli-gaa.c cli.c common.h \ - common.c +gnutls_cli_SOURCES = cli.c common.h common.c gnutls_cli_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ - ../gl/libgnu.la + ../gl/libgnu.la libcmd-cli.la +noinst_LTLIBRARIES += libcmd-cli.la +libcmd_cli_la_CFLAGS = +libcmd_cli_la_SOURCES = cli.gaa cli-gaa.h cli-gaa.c -gnutls_cli_debug_SOURCES = tls_test.gaa tls_test-gaa.h tls_test-gaa.c \ - tls_test.c tests.h tests.c common.h common.c -gnutls_cli_debug_LDADD = ../lib/libgnutls.la ../gl/libgnu.la +gnutls_cli_debug_SOURCES = tls_test.c tests.h tests.c common.h common.c +gnutls_cli_debug_LDADD = ../lib/libgnutls.la ../gl/libgnu.la \ + libcmd-cli-debug.la +noinst_LTLIBRARIES += libcmd-cli-debug.la +libcmd_cli_debug_la_CFLAGS = +libcmd_cli_debug_la_SOURCES = tls_test.gaa tls_test-gaa.h tls_test-gaa.c -certtool_SOURCES = certtool.gaa certtool-gaa.h certtool-cfg.h \ - certtool-gaa.c certtool.c prime.c certtool-cfg.c -certtool_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ - ../gl/libgnu.la ../lib/gl/liblgnu.la @LTLIBREADLINE@ +certtool_SOURCES = certtool.c prime.c +certtool_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ + ../gl/libgnu.la ../lib/gl/liblgnu.la @LTLIBREADLINE@ \ + libcmd-certtool.la if HAVE_LIBCFG certtool_LDADD += -lcfg+ else -noinst_LTLIBRARIES = libcfg.la -libcfg_la_CPPFLAGS = $(INCS) +noinst_LTLIBRARIES += libcfg.la +libcfg_la_CFLAGS = libcfg_la_SOURCES = cfg/cfg+.c cfg/cfgfile.c cfg/cmdline.c cfg/parse.c \ cfg/props.c cfg/shared.c cfg/platon/str/dynfgets.c \ cfg/platon/str/strctype.c cfg/platon/str/strdyn.c \ cfg/platon/str/strplus.c certtool_LDADD += libcfg.la endif +noinst_LTLIBRARIES += libcmd-certtool.la +libcmd_certtool_la_CFLAGS = +libcmd_certtool_la_SOURCES = certtool.gaa certtool-gaa.h \ + certtool-gaa.c certtool-cfg.h certtool-cfg.c +libcmd_certtool_la_LIBADD = ../gl/libgnu.la noinst_PROGRAMS = errcodes printlist errcodes_SOURCES = errcodes.c diff --git a/src/cli.c b/src/cli.c index cea711b1b7..0f0ea6e883 100644 --- a/src/cli.c +++ b/src/cli.c @@ -54,7 +54,7 @@ /* global stuff here */ int resume, starttls, insecure; -char *hostname = NULL; +const char *hostname = NULL; char *service; int record_max_size; int fingerprint; @@ -895,6 +895,8 @@ gaa_parser (int argc, char **argv) parse_comp (info.comp, info.ncomp, comp_priority); } +void cli_version (void); + void cli_version (void) { diff --git a/src/common.h b/src/common.h index 01e0fa5cc4..d209655986 100644 --- a/src/common.h +++ b/src/common.h @@ -14,6 +14,12 @@ # include #endif +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) +# define __attribute__(Spec) /* empty */ +# endif +#endif + /* the number of elements in the priority structures. */ #define PRI_MAX 16 diff --git a/src/crypt.c b/src/crypt.c index c36230a1d0..8c53a01259 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -57,7 +57,6 @@ static int _verify_passwd_int (const char *username, const char *passwd, const gnutls_datum_t * g, const gnutls_datum_t * n); - static void print_num (const char *msg, const gnutls_datum_t * num) { @@ -419,9 +418,9 @@ main (int argc, char **argv) } if (info.passwd == NULL) - info.passwd = KPASSWD; + info.passwd = (char*) KPASSWD; if (info.passwd_conf == NULL) - info.passwd_conf = KPASSWD_CONF; + info.passwd_conf = (char*) KPASSWD_CONF; if (info.username == NULL) { @@ -710,6 +709,8 @@ read_conf_values (gnutls_datum_t * g, gnutls_datum_t * n, char *str) return index; } +extern void srptool_version(void); + void srptool_version (void) { diff --git a/src/prime.c b/src/prime.c index 213f31287e..9b07f95b9c 100644 --- a/src/prime.c +++ b/src/prime.c @@ -39,6 +39,8 @@ extern const int buffer_size; static int cparams = 0; +int generate_prime (int bits, int how); + /* If how is zero then the included parameters are used. */ int diff --git a/src/psk.c b/src/psk.c index 7ce6b1b9d7..1ae05d01ff 100644 --- a/src/psk.c +++ b/src/psk.c @@ -89,7 +89,7 @@ main (int argc, char **argv) } if (info.passwd == NULL) - info.passwd = KPASSWD; + info.passwd = (char*) KPASSWD; if (info.username == NULL) { @@ -300,6 +300,8 @@ write_key (const char *username, const char *key, int key_size, #endif /* ENABLE_PSK */ +void psktool_version (void); + void psktool_version (void) { diff --git a/src/serv.c b/src/serv.c index dbd76c225e..e650998654 100644 --- a/src/serv.c +++ b/src/serv.c @@ -742,6 +742,8 @@ unimplemented: *response_length = ((*response) ? strlen (*response) : 0); } +static void terminate (int sig) __attribute__ ((noreturn)); + static void terminate (int sig) { @@ -1433,6 +1435,8 @@ gaa_parser (int argc, char **argv) parse_comp (info.comp, info.ncomp, comp_priority); } +extern void serv_version(void); + void serv_version (void) { diff --git a/src/tls_test.c b/src/tls_test.c index 0f5d50151e..48c31e0114 100644 --- a/src/tls_test.c +++ b/src/tls_test.c @@ -40,7 +40,7 @@ /* global stuff here */ int resume; -char *hostname = NULL; +const char *hostname = NULL; int port; int record_max_size; int fingerprint; @@ -69,11 +69,11 @@ typedef test_code_t (*TEST_FUNC) (gnutls_session_t); typedef struct { - char *test_name; + const char *test_name; TEST_FUNC func; - char *suc_str; - char *fail_str; - char *unsure_str; + const char *suc_str; + const char *fail_str; + const char *unsure_str; } TLS_TEST; static const TLS_TEST tls_tests[] = { @@ -326,6 +326,8 @@ gaa_parser (int argc, char **argv) } +void tls_test_version (void); + void tls_test_version (void) { -- cgit v1.2.1 From 67248f3b81f95ab98a50c08a2b5d3e2875459ee8 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 18 Nov 2008 10:49:22 +0100 Subject: Change link order, so that gnulib is last. --- src/Makefile.am | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 19811bb072..a069f9e98d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -41,46 +41,43 @@ endif noinst_LTLIBRARIES = gnutls_serv_SOURCES = list.h serv.c common.h common.c certtool-common.h -gnutls_serv_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ - ../gl/libgnu.la libcmd-serv.la +gnutls_serv_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la +gnutls_serv_LDADD += libcmd-serv.la ../gl/libgnu.la noinst_LTLIBRARIES += libcmd-serv.la libcmd_serv_la_CFLAGS = libcmd_serv_la_SOURCES = serv.gaa serv-gaa.h serv-gaa.c if ENABLE_SRP srptool_SOURCES = crypt.c -srptool_LDADD = ../lib/libgnutls.la ../gl/libgnu.la ../lib/gl/liblgnu.la \ - libcmd-srp.la +srptool_LDADD = ../lib/libgnutls.la libcmd-srp.la ../gl/libgnu.la noinst_LTLIBRARIES += libcmd-srp.la libcmd_srp_la_CFLAGS = libcmd_srp_la_SOURCES = crypt.gaa crypt-gaa.h crypt-gaa.c endif psktool_SOURCES = psk.c -psktool_LDADD = ../lib/libgnutls.la ../gl/libgnu.la ../lib/gl/liblgnu.la \ - libcmd-psk.la +psktool_LDADD = ../lib/libgnutls.la libcmd-psk.la ../gl/libgnu.la noinst_LTLIBRARIES += libcmd-psk.la libcmd_psk_la_CFLAGS = libcmd_psk_la_SOURCES = psk.gaa psk-gaa.h psk-gaa.c gnutls_cli_SOURCES = cli.c common.h common.c -gnutls_cli_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ - ../gl/libgnu.la libcmd-cli.la +gnutls_cli_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la +gnutls_cli_LDADD += libcmd-cli.la ../gl/libgnu.la noinst_LTLIBRARIES += libcmd-cli.la libcmd_cli_la_CFLAGS = libcmd_cli_la_SOURCES = cli.gaa cli-gaa.h cli-gaa.c gnutls_cli_debug_SOURCES = tls_test.c tests.h tests.c common.h common.c -gnutls_cli_debug_LDADD = ../lib/libgnutls.la ../gl/libgnu.la \ - libcmd-cli-debug.la +gnutls_cli_debug_LDADD = ../lib/libgnutls.la libcmd-cli-debug.la +gnutls_cli_debug_LDADD += ../gl/libgnu.la noinst_LTLIBRARIES += libcmd-cli-debug.la libcmd_cli_debug_la_CFLAGS = libcmd_cli_debug_la_SOURCES = tls_test.gaa tls_test-gaa.h tls_test-gaa.c certtool_SOURCES = certtool.c prime.c -certtool_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la \ - ../gl/libgnu.la ../lib/gl/liblgnu.la @LTLIBREADLINE@ \ - libcmd-certtool.la +certtool_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la +certtool_LDADD += libcmd-certtool.la ../gl/libgnu.la @LTLIBREADLINE@ if HAVE_LIBCFG certtool_LDADD += -lcfg+ else @@ -100,7 +97,7 @@ libcmd_certtool_la_LIBADD = ../gl/libgnu.la noinst_PROGRAMS = errcodes printlist errcodes_SOURCES = errcodes.c -errcodes_LDADD = ../lib/libgnutls.la ../gl/libgnu.la ../lib/gl/liblgnu.la +errcodes_LDADD = ../lib/libgnutls.la ../gl/libgnu.la printlist_SOURCES = printlist.c printlist_LDADD = ../lib/libgnutls.la ../gl/libgnu.la -- cgit v1.2.1