summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.in26
-rw-r--r--lib/Makefile.am3
-rw-r--r--lib/gnutls.h.in.in2
-rw-r--r--lib/gnutls_algorithms.c2
-rw-r--r--lib/gnutls_int_compat.c2
-rw-r--r--lib/gnutls_x509.c5
-rw-r--r--libextra/Makefile.am3
-rw-r--r--libextra/extra.h87
-rw-r--r--libextra/gnutls_openssl.c4
-rw-r--r--libextra/openssl.h230
-rw-r--r--src/Makefile.am2
-rw-r--r--src/cli.c4
-rw-r--r--src/common.c14
-rw-r--r--src/prime.c2
-rw-r--r--src/serv.c5
-rw-r--r--src/tests.c4
-rw-r--r--src/tls_test.c4
-rw-r--r--tests/Makefile.am2
19 files changed, 45 insertions, 358 deletions
diff --git a/Makefile.am b/Makefile.am
index e96639b839..adedc17b52 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = ChangeLog NEWS INSTALL README THANKS COPYING PGPKEYS COPYING.LIB
-SUBDIRS = $(LIBASN1_DIR) lib libextra src doc tests
+SUBDIRS = $(LIBASN1_DIR) includes lib libextra src doc tests
ChangeLog:
cvs2cl --utc -U .cvsusers --fsf -t -S --prune
diff --git a/configure.in b/configure.in
index 0df645dfe9..ae5540d01c 100644
--- a/configure.in
+++ b/configure.in
@@ -373,18 +373,18 @@ AC_SUBST(LIBASN1_LINK)
AC_CONFIG_FILES(lib/gnutls.h.in)
-AC_CONFIG_COMMANDS([lib/gnutls.h],[[
- test -f lib/gnutls.h.in || (echo "Could not generate lib/gnutls.h" && exit 1)
- cat lib/gnutls.h.in > lib/gnutls.h
- cat lib/gnutls_ui.h >> lib/gnutls.h
- echo "" >> lib/gnutls.h
- cat lib/gnutls_errors_int.h | grep -v _INT_ >> lib/gnutls.h
- echo "" >> lib/gnutls.h
- echo "#ifdef __cplusplus" >> lib/gnutls.h
- echo "}" >> lib/gnutls.h
- echo "#endif" >> lib/gnutls.h
- echo "#endif /* GNUTLS_H */" >> lib/gnutls.h
- echo "" >> lib/gnutls.h
+AC_CONFIG_COMMANDS([includes/gnutls/gnutls.h],[[
+ test -f lib/gnutls.h.in || (echo "Could not generate includes/gnutls/gnutls.h" && exit 1)
+ cat lib/gnutls.h.in > includes/gnutls/gnutls.h
+ cat lib/gnutls_ui.h >> includes/gnutls/gnutls.h
+ echo "" >> includes/gnutls/gnutls.h
+ cat lib/gnutls_errors_int.h | grep -v _INT_ >> includes/gnutls/gnutls.h
+ echo "" >> includes/gnutls/gnutls.h
+ echo "#ifdef __cplusplus" >> includes/gnutls/gnutls.h
+ echo "}" >> includes/gnutls/gnutls.h
+ echo "#endif" >> includes/gnutls/gnutls.h
+ echo "#endif /* GNUTLS_H */" >> includes/gnutls/gnutls.h
+ echo "" >> includes/gnutls/gnutls.h
chmod +x lib/libgnutls-config
chmod +x libextra/libgnutls-extra-config
]],[[]])
@@ -393,6 +393,6 @@ AC_CONFIG_FILES([Makefile src/Makefile libextra/Makefile lib/Makefile \
lib/libgnutls-config libextra/libgnutls-extra-config \
doc/Makefile src/x509/Makefile src/srp/Makefile src/openpgp/Makefile \
doc/tex/Makefile doc/tex/cover.tex doc/scripts/Makefile \
-tests/Makefile])
+tests/Makefile includes/Makefile includes/gnutls/Makefile])
AC_OUTPUT
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ac83aafb2c..eeaa75c25e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,5 +1,4 @@
-INCLUDES = -I../libextra -I../libtasn1/lib/
-include_HEADERS = gnutls.h
+INCLUDES = -I../libextra -I../libtasn1/lib/ -I../includes
bin_SCRIPTS = libgnutls-config
m4datadir = $(datadir)/aclocal
diff --git a/lib/gnutls.h.in.in b/lib/gnutls.h.in.in
index 247b1e0096..d6f1b3a2ba 100644
--- a/lib/gnutls.h.in.in
+++ b/lib/gnutls.h.in.in
@@ -130,7 +130,7 @@ GNUTLS_MACAlgorithm gnutls_mac_get( GNUTLS_STATE state);
GNUTLS_CompressionMethod gnutls_compression_get( GNUTLS_STATE state);
GNUTLS_CertificateType gnutls_cert_type_get( GNUTLS_STATE state);
-size_t gnutls_cipher_get_key_size(BulkCipherAlgorithm algorithm);
+size_t gnutls_cipher_get_key_size( GNUTLS_BulkCipherAlgorithm algorithm);
/* the name of the specified algorithms */
const char *gnutls_cipher_get_name( GNUTLS_BulkCipherAlgorithm);
diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c
index e528963227..892a1012e8 100644
--- a/lib/gnutls_algorithms.c
+++ b/lib/gnutls_algorithms.c
@@ -560,6 +560,8 @@ int _gnutls_cipher_is_block(BulkCipherAlgorithm algorithm)
* @algorithm: is an encryption algorithm
*
* Returns the length (in bytes) of the given cipher's key size.
+ * Returns 0 if the given cipher is invalid.
+ *
**/
size_t gnutls_cipher_get_key_size(BulkCipherAlgorithm algorithm)
{ /* In bytes */
diff --git a/lib/gnutls_int_compat.c b/lib/gnutls_int_compat.c
index e7ca855ac2..59fbfda07e 100644
--- a/lib/gnutls_int_compat.c
+++ b/lib/gnutls_int_compat.c
@@ -1,4 +1,4 @@
-#include "gnutls.h"
+#include <gnutls/gnutls.h>
/* This file contains functions needed only for binary compatibility
* with previous versions.
diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c
index ce483844a9..e19e115dd5 100644
--- a/lib/gnutls_x509.c
+++ b/lib/gnutls_x509.c
@@ -75,6 +75,8 @@ static oid2string OID2STR[] = {
{NULL}
};
+/* Returns 1 if the data defined by the OID are printable.
+ */
int _gnutls_x509_oid_data_printable( const char* OID) {
int i = 0;
@@ -87,6 +89,9 @@ int i = 0;
return 0;
}
+/* Returns 1 if the data defined by the OID are of a choice
+ * type.
+ */
int _gnutls_x509_oid_data_choice( const char* OID) {
int i = 0;
diff --git a/libextra/Makefile.am b/libextra/Makefile.am
index 9521cc62c5..67ef992cd3 100644
--- a/libextra/Makefile.am
+++ b/libextra/Makefile.am
@@ -1,5 +1,4 @@
-INCLUDES = -I../lib -I../libtasn1/lib/
-include_HEADERS = extra.h openssl.h
+INCLUDES = -I../lib -I../libtasn1/lib/ -I../includes
bin_SCRIPTS = libgnutls-extra-config
m4datadir = $(datadir)/aclocal
diff --git a/libextra/extra.h b/libextra/extra.h
deleted file mode 100644
index 7929173496..0000000000
--- a/libextra/extra.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2002 Nikos Mavroyanopoulos
- *
- * GNUTLS-EXTRA 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 2 of the License, or
- * (at your option) any later version.
- *
- * GNUTLS-EXTRA 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
-
-/* Note the libgnutls-extra is not a standalone library. It requires
- * to link also against libgnutls.
- */
-
-#ifndef GNUTLS_EXTRA_H
-# define GNUTLS_EXTRA_H
-
-#include <gnutls/gnutls.h>
-
-/* SRP */
-
-typedef struct DSTRUCT* GNUTLS_SRP_SERVER_CREDENTIALS;
-typedef struct DSTRUCT* GNUTLS_SRP_CLIENT_CREDENTIALS;
-
-void gnutls_srp_free_client_sc( GNUTLS_SRP_CLIENT_CREDENTIALS sc);
-int gnutls_srp_allocate_client_sc( GNUTLS_SRP_CLIENT_CREDENTIALS *sc);
-int gnutls_srp_set_client_cred( GNUTLS_SRP_CLIENT_CREDENTIALS res, char *username, char* password);
-
-void gnutls_srp_free_server_sc( GNUTLS_SRP_SERVER_CREDENTIALS sc);
-int gnutls_srp_allocate_server_sc( GNUTLS_SRP_SERVER_CREDENTIALS *sc);
-int gnutls_srp_set_server_cred_file( GNUTLS_SRP_SERVER_CREDENTIALS res, char *password_file, char* password_conf_file);
-
-const char* gnutls_srp_server_get_username( GNUTLS_STATE state);
-
-typedef int gnutls_srp_server_select_function(GNUTLS_STATE, char **, char**, int);
-
-void gnutls_srp_server_set_select_function( GNUTLS_STATE, gnutls_srp_server_select_function *);
-
-/* Openpgp certificate stuff */
-int gnutls_openpgp_fingerprint( const gnutls_datum* data, char* result, size_t* result_size);
-
-int gnutls_openpgp_get_key_xml( const gnutls_datum *cert, int ext,
- gnutls_datum *xmlkey);
-
-int gnutls_openpgp_extract_key_name( const gnutls_datum *cert,
- int idx,
- gnutls_openpgp_name *dn );
-
-int gnutls_openpgp_extract_key_pk_algorithm(const gnutls_datum *cert,
- int *r_bits);
-
-int gnutls_openpgp_extract_key_version( const gnutls_datum *cert );
-
-time_t gnutls_openpgp_extract_key_creation_time( const gnutls_datum *cert );
-time_t gnutls_openpgp_extract_key_expiration_time( const gnutls_datum *cert );
-
-int gnutls_openpgp_verify_key( const gnutls_datum* keyring,
- const gnutls_datum* key_list,
- int key_list_length);
-
-int gnutls_certificate_set_openpgp_key_file( GNUTLS_CERTIFICATE_CREDENTIALS res, char *CERTFILE, char* KEYFILE);
-int gnutls_certificate_set_openpgp_key_mem( GNUTLS_CERTIFICATE_CREDENTIALS res,
- const gnutls_datum* CERT, const gnutls_datum* KEY);
-
-int gnutls_certificate_set_openpgp_keyserver(GNUTLS_CERTIFICATE_CREDENTIALS res,
- char* keyserver, int port);
-
-int gnutls_certificate_set_openpgp_trustdb(GNUTLS_CERTIFICATE_CREDENTIALS res,
- char* trustdb);
-
-int gnutls_certificate_set_openpgp_keyring_mem(
- GNUTLS_CERTIFICATE_CREDENTIALS c,
- const unsigned char *data, size_t dlen );
-
-int gnutls_certificate_set_openpgp_keyring_file( GNUTLS_CERTIFICATE_CREDENTIALS res, const char *name);
-
-int gnutls_global_init_extra(void);
-
-#endif
diff --git a/libextra/gnutls_openssl.c b/libextra/gnutls_openssl.c
index b61c3be822..f286817908 100644
--- a/libextra/gnutls_openssl.c
+++ b/libextra/gnutls_openssl.c
@@ -16,11 +16,11 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <gnutls.h>
+#include <gnutls/gnutls.h>
#include <gcrypt.h>
#include <stdio.h>
#include <stdlib.h>
-#include "openssl.h"
+#include <gnutls/openssl.h>
static int last_error = 0;
diff --git a/libextra/openssl.h b/libextra/openssl.h
deleted file mode 100644
index 7f0813d790..0000000000
--- a/libextra/openssl.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2002 Andrew McDonald <andrew@mcdonald.org.uk>
- *
- * GNUTLS-EXTRA 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 2 of the License, or (at your option)
- * any later version.
- *
- * GNUTLS-EXTRA 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, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-
-/* FIXME FIXME FIXME
- Things to fix:
- error handling
- SSL->options
-*/
-
-#ifndef GNUTLS_OPENSSL_H
-#define GNUTLS_OPENSSL_H
-#include <gnutls/gnutls.h>
-#include <gcrypt.h>
-
-#define OPENSSL_VERSION_NUMBER (0x0090604F)
-#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
-#define OPENSSL_VERSION_TEXT ("GNUTLS " LIBGNUTLS_VERSION " ")
-
-#define SSL_ERROR_NONE (0)
-#define SSL_ERROR_SSL (1)
-#define SSL_ERROR_WANT_READ (2)
-#define SSL_ERROR_WANT_WRITE (3)
-#define SSL_ERROR_SYSCALL (5)
-#define SSL_ERROR_ZERO_RETURN (6)
-
-#define SSL_FILETYPE_PEM (GNUTLS_X509_FMT_PEM)
-
-#define SSL_VERIFY_NONE (0)
-
-#define SSL_ST_OK (1)
-
-#define X509_V_ERR_CERT_NOT_YET_VALID (1)
-#define X509_V_ERR_CERT_HAS_EXPIRED (2)
-#define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT (3)
-
-#define SSL_OP_ALL (0x000FFFFF)
-#define SSL_OP_NO_TLSv1 (0x0400000)
-
-typedef gnutls_x509_dn X509_NAME;
-typedef gnutls_datum X509;
-
-struct _SSL;
-
-typedef struct
-{
- int protocol_priority[GNUTLS_MAX_ALGORITHM_NUM];
- int cipher_priority[GNUTLS_MAX_ALGORITHM_NUM];
- int comp_priority[GNUTLS_MAX_ALGORITHM_NUM];
- int kx_priority[GNUTLS_MAX_ALGORITHM_NUM];
- int mac_priority[GNUTLS_MAX_ALGORITHM_NUM];
-} SSL_METHOD;
-
-
-typedef struct
-{
- GNUTLS_Version version;
- GNUTLS_BulkCipherAlgorithm cipher;
- GNUTLS_KXAlgorithm kx;
- GNUTLS_MACAlgorithm mac;
- GNUTLS_CompressionMethod compression;
- GNUTLS_CertificateType cert;
-} SSL_CIPHER;
-
-typedef struct
-{
- struct _SSL *ssl;
- int error;
- gnutls_datum *cert_list;
-#define current_cert cert_list
-} X509_STORE_CTX;
-
-typedef struct _SSL_CTX
-{
- SSL_METHOD *method;
- char *certfile;
- int certfile_type;
- char *keyfile;
- int keyfile_type;
- unsigned long options;
-
- int (*verify_callback)(int, X509_STORE_CTX *);
- int verify_mode;
-
-} SSL_CTX;
-
-typedef struct _SSL
-{
- GNUTLS_STATE gnutls_state;
-#define rbio gnutls_state
- GNUTLS_CERTIFICATE_CLIENT_CREDENTIALS gnutls_cred;
-
- SSL_CTX *ctx;
- SSL_CIPHER ciphersuite;
-
- int last_error;
- int shutdown;
- int state;
- unsigned long options;
-
- int (*verify_callback)(int, X509_STORE_CTX *);
- int verify_mode;
-} SSL;
-
-typedef struct
-{
- GCRY_MD_HD handle;
-} MD_CTX;
-
-#define MD5_CTX MD_CTX
-#define RIPEMD160_CTX MD_CTX
-
-#define OpenSSL_add_ssl_algorithms() SSL_library_init()
-#define SSLeay_add_ssl_algorithms() SSL_library_init()
-#define SSLeay_add_all_algorithms() OpenSSL_add_all_algorithms()
-
-#define SSL_get_cipher_name(ssl) SSL_CIPHER_get_name(SSL_get_current_cipher(ssl))
-#define SSL_get_cipher(ssl) SSL_get_cipher_name(ssl)
-#define SSL_get_cipher_bits(ssl,bp) SSL_CIPHER_get_bits(SSL_get_current_cipher(ssl),(bp))
-#define SSL_get_cipher_version(ssl) SSL_CIPHER_get_version(SSL_get_current_cipher(ssl))
-
-
-/* Library initialisation functions */
-
-int SSL_library_init(void);
-void OpenSSL_add_all_algorithms(void);
-
-
-/* SSL_CTX structure handling */
-
-SSL_CTX *SSL_CTX_new(SSL_METHOD *method);
-void SSL_CTX_free(SSL_CTX *ctx);
-int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
-int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *certfile, int type);
-int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *keyfile, int type);
-void SSL_CTX_set_verify(SSL_CTX *ctx, int verify_mode,
- int (*verify_callback)(int, X509_STORE_CTX *));
-unsigned long SSL_CTX_set_options(SSL_CTX *ssl, unsigned long options);
-
-
-/* SSL structure handling */
-
-SSL *SSL_new(SSL_CTX *ctx);
-void SSL_free(SSL *ssl);
-void SSL_load_error_strings(void);
-int SSL_get_error(SSL *ssl, int ret);
-int SSL_set_fd(SSL *ssl, int fd);
-void SSL_set_connect_state(SSL *ssl);
-int SSL_pending(SSL *ssl);
-void SSL_set_verify(SSL *ssl, int verify_mode,
- int (*verify_callback)(int, X509_STORE_CTX *));
-
-
-/* SSL connection open/close/read/write functions */
-
-int SSL_connect(SSL *ssl);
-int SSL_shutdown(SSL *ssl);
-int SSL_read(SSL *ssl, const void *buf, int len);
-int SSL_write(SSL *ssl, const void *buf, int len);
-
-
-/* SSL_METHOD functions */
-
-SSL_METHOD *SSLv23_client_method(void);
-
-
-/* SSL_CIPHER functions */
-
-SSL_CIPHER *SSL_get_current_cipher(SSL *ssl);
-const char *SSL_CIPHER_get_name(SSL_CIPHER *cipher);
-int SSL_CIPHER_get_bits(SSL_CIPHER *cipher, int *bits);
-const char *SSL_CIPHER_get_version(SSL_CIPHER *cipher);
-
-
-/* X509 functions */
-
-X509_NAME *X509_get_subject_name(X509 *cert);
-char *X509_NAME_oneline(gnutls_x509_dn *name, char *buf, int len);
-
-
-/* BIO functions */
-
-void BIO_get_fd(GNUTLS_STATE gnutls_state, int *fd);
-
-
-/* error handling */
-
-unsigned long ERR_get_error(void);
-char *ERR_error_string(unsigned long e, char *buf);
-
-
-/* RAND functions */
-
-int RAND_status(void);
-void RAND_seed(const void *buf, int num);
-int RAND_bytes(unsigned char *buf, int num);
-const char *RAND_file_name(char *buf, size_t len);
-int RAND_load_file(const char *name, long maxbytes);
-int RAND_write_file(const char *name);
-
-
-/* message digest functions */
-
-void MD5_Init(MD5_CTX *ctx);
-void MD5_Update(MD5_CTX *ctx, const void *buf, int len);
-void MD5_Final(unsigned char *md, MD5_CTX *ctx);
-unsigned char *MD5(const unsigned char *buf, unsigned long len,
- unsigned char *md);
-
-void RIPEMD160_Init(RIPEMD160_CTX *ctx);
-void RIPEMD160_Update(RIPEMD160_CTX *ctx, const void *buf, int len);
-void RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *ctx);
-unsigned char *RIPEMD160(const unsigned char *buf, unsigned long len,
- unsigned char *md);
-#endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 33058dcf36..687f6c9ba9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,7 +3,7 @@ EXTRA_DIST = common.h prime.gaa crypt.gaa crypt-gaa.h README.srpcrypt prime-gaa.
tls_test-gaa.h tests.h gnutls-http-serv list.h
SUBDIRS = srp x509 openpgp
-INCLUDES = -I../lib -I../libtasn1/lib
+INCLUDES = -I../lib -I../libtasn1/lib -I../includes
bin_PROGRAMS = gnutls-serv gnutls-cli gnutls-srpcrypt gnutls-cli-debug
gnutls_serv_SOURCES = serv-gaa.c serv.c common.c
diff --git a/src/cli.c b/src/cli.c
index 1b56244897..0c62fcd93d 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -27,8 +27,8 @@
#include <arpa/inet.h>
#include <string.h>
#include <unistd.h>
-#include "../lib/gnutls.h"
-#include "../libextra/extra.h"
+#include <gnutls/gnutls.h>
+#include <gnutls/extra.h>
#include <sys/time.h>
#include <signal.h>
#include <netdb.h>
diff --git a/src/common.c b/src/common.c
index 272c6cc105..a2cda7095d 100644
--- a/src/common.c
+++ b/src/common.c
@@ -1,6 +1,6 @@
#include <stdio.h>
-#include "../lib/gnutls.h"
-#include "../libextra/extra.h"
+#include <gnutls/gnutls.h>
+#include <gnutls/extra.h>
#include <time.h>
#define PRINTX(x,y) if (y[0]!=0) printf(" # %s %s\n", x, y)
@@ -42,17 +42,17 @@ void print_x509_info(GNUTLS_STATE state)
time_t expiret = gnutls_certificate_expiration_time_peers(state);
time_t activet = gnutls_certificate_activation_time_peers(state);
-/* gnutls_datum xml; */
+// gnutls_datum xml;
cert_list = gnutls_certificate_get_peers(state, &cert_list_size);
if (cert_list_size <= 0)
return;
-/*
-gnutls_x509_get_certificate_xml( &cert_list[0], 0, &xml);
-fprintf(stderr, "%s\n", xml.data);
-return 0;*/
+
+//gnutls_x509_get_certificate_xml( &cert_list[0], 0, &xml);
+//fprintf(stderr, "%s\n", xml.data);
+//return 0;
printf(" - Certificate info:\n");
diff --git a/src/prime.c b/src/prime.c
index dfdf185c76..65df47f977 100644
--- a/src/prime.c
+++ b/src/prime.c
@@ -24,7 +24,7 @@
#include <unistd.h>
#include "prime-gaa.h"
#include <gcrypt.h>
-#include "../lib/gnutls.h"
+#include <gnutls/gnutls.h>
#include "../lib/defines.h"
MPI _gcry_generate_elg_prime( int mode, unsigned pbits, unsigned qbits,
diff --git a/src/serv.c b/src/serv.c
index 913644dc6f..1d9749b2b1 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -31,8 +31,8 @@
#include <arpa/inet.h>
#include <string.h>
#include <unistd.h>
-#include "../lib/gnutls.h"
-#include "../libextra/extra.h"
+#include <gnutls/gnutls.h>
+#include <gnutls/extra.h>
#include "common.h"
#include <signal.h>
#include "serv-gaa.h"
@@ -600,7 +600,6 @@ int main(int argc, char **argv)
time_t tt;
char* ctt;
- int yes = 1;
/* new list entry for the connection */
lappend (listener_list);
j = listener_list.tail;
diff --git a/src/tests.c b/src/tests.c
index f17b6d9913..afb18c20a1 100644
--- a/src/tests.c
+++ b/src/tests.c
@@ -18,8 +18,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-#include "../lib/gnutls.h"
-#include "../libextra/extra.h"
+#include <gnutls/gnutls.h>
+#include <gnutls/extra.h>
#include <tests.h>
#include <unistd.h>
#include <signal.h>
diff --git a/src/tls_test.c b/src/tls_test.c
index 2bf0befe19..8100fbd525 100644
--- a/src/tls_test.c
+++ b/src/tls_test.c
@@ -27,8 +27,8 @@
#include <arpa/inet.h>
#include <string.h>
#include <unistd.h>
-#include "../lib/gnutls.h"
-#include "../libextra/extra.h"
+#include <gnutls/gnutls.h>
+#include <gnutls/extra.h>
#include <sys/time.h>
#include <signal.h>
#include <netdb.h>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f9967f4d7b..0fce7aa826 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
-INCLUDES= -I../lib/ -I../libtasn1/lib/
+INCLUDES= -I../lib/ -I../libtasn1/lib/ -I../includes
noinst_PROGRAMS = x509test
x509test_SOURCES = x509_test.c