]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Fix warnings.
authorSimon Josefsson <simon@josefsson.org>
Wed, 7 Jan 2009 11:13:12 +0000 (12:13 +0100)
committerSimon Josefsson <simon@josefsson.org>
Wed, 7 Jan 2009 11:13:12 +0000 (12:13 +0100)
15 files changed:
doc/examples/ex-client-psk.c
doc/examples/ex-client-resume.c
doc/examples/ex-client-srp.c
doc/examples/ex-client-tlsia.c
doc/examples/ex-client1.c
lib/gnutls_algorithms.c
lib/gnutls_rsa_export.c
lib/openpgp/output.c
lib/x509/output.c
lib/x509/privkey.c
src/cli.c
src/common.c
src/serv.c
src/tls_test.c
tests/dhepskself.c

index 9d62ccfae0ff28d421b0fa87fc1ed42dc0195f95..09fff2a1dec050546de4297aea6fa585a2900db0 100644 (file)
@@ -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);
index 473fddf6aa0dfa9d3d254c792e5764a584aa8a0e..e71642a1c50fcc7089af9cdcfaaa2cfa28d6d174 100644 (file)
@@ -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"
 
index d5efc187d0e9e84f3cc2490dfe34e7fc9f16570c..40700d833185b9187343d4760bc1cab402e99478 100644 (file)
@@ -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);
 
index 17e344aec6e5ca2231e30762c77c01e3431a0a59..86e30dcb74a83f2199c75381945e2d3ec831dde9 100644 (file)
@@ -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);
index 0b8216bdac6c6afbc6a1aa0af8bab1aa87faa898..667b9268bbf6a875962d077bb63bdc95e26538e5 100644 (file)
@@ -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);
index d37d494470477da6d437867c9971c6ff741e61f7..a8929edbf4db521571a3e838b729dfff7584f966 100644 (file)
@@ -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
 
index 1ea83b78035202ef247493661cbb1c7a5d489b52..cf6da8e1cd2c5aae18d4710b44d0a542d4b3b34f 100644 (file)
@@ -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
  *
 #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.
  */
index 617cf77e834ac04a39a4679f2ba86f97baa65543..5d7950f3aa399c7caa6e8b5b38ee9714f1a2fc7b 100644 (file)
@@ -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
index e838166d82194b466de853685fe0c82937b8d062..83c4cb76447327747454d17223ec595228bd2b51 100644 (file)
@@ -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
index 3e5c75f5f01be273a471910be50f8ecf589ffc2b..c7d6fcbc1bc7259d3f69ceca0f5179412193da8c 100644 (file)
@@ -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
  *
 
 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
index 2b46992d92cf1c5b6366f5fc3043cca0df2ffb1f..2be219f52c48368a32a4dd7c866c4a5eac5d7f3e 100644 (file)
--- 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 */
index 1edfe3356de546fa5380a66cb8af5c6809620941..568c8a72a65b4c79eb5b2c5361a4559338bfe326 100644 (file)
@@ -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;
index e650998654517c87ab77f804dd883fda297d6457..c851b06c942b31a28c0399f7d66caa6c40d60135 100644 (file)
@@ -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;
index 48c31e0114e6e969401ee380aa2a7c8ebae17418..25a29854cf4c2aa9bebd1814dbea31510027d81a 100644 (file)
@@ -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
 
index 3d41f24c82663d2de20d0067f17dfb180a4abea5..99ceb107ebc4201ae77de7eeb79f7111c532f5ed 100644 (file)
@@ -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;