-/* 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
*/
#define MAX_BUF 1024
-#define CAFILE "ca.pem"
#define MSG "GET / HTTP/1.0\r\n\r\n"
extern int tcp_connect (void);
-/* 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
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"
-/* 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
#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)
{
gnutls_global_init ();
/* now enable the gnutls-extra library which contains the
- * SRP stuff.
+ * SRP stuff.
*/
gnutls_global_init_extra ();
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);
-/* 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
*/
#define MAX_BUF 1024
-#define SA struct sockaddr
#define MSG "GET / HTTP/1.0\r\n\r\n"
extern int tcp_connect (void);
-/* 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
*/
#define MAX_BUF 1024
-#define SA struct sockaddr
#define MSG "GET / HTTP/1.0\r\n\r\n"
extern int tcp_connect (void);
/*
- * 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
*
#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
{
#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:
#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
*/
#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
*/
#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
/*
- * 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.
*/
/*
- * Copyright (C) 2007, 2008 Free Software Foundation
+ * Copyright (C) 2007, 2008, 2009 Free Software Foundation
*
* Author: Simon Josefsson, Nikos Mavrogiannopoulos
*
/* 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
/*
- * Copyright (C) 2007, 2008 Free Software Foundation
+ * Copyright (C) 2007, 2008, 2009 Free Software Foundation
*
* Author: Simon Josefsson
*
/* 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
/*
- * 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
/*
- * 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.
#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 */
/*
- * 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.
#include <time.h>
#include <common.h>
-#define TEST_STRING
-
#define SU(x) (x!=NULL?x:"Unknown")
int print_cert;
/*
- * 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
*
#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))
"<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;
/*
- * 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.
#include <version-etc.h>
-#define SA struct sockaddr
#define ERR(err,s) if (err==-1) {perror(s);return(1);}
#define MAX_BUF 4096
/*
- * Copyright (C) 2004, 2005, 2008 Free Software Foundation
+ * Copyright (C) 2004, 2005, 2008, 2009 Free Software Foundation
*
* Author: Simon Josefsson
*
#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;