summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-01-07 12:13:12 +0100
committerSimon Josefsson <simon@josefsson.org>2009-01-07 12:13:12 +0100
commit853e17f15174cded630124cc6b31798c2cd33f44 (patch)
tree4143acc1d70089f10db9f0d422bec86ab82da88e
parent73b18e6f6336324619877923ac79b31ca19b5194 (diff)
downloadgnutls-853e17f15174cded630124cc6b31798c2cd33f44.tar.gz
Fix warnings.
-rw-r--r--doc/examples/ex-client-psk.c3
-rw-r--r--doc/examples/ex-client-resume.c3
-rw-r--r--doc/examples/ex-client-srp.c11
-rw-r--r--doc/examples/ex-client-tlsia.c3
-rw-r--r--doc/examples/ex-client1.c3
-rw-r--r--lib/gnutls_algorithms.c13
-rw-r--r--lib/gnutls_rsa_export.c9
-rw-r--r--lib/openpgp/output.c3
-rw-r--r--lib/x509/output.c3
-rw-r--r--lib/x509/privkey.c7
-rw-r--r--src/cli.c4
-rw-r--r--src/common.c4
-rw-r--r--src/serv.c7
-rw-r--r--src/tls_test.c3
-rw-r--r--tests/dhepskself.c3
15 files changed, 26 insertions, 53 deletions
diff --git a/doc/examples/ex-client-psk.c b/doc/examples/ex-client-psk.c
index 9d62ccfae0..09fff2a1de 100644
--- a/doc/examples/ex-client-psk.c
+++ b/doc/examples/ex-client-psk.c
@@ -1,4 +1,4 @@
-/* Copyright 2007, 2008 Free Software Foundation
+/* Copyright 2007, 2008, 2009 Free Software Foundation
*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
@@ -22,7 +22,6 @@
*/
#define MAX_BUF 1024
-#define CAFILE "ca.pem"
#define MSG "GET / HTTP/1.0\r\n\r\n"
extern int tcp_connect (void);
diff --git a/doc/examples/ex-client-resume.c b/doc/examples/ex-client-resume.c
index 473fddf6aa..e71642a1c5 100644
--- a/doc/examples/ex-client-resume.c
+++ b/doc/examples/ex-client-resume.c
@@ -1,4 +1,4 @@
-/* Copyright 2007, 2008 Free Software Foundation
+/* Copyright 2007, 2008, 2009 Free Software Foundation
*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
@@ -21,7 +21,6 @@ extern int tcp_connect (void);
extern void tcp_close (int sd);
#define MAX_BUF 1024
-#define CRLFILE "crl.pem"
#define CAFILE "ca.pem"
#define MSG "GET / HTTP/1.0\r\n\r\n"
diff --git a/doc/examples/ex-client-srp.c b/doc/examples/ex-client-srp.c
index d5efc187d0..40700d8331 100644
--- a/doc/examples/ex-client-srp.c
+++ b/doc/examples/ex-client-srp.c
@@ -1,4 +1,4 @@
-/* Copyright 2007 Free Software Foundation
+/* Copyright 2007, 2009 Free Software Foundation
*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
@@ -25,11 +25,8 @@ extern void tcp_close (int sd);
#define USERNAME "user"
#define PASSWORD "pass"
#define CAFILE "ca.pem"
-#define SA struct sockaddr
#define MSG "GET / HTTP/1.0\r\n\r\n"
-#define MAX_PRIORITIES 3
-
int
main (void)
{
@@ -43,7 +40,7 @@ main (void)
gnutls_global_init ();
/* now enable the gnutls-extra library which contains the
- * SRP stuff.
+ * SRP stuff.
*/
gnutls_global_init_extra ();
@@ -54,11 +51,11 @@ main (void)
GNUTLS_X509_FMT_PEM);
gnutls_srp_set_client_credentials (srp_cred, USERNAME, PASSWORD);
- /* connects to server
+ /* connects to server
*/
sd = tcp_connect ();
- /* Initialize TLS session
+ /* Initialize TLS session
*/
gnutls_init (&session, GNUTLS_CLIENT);
diff --git a/doc/examples/ex-client-tlsia.c b/doc/examples/ex-client-tlsia.c
index 17e344aec6..86e30dcb74 100644
--- a/doc/examples/ex-client-tlsia.c
+++ b/doc/examples/ex-client-tlsia.c
@@ -1,4 +1,4 @@
-/* Copyright 2007, 2008 Free Software Foundation
+/* Copyright 2007, 2008, 2009 Free Software Foundation
*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
@@ -23,7 +23,6 @@
*/
#define MAX_BUF 1024
-#define SA struct sockaddr
#define MSG "GET / HTTP/1.0\r\n\r\n"
extern int tcp_connect (void);
diff --git a/doc/examples/ex-client1.c b/doc/examples/ex-client1.c
index 0b8216bdac..667b9268bb 100644
--- a/doc/examples/ex-client1.c
+++ b/doc/examples/ex-client1.c
@@ -1,4 +1,4 @@
-/* Copyright 2007 Free Software Foundation
+/* Copyright 2007, 2009 Free Software Foundation
*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
@@ -22,7 +22,6 @@
*/
#define MAX_BUF 1024
-#define SA struct sockaddr
#define MSG "GET / HTTP/1.0\r\n\r\n"
extern int tcp_connect (void);
diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c
index d37d494470..a8929edbf4 100644
--- a/lib/gnutls_algorithms.c
+++ b/lib/gnutls_algorithms.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -63,9 +63,6 @@ static const gnutls_cred_map cred_mappings[] = {
#define GNUTLS_KX_MAP_ALG_LOOP_SERVER(a) \
GNUTLS_KX_MAP_LOOP( if(p->server_type == type) { a; break; })
-#define GNUTLS_KX_MAP_ALG_LOOP_CLIENT(a) \
- GNUTLS_KX_MAP_LOOP( if(p->client_type == type) { a; break; })
-
/* KX mappings to PK algorithms */
typedef struct
{
@@ -371,8 +368,10 @@ typedef struct
#define GNUTLS_ANON_DH_AES_256_CBC_SHA1 { 0x00, 0x3A }
/* rfc4132 */
+#ifdef ENABLE_CAMELLIA
#define GNUTLS_ANON_DH_CAMELLIA_128_CBC_SHA1 { 0x00,0x46 }
#define GNUTLS_ANON_DH_CAMELLIA_256_CBC_SHA1 { 0x00,0x89 }
+#endif
/* PSK (not in TLS 1.0)
* draft-ietf-tls-psk:
@@ -416,8 +415,10 @@ typedef struct
#define GNUTLS_RSA_AES_256_CBC_SHA1 { 0x00, 0x35 }
/* rfc4132 */
+#ifdef ENABLE_CAMELLIA
#define GNUTLS_RSA_CAMELLIA_128_CBC_SHA1 { 0x00,0x41 }
#define GNUTLS_RSA_CAMELLIA_256_CBC_SHA1 { 0x00,0x84 }
+#endif
/* DHE DSS
*/
@@ -436,8 +437,10 @@ typedef struct
#define GNUTLS_DHE_DSS_AES_128_CBC_SHA1 { 0x00, 0x32 }
/* rfc4132 */
+#ifdef ENABLE_CAMELLIA
#define GNUTLS_DHE_DSS_CAMELLIA_128_CBC_SHA1 { 0x00,0x44 }
#define GNUTLS_DHE_DSS_CAMELLIA_256_CBC_SHA1 { 0x00,0x87 }
+#endif
/* DHE RSA
*/
@@ -449,8 +452,10 @@ typedef struct
#define GNUTLS_DHE_RSA_AES_256_CBC_SHA1 { 0x00, 0x39 }
/* rfc4132 */
+#ifdef ENABLE_CAMELLIA
#define GNUTLS_DHE_RSA_CAMELLIA_128_CBC_SHA1 { 0x00,0x45 }
#define GNUTLS_DHE_RSA_CAMELLIA_256_CBC_SHA1 { 0x00,0x88 }
+#endif
#define CIPHER_SUITES_COUNT sizeof(cs_algorithms)/sizeof(gnutls_cipher_suite_entry)-1
diff --git a/lib/gnutls_rsa_export.c b/lib/gnutls_rsa_export.c
index 1ea83b7803..cf6da8e1cd 100644
--- a/lib/gnutls_rsa_export.c
+++ b/lib/gnutls_rsa_export.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2002, 2003, 2004, 2005, 2008 Free Software Foundation
+ * Copyright (C) 2002, 2003, 2004, 2005, 2008, 2009 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -33,13 +33,6 @@
#include "x509/x509_int.h"
#include "debug.h"
-/* This function takes a number of bits and returns a supported
- * number of bits. Ie a number of bits that we have a prime in the
- * dh_primes structure.
- */
-
-#define MAX_SUPPORTED_BITS 512
-
/* returns e and m, depends on the requested bits.
* We only support limited key sizes.
*/
diff --git a/lib/openpgp/output.c b/lib/openpgp/output.c
index 617cf77e83..5d7950f3aa 100644
--- a/lib/openpgp/output.c
+++ b/lib/openpgp/output.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008 Free Software Foundation
+ * Copyright (C) 2007, 2008, 2009 Free Software Foundation
*
* Author: Simon Josefsson, Nikos Mavrogiannopoulos
*
@@ -32,7 +32,6 @@
/* I18n of error codes. */
#include "gettext.h"
#define _(String) dgettext (PACKAGE, String)
-#define N_(String) gettext_noop (String)
#define addf _gnutls_string_append_printf
#define adds _gnutls_string_append_str
diff --git a/lib/x509/output.c b/lib/x509/output.c
index e838166d82..83c4cb7644 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008 Free Software Foundation
+ * Copyright (C) 2007, 2008, 2009 Free Software Foundation
*
* Author: Simon Josefsson
*
@@ -36,7 +36,6 @@
/* I18n of error codes. */
#include "gettext.h"
#define _(String) dgettext (PACKAGE, String)
-#define N_(String) gettext_noop (String)
#define addf _gnutls_string_append_printf
#define adds _gnutls_string_append_str
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index 3e5c75f5f0..c7d6fcbc1b 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -36,11 +36,6 @@
static int _gnutls_asn1_encode_rsa (ASN1_TYPE * c2, bigint_t * params);
-/* remove this when libgcrypt can handle the PKCS #1 coefficients from
- * rsa keys
- */
-#define CALC_COEFF 1
-
/**
* gnutls_x509_privkey_init - initialize a #gnutls_privkey_t structure
* @key: The structure to be initialized
diff --git a/src/cli.c b/src/cli.c
index 2b46992d92..2be219f52c 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
* Copyright (C) 2000,2001,2002,2003 Nikos Mavrogiannopoulos
*
* This file is part of GNUTLS.
@@ -48,8 +48,6 @@
#include "common.h"
#include "cli-gaa.h"
-#define SA struct sockaddr
-#define ERR(err,s) do { if (err==-1) {perror(s);return(1);} } while (0)
#define MAX_BUF 4096
/* global stuff here */
diff --git a/src/common.c b/src/common.c
index 1edfe3356d..568c8a72a6 100644
--- a/src/common.c
+++ b/src/common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
* Author: Nikos Mavrogiannopoulos
*
* This file is part of GNUTLS.
@@ -36,8 +36,6 @@
#include <time.h>
#include <common.h>
-#define TEST_STRING
-
#define SU(x) (x!=NULL?x:"Unknown")
int print_cert;
diff --git a/src/serv.c b/src/serv.c
index e650998654..c851b06c94 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2004, 2006, 2007, 2008, 2009 Free Software Foundation
* Copyright (C) 2001,2002 Paul Sheer
* Portions Copyright (C) 2002,2003 Nikos Mavrogiannopoulos
*
@@ -85,10 +85,7 @@ char *x509_crlfile = NULL;
#define SMALL_READ_TEST (2147483647)
-#define SA struct sockaddr
-#define ERR(err,s) if(err==-1) {perror(s);return(1);}
#define GERR(ret) fprintf(stdout, "Error: %s\n", safe_strerror(ret))
-#define MAX_BUF 1024
#undef max
#define max(x,y) ((x) > (y) ? (x) : (y))
@@ -107,8 +104,6 @@ char *x509_crlfile = NULL;
"<CENTER><H1>This is <a href=\"http://www.gnu.org/software/gnutls\">" \
"GNUTLS</a></H1></CENTER>\n\n"
-#define RENEGOTIATE
-
/* These are global */
gnutls_srp_server_credentials_t srp_cred = NULL;
gnutls_psk_server_credentials_t psk_cred = NULL;
diff --git a/src/tls_test.c b/src/tls_test.c
index 48c31e0114..25a29854cf 100644
--- a/src/tls_test.c
+++ b/src/tls_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000,2001,2002,2003,2006,2007,2008 Nikos Mavrogiannopoulos
+ * Copyright (C) 2000,2001,2002,2003,2006,2007,2008,2009 Nikos Mavrogiannopoulos
* Copyright (C) 2004,2005, 2008 Free Software Foundation
*
* This file is part of GNUTLS.
@@ -34,7 +34,6 @@
#include <version-etc.h>
-#define SA struct sockaddr
#define ERR(err,s) if (err==-1) {perror(s);return(1);}
#define MAX_BUF 4096
diff --git a/tests/dhepskself.c b/tests/dhepskself.c
index 3d41f24c82..99ceb107eb 100644
--- a/tests/dhepskself.c
+++ b/tests/dhepskself.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2008 Free Software Foundation
+ * Copyright (C) 2004, 2005, 2008, 2009 Free Software Foundation
*
* Author: Simon Josefsson
*
@@ -141,7 +141,6 @@ end:
#define SA struct sockaddr
#define MAX_BUF 1024
#define PORT 5556 /* listen to 5556 port */
-#define DH_BITS 1024
/* These are global */
gnutls_psk_server_credentials_t server_pskcred;