/*
* Copyright (C) 2004, 2006, 2007, 2008, 2009 Free Software Foundation
* Copyright (C) 2001,2002 Paul Sheer
* Portions Copyright (C) 2002,2003 Nikos Mavrogiannopoulos
*
* This file is part of GNUTLS.
*
* GNUTLS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GNUTLS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
/* This server is heavily modified for GNUTLS by Nikos Mavrogiannopoulos
* (which means it is quite unreadable)
*/
#include
#include "common.h"
#include "serv-gaa.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/* Gnulib portability files. */
#include "progname.h"
#include "version-etc.h"
#include "read-file.h"
#include "minmax.h"
#include "sockets.h"
/* konqueror cannot handle sending the page in multiple
* pieces.
*/
/* global stuff */
static int generate = 0;
static int http = 0;
static int port = 0;
static int x509ctype;
static int debug;
int verbose;
static int nodb;
int require_cert;
int disable_client_cert;
char *psk_passwd;
char *srp_passwd;
char *srp_passwd_conf;
char *pgp_keyring;
char *pgp_keyfile;
char *pgp_certfile;
char *x509_keyfile;
char *x509_certfile;
char *x509_dsakeyfile;
char *x509_dsacertfile;
char *x509_cafile;
char *dh_params_file;
char *x509_crlfile = NULL;
/* end of globals */
/* This is a sample TCP echo server.
* This will behave as an http server if any argument in the
* command line is present
*/
#define SMALL_READ_TEST (2147483647)
#define GERR(ret) fprintf(stdout, "Error: %s\n", safe_strerror(ret))
#define HTTP_END "