summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-08-23 19:19:45 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-08-23 19:27:01 +0200
commitf84d8c0d536a1b6a160ddceadf7fade8d7b2edaa (patch)
treeea8ded214d074604f4bbfbd9ed31a07beb48f21d
parent172ae7efd99ce30d3bdfc2a35e0335687ef70a0f (diff)
downloadgnutls-f84d8c0d536a1b6a160ddceadf7fade8d7b2edaa.tar.gz
Removed the 'gnutls_' prefix from files to simplify file naming
-rw-r--r--lib/Makefile.am64
-rw-r--r--lib/accelerated/cryptodev-gcm.c6
-rw-r--r--lib/accelerated/cryptodev.c6
-rw-r--r--lib/accelerated/x86/aes-cbc-x86-aesni.c6
-rw-r--r--lib/accelerated/x86/aes-cbc-x86-ssse3.c6
-rw-r--r--lib/accelerated/x86/aes-ccm-x86-aesni.c6
-rw-r--r--lib/accelerated/x86/aes-gcm-padlock.c6
-rw-r--r--lib/accelerated/x86/aes-gcm-x86-aesni.c6
-rw-r--r--lib/accelerated/x86/aes-gcm-x86-pclmul.c6
-rw-r--r--lib/accelerated/x86/aes-gcm-x86-ssse3.c6
-rw-r--r--lib/accelerated/x86/aes-padlock.c6
-rw-r--r--lib/accelerated/x86/aes-padlock.h2
-rw-r--r--lib/accelerated/x86/aes-x86.h2
-rw-r--r--lib/accelerated/x86/hmac-padlock.c6
-rw-r--r--lib/accelerated/x86/hmac-x86-ssse3.c6
-rw-r--r--lib/accelerated/x86/sha-padlock.c6
-rw-r--r--lib/accelerated/x86/sha-x86-ssse3.c6
-rw-r--r--lib/accelerated/x86/x86-common.c6
-rw-r--r--lib/alert.c (renamed from lib/gnutls_alert.c)8
-rw-r--r--lib/algorithms.h2
-rw-r--r--lib/algorithms/cert_types.c4
-rw-r--r--lib/algorithms/ciphers.c4
-rw-r--r--lib/algorithms/ciphersuites.c8
-rw-r--r--lib/algorithms/ecc.c6
-rw-r--r--lib/algorithms/kx.c4
-rw-r--r--lib/algorithms/mac.c4
-rw-r--r--lib/algorithms/protocols.c4
-rw-r--r--lib/algorithms/publickey.c4
-rw-r--r--lib/algorithms/secparams.c4
-rw-r--r--lib/algorithms/sign.c4
-rw-r--r--lib/anon_cred.c (renamed from lib/gnutls_anon_cred.c)10
-rw-r--r--lib/asn1_tab.c (renamed from lib/gnutls_asn1_tab.c)0
-rw-r--r--lib/atfork.c4
-rw-r--r--lib/atfork.h2
-rw-r--r--lib/auth.c (renamed from lib/gnutls_auth.c)8
-rw-r--r--lib/auth.h (renamed from lib/gnutls_auth.h)2
-rw-r--r--lib/auth/Makefile.am4
-rw-r--r--lib/auth/anon.c14
-rw-r--r--lib/auth/anon.h2
-rw-r--r--lib/auth/anon_ecdh.c14
-rw-r--r--lib/auth/cert.c28
-rw-r--r--lib/auth/cert.h4
-rw-r--r--lib/auth/dh_common.c18
-rw-r--r--lib/auth/dh_common.h2
-rw-r--r--lib/auth/dhe.c16
-rw-r--r--lib/auth/dhe_psk.c16
-rw-r--r--lib/auth/ecdhe.c22
-rw-r--r--lib/auth/ecdhe.h2
-rw-r--r--lib/auth/psk.c14
-rw-r--r--lib/auth/psk.h2
-rw-r--r--lib/auth/psk_passwd.c14
-rw-r--r--lib/auth/rsa.c20
-rw-r--r--lib/auth/rsa_psk.c18
-rw-r--r--lib/auth/srp_kx.c (renamed from lib/auth/srp.c)17
-rw-r--r--lib/auth/srp_kx.h (renamed from lib/auth/srp.h)2
-rw-r--r--lib/auth/srp_passwd.c18
-rw-r--r--lib/auth/srp_rsa.c23
-rw-r--r--lib/auth/srp_sb64.c6
-rw-r--r--lib/buffers.c (renamed from lib/gnutls_buffers.c)20
-rw-r--r--lib/buffers.h (renamed from lib/gnutls_buffers.h)0
-rw-r--r--lib/cert.c (renamed from lib/gnutls_cert.c)26
-rw-r--r--lib/cipher.c (renamed from lib/gnutls_cipher.c)24
-rw-r--r--lib/cipher.h (renamed from lib/gnutls_cipher.h)0
-rw-r--r--lib/cipher_int.c (renamed from lib/gnutls_cipher_int.c)8
-rw-r--r--lib/cipher_int.h (renamed from lib/gnutls_cipher_int.h)2
-rw-r--r--lib/compress.c (renamed from lib/gnutls_compress.c)6
-rw-r--r--lib/compress.h (renamed from lib/gnutls_compress.h)0
-rw-r--r--lib/constate.c (renamed from lib/gnutls_constate.c)18
-rw-r--r--lib/constate.h (renamed from lib/gnutls_constate.h)0
-rw-r--r--lib/crypto-api.c8
-rw-r--r--lib/crypto-backend.c10
-rw-r--r--lib/crypto-selftests-pk.c12
-rw-r--r--lib/crypto-selftests.c10
-rw-r--r--lib/datum.c (renamed from lib/gnutls_datum.c)8
-rw-r--r--lib/datum.h (renamed from lib/gnutls_datum.h)2
-rw-r--r--lib/db.c (renamed from lib/gnutls_db.c)8
-rw-r--r--lib/db.h (renamed from lib/gnutls_db.h)0
-rw-r--r--lib/debug.c4
-rw-r--r--lib/dh.c (renamed from lib/gnutls_dh.c)14
-rw-r--r--lib/dh.h (renamed from lib/gnutls_dh.h)0
-rw-r--r--lib/dtls.c (renamed from lib/gnutls_dtls.c)14
-rw-r--r--lib/dtls.h (renamed from lib/gnutls_dtls.h)8
-rw-r--r--lib/ecc.c (renamed from lib/gnutls_ecc.c)8
-rw-r--r--lib/ecc.h (renamed from lib/gnutls_ecc.h)0
-rw-r--r--lib/errors.c (renamed from lib/gnutls_errors.c)6
-rw-r--r--lib/errors.h (renamed from lib/gnutls_errors.h)5
-rw-r--r--lib/ext/alpn.c6
-rw-r--r--lib/ext/alpn.h2
-rw-r--r--lib/ext/cert_type.c8
-rw-r--r--lib/ext/cert_type.h2
-rw-r--r--lib/ext/dumbfw.c6
-rw-r--r--lib/ext/dumbfw.h2
-rw-r--r--lib/ext/ecc.c8
-rw-r--r--lib/ext/ecc.h2
-rw-r--r--lib/ext/etm.c6
-rw-r--r--lib/ext/etm.h2
-rw-r--r--lib/ext/ext_master_secret.c6
-rw-r--r--lib/ext/ext_master_secret.h2
-rw-r--r--lib/ext/heartbeat.c10
-rw-r--r--lib/ext/heartbeat.h2
-rw-r--r--lib/ext/max_record.c6
-rw-r--r--lib/ext/max_record.h2
-rw-r--r--lib/ext/safe_renegotiation.c4
-rw-r--r--lib/ext/safe_renegotiation.h2
-rw-r--r--lib/ext/server_name.c6
-rw-r--r--lib/ext/server_name.h2
-rw-r--r--lib/ext/session_ticket.c22
-rw-r--r--lib/ext/session_ticket.h2
-rw-r--r--lib/ext/signature.c8
-rw-r--r--lib/ext/signature.h2
-rw-r--r--lib/ext/srp.c12
-rw-r--r--lib/ext/srp.h2
-rw-r--r--lib/ext/srtp.c6
-rw-r--r--lib/ext/srtp.h2
-rw-r--r--lib/ext/status_request.c10
-rw-r--r--lib/ext/status_request.h2
-rw-r--r--lib/extensions.c (renamed from lib/gnutls_extensions.c)6
-rw-r--r--lib/extensions.h (renamed from lib/gnutls_extensions.h)0
-rw-r--r--lib/extras/randomart.c4
-rw-r--r--lib/fips.c4
-rw-r--r--lib/fips.h2
-rw-r--r--lib/global.c (renamed from lib/gnutls_global.c)12
-rw-r--r--lib/global.h (renamed from lib/gnutls_global.h)0
-rw-r--r--lib/gnutls_int.h12
-rw-r--r--lib/handshake.c (renamed from lib/gnutls_handshake.c)38
-rw-r--r--lib/handshake.h (renamed from lib/gnutls_handshake.h)2
-rw-r--r--lib/hash_int.c (renamed from lib/gnutls_hash_int.c)6
-rw-r--r--lib/hash_int.h (renamed from lib/gnutls_hash_int.h)2
-rw-r--r--lib/helper.c (renamed from lib/gnutls_helper.c)4
-rw-r--r--lib/helper.h (renamed from lib/gnutls_helper.h)0
-rw-r--r--lib/kx.c (renamed from lib/gnutls_kx.c)16
-rw-r--r--lib/kx.h (renamed from lib/gnutls_kx.h)0
-rw-r--r--lib/locks.c6
-rw-r--r--lib/locks.h2
-rw-r--r--lib/mbuffers.c (renamed from lib/gnutls_mbuffers.c)4
-rw-r--r--lib/mbuffers.h (renamed from lib/gnutls_mbuffers.h)4
-rw-r--r--lib/mem.c (renamed from lib/gnutls_mem.c)6
-rw-r--r--lib/mem.h (renamed from lib/gnutls_mem.h)0
-rw-r--r--lib/mpi.c (renamed from lib/gnutls_mpi.c)8
-rw-r--r--lib/mpi.h (renamed from lib/gnutls_mpi.h)2
-rw-r--r--lib/nettle/cipher.c6
-rw-r--r--lib/nettle/egd.c6
-rw-r--r--lib/nettle/init.c8
-rw-r--r--lib/nettle/int/drbg-aes-self-test.c2
-rw-r--r--lib/nettle/mac.c6
-rw-r--r--lib/nettle/mpi.c8
-rw-r--r--lib/nettle/pk.c18
-rw-r--r--lib/nettle/rnd-common.c6
-rw-r--r--lib/nettle/rnd-common.h2
-rw-r--r--lib/nettle/rnd-fips.c4
-rw-r--r--lib/nettle/rnd.c6
-rw-r--r--lib/num.c (renamed from lib/gnutls_num.c)6
-rw-r--r--lib/num.h (renamed from lib/gnutls_num.h)2
-rw-r--r--lib/opencdk/literal.c4
-rw-r--r--lib/opencdk/misc.c4
-rw-r--r--lib/opencdk/opencdk.h8
-rw-r--r--lib/opencdk/pubkey.c8
-rw-r--r--lib/opencdk/read-packet.c2
-rw-r--r--lib/opencdk/sig-check.c2
-rw-r--r--lib/openpgp/Makefile.am2
-rw-r--r--lib/openpgp/compat.c6
-rw-r--r--lib/openpgp/extras.c12
-rw-r--r--lib/openpgp/openpgp.c (renamed from lib/openpgp/gnutls_openpgp.c)16
-rw-r--r--lib/openpgp/openpgp.h (renamed from lib/openpgp/gnutls_openpgp.h)0
-rw-r--r--lib/openpgp/output.c4
-rw-r--r--lib/openpgp/pgp.c12
-rw-r--r--lib/openpgp/pgpverify.c8
-rw-r--r--lib/openpgp/privkey.c16
-rw-r--r--lib/pcert.c (renamed from lib/gnutls_pcert.c)8
-rw-r--r--lib/pin.c4
-rw-r--r--lib/pk.c (renamed from lib/gnutls_pk.c)14
-rw-r--r--lib/pk.h (renamed from lib/gnutls_pk.h)0
-rw-r--r--lib/pkcs11.c6
-rw-r--r--lib/pkcs11_int.c6
-rw-r--r--lib/pkcs11_privkey.c10
-rw-r--r--lib/pkcs11_secret.c6
-rw-r--r--lib/pkcs11_write.c6
-rw-r--r--lib/pkcs11x.c6
-rw-r--r--lib/prf.c8
-rw-r--r--lib/priority.c (renamed from lib/gnutls_priority.c)6
-rw-r--r--lib/privkey.c (renamed from lib/gnutls_privkey.c)12
-rw-r--r--lib/privkey_raw.c (renamed from lib/gnutls_privkey_raw.c)12
-rw-r--r--lib/psk.c (renamed from lib/gnutls_psk.c)12
-rw-r--r--lib/pubkey.c (renamed from lib/gnutls_pubkey.c)14
-rw-r--r--lib/random.c4
-rw-r--r--lib/range.c (renamed from lib/gnutls_range.c)6
-rw-r--r--lib/record.c (renamed from lib/gnutls_record.c)34
-rw-r--r--lib/record.h (renamed from lib/gnutls_record.h)4
-rw-r--r--lib/safe-memfuncs.c2
-rw-r--r--lib/session.c (renamed from lib/gnutls_session.c)6
-rw-r--r--lib/session_pack.c (renamed from lib/gnutls_session_pack.c)22
-rw-r--r--lib/session_pack.h (renamed from lib/gnutls_session_pack.h)0
-rw-r--r--lib/srp.c (renamed from lib/gnutls_srp.c)16
-rw-r--r--lib/srp.h (renamed from lib/gnutls_srp.h)7
-rw-r--r--lib/sslv2_compat.c (renamed from lib/gnutls_v2_compat.c)28
-rw-r--r--lib/sslv2_compat.h (renamed from lib/gnutls_v2_compat.h)0
-rw-r--r--lib/state.c (renamed from lib/gnutls_state.c)28
-rw-r--r--lib/state.h (renamed from lib/gnutls_state.h)4
-rw-r--r--lib/str.c (renamed from lib/gnutls_str.c)8
-rw-r--r--lib/str.h (renamed from lib/gnutls_str.h)6
-rw-r--r--lib/str_array.h (renamed from lib/gnutls_str_array.h)4
-rw-r--r--lib/supplemental.c (renamed from lib/gnutls_supplemental.c)6
-rw-r--r--lib/supplemental.h (renamed from lib/gnutls_supplemental.h)2
-rw-r--r--lib/system-keys-dummy.c8
-rw-r--r--lib/system-keys-win.c8
-rw-r--r--lib/system.c4
-rw-r--r--lib/system.h2
-rw-r--r--lib/system_override.c16
-rw-r--r--lib/tls-sig.c (renamed from lib/gnutls_sig.c)20
-rw-r--r--lib/tls-sig.h (renamed from lib/gnutls_sig.h)0
-rw-r--r--lib/tpm.c4
-rw-r--r--lib/ui.c (renamed from lib/gnutls_ui.c)12
-rw-r--r--lib/urls.c6
-rw-r--r--lib/verify-tofu.c14
-rw-r--r--lib/x509.c (renamed from lib/gnutls_x509.c)30
-rw-r--r--lib/x509.h (renamed from lib/gnutls_x509.h)0
-rw-r--r--lib/x509/common.c14
-rw-r--r--lib/x509/crl.c10
-rw-r--r--lib/x509/crl_write.c10
-rw-r--r--lib/x509/crq.c10
-rw-r--r--lib/x509/dn.c12
-rw-r--r--lib/x509/email-verify.c6
-rw-r--r--lib/x509/extensions.c8
-rw-r--r--lib/x509/hostname-verify.c6
-rw-r--r--lib/x509/key_decode.c12
-rw-r--r--lib/x509/key_encode.c16
-rw-r--r--lib/x509/mpi.c10
-rw-r--r--lib/x509/name_constraints.c10
-rw-r--r--lib/x509/ocsp.c8
-rw-r--r--lib/x509/ocsp_output.c10
-rw-r--r--lib/x509/output.c8
-rw-r--r--lib/x509/pkcs12.c10
-rw-r--r--lib/x509/pkcs12_bag.c8
-rw-r--r--lib/x509/pkcs12_encr.c6
-rw-r--r--lib/x509/pkcs7-attrs.c8
-rw-r--r--lib/x509/pkcs7-output.c8
-rw-r--r--lib/x509/pkcs7.c8
-rw-r--r--lib/x509/privkey.c18
-rw-r--r--lib/x509/privkey_openssl.c12
-rw-r--r--lib/x509/privkey_pkcs8.c12
-rw-r--r--lib/x509/sign.c14
-rw-r--r--lib/x509/verify-high.c14
-rw-r--r--lib/x509/verify-high2.c14
-rw-r--r--lib/x509/verify.c16
-rw-r--r--lib/x509/x509.c12
-rw-r--r--lib/x509/x509_dn.c10
-rw-r--r--lib/x509/x509_ext.c8
-rw-r--r--lib/x509/x509_write.c10
-rw-r--r--lib/x509_b64.c4
-rw-r--r--tests/gc.c2
-rw-r--r--tests/mpi.c4
-rw-r--r--tests/openpgp_test.c18
252 files changed, 1010 insertions, 1012 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index dfe08c8b18..e7aaa353c5 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -21,7 +21,7 @@
ACLOCAL_AMFLAGS = -I ../m4 -I ../gl/m4
EXTRA_DIST = priority_options.gperf
-BUILT_SOURCES = pkix_asn1_tab.c gnutls_asn1_tab.c priority_options.h
+BUILT_SOURCES = pkix_asn1_tab.c asn1_tab.c priority_options.h
SUBDIRS = includes x509 auth ext algorithms extras accelerated
@@ -61,27 +61,19 @@ DISTCLEANFILES = $(pkgconfig_DATA)
lib_LTLIBRARIES = libgnutls.la
-SRP_COBJECTS = gnutls_srp.c
-
-PSK_COBJECTS = gnutls_psk.c
-
-COBJECTS = gnutls_range.c gnutls_record.c \
- gnutls_compress.c debug.c gnutls_cipher.c \
- gnutls_mbuffers.c gnutls_buffers.c gnutls_handshake.c \
- gnutls_num.c gnutls_errors.c gnutls_dh.c gnutls_kx.c \
- gnutls_priority.c gnutls_hash_int.c gnutls_cipher_int.c \
- gnutls_session.c gnutls_db.c x509_b64.c gnutls_extensions.c \
- gnutls_auth.c gnutls_v2_compat.c gnutls_datum.c \
- gnutls_session_pack.c gnutls_mpi.c gnutls_pk.c gnutls_cert.c \
- gnutls_global.c gnutls_constate.c gnutls_anon_cred.c \
- pkix_asn1_tab.c gnutls_asn1_tab.c \
- gnutls_mem.c gnutls_ui.c vasprintf.c vasprintf.h \
- gnutls_sig.c gnutls_ecc.c gnutls_alert.c gnutls_privkey_raw.c \
- system.c inet_ntop.c gnutls_str.c gnutls_state.c gnutls_x509.c \
- gnutls_helper.c gnutls_supplemental.c \
- random.c crypto-api.c gnutls_privkey.c gnutls_pcert.c \
- gnutls_pubkey.c locks.c gnutls_dtls.c system_override.c \
- crypto-backend.c verify-tofu.c pin.c tpm.c fips.c \
+SRP_COBJECTS = srp.c
+
+PSK_COBJECTS = psk.c
+
+COBJECTS = range.c record.c compress.c debug.c cipher.c \
+ mbuffers.c buffers.c handshake.c num.c errors.c dh.c kx.c \
+ priority.c hash_int.c cipher_int.c session.c db.c x509_b64.c \
+ extensions.c auth.c sslv2_compat.c datum.c session_pack.c mpi.c \
+ pk.c cert.c global.c constate.c anon_cred.c pkix_asn1_tab.c asn1_tab.c \
+ mem.c ui.c vasprintf.c vasprintf.h tls-sig.c ecc.c alert.c privkey_raw.c \
+ system.c inet_ntop.c str.c state.c x509.c helper.c supplemental.c \
+ random.c crypto-api.c privkey.c pcert.c pubkey.c locks.c dtls.c \
+ system_override.c crypto-backend.c verify-tofu.c pin.c tpm.c fips.c \
safe-memfuncs.c inet_pton.c atfork.c atfork.h \
system-keys.h urls.c urls.h prf.c
@@ -104,19 +96,19 @@ if ENABLE_NETTLE
SUBDIRS += nettle
endif
-HFILES = abstract_int.h debug.h gnutls_compress.h gnutls_cipher.h \
- gnutls_buffers.h gnutls_errors.h gnutls_int.h gnutls_dtls.h \
- gnutls_handshake.h gnutls_num.h algorithms.h \
- gnutls_dh.h gnutls_kx.h gnutls_hash_int.h gnutls_cipher_int.h \
- gnutls_db.h gnutls_auth.h gnutls_extensions.h \
- x509_b64.h gnutls_v2_compat.h gnutls_datum.h \
- gnutls_mpi.h gnutls_pk.h gnutls_record.h \
- gnutls_constate.h gnutls_global.h gnutls_sig.h gnutls_mem.h \
- gnutls_session_pack.h gnutls_str.h gnutls_str_array.h \
- gnutls_state.h gnutls_x509.h crypto-backend.h \
- gnutls_srp.h auth/srp.h auth/srp_passwd.h \
- gnutls_helper.h gnutls_supplemental.h crypto.h random.h system.h\
- locks.h gnutls_mbuffers.h gnutls_ecc.h pin.h fips.h \
+HFILES = abstract_int.h debug.h compress.h cipher.h \
+ buffers.h errors.h gnutls_int.h dtls.h \
+ handshake.h num.h algorithms.h \
+ dh.h kx.h hash_int.h cipher_int.h \
+ db.h auth.h extensions.h \
+ x509_b64.h sslv2_compat.h datum.h \
+ mpi.h pk.h record.h \
+ constate.h global.h tls-sig.h mem.h \
+ session_pack.h str.h str_array.h \
+ state.h x509.h crypto-backend.h \
+ srp.h auth/srp.h auth/srp_passwd.h \
+ helper.h supplemental.h crypto.h random.h system.h\
+ locks.h mbuffers.h ecc.h pin.h fips.h \
priority_options.h
if ENABLE_PKCS11
@@ -219,7 +211,7 @@ pkix_asn1_tab.c: $(srcdir)/pkix.asn
-asn1Parser $(srcdir)/pkix.asn pkix_asn1_tab.c
gnutls_asn1_tab.c: $(srcdir)/gnutls.asn
- -asn1Parser $(srcdir)/gnutls.asn gnutls_asn1_tab.c
+ -asn1Parser $(srcdir)/gnutls.asn asn1_tab.c
priority_options.h: $(srcdir)/priority_options.gperf
-gperf --global-table -t $^ > $@-tmp && mv $@-tmp $@
diff --git a/lib/accelerated/cryptodev-gcm.c b/lib/accelerated/cryptodev-gcm.c
index 52f9e85b8c..e992b63b47 100644
--- a/lib/accelerated/cryptodev-gcm.c
+++ b/lib/accelerated/cryptodev-gcm.c
@@ -20,10 +20,10 @@
*
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <accelerated/cryptodev.h>
#ifdef ENABLE_CRYPTODEV
diff --git a/lib/accelerated/cryptodev.c b/lib/accelerated/cryptodev.c
index c67dfd2473..03a5d66360 100644
--- a/lib/accelerated/cryptodev.c
+++ b/lib/accelerated/cryptodev.c
@@ -20,10 +20,10 @@
*
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <accelerated/cryptodev.h>
#ifdef ENABLE_CRYPTODEV
diff --git a/lib/accelerated/x86/aes-cbc-x86-aesni.c b/lib/accelerated/x86/aes-cbc-x86-aesni.c
index 74a67e7da4..b935db9723 100644
--- a/lib/accelerated/x86/aes-cbc-x86-aesni.c
+++ b/lib/accelerated/x86/aes-cbc-x86-aesni.c
@@ -25,10 +25,10 @@
* using intel's AES instruction set.
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <sha-x86.h>
#include <x86-common.h>
diff --git a/lib/accelerated/x86/aes-cbc-x86-ssse3.c b/lib/accelerated/x86/aes-cbc-x86-ssse3.c
index 0617d203c8..9e367cad94 100644
--- a/lib/accelerated/x86/aes-cbc-x86-ssse3.c
+++ b/lib/accelerated/x86/aes-cbc-x86-ssse3.c
@@ -25,10 +25,10 @@
* using intel's AES instruction set.
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <sha-x86.h>
#include <x86-common.h>
diff --git a/lib/accelerated/x86/aes-ccm-x86-aesni.c b/lib/accelerated/x86/aes-ccm-x86-aesni.c
index fb8ba766c9..4828a229df 100644
--- a/lib/accelerated/x86/aes-ccm-x86-aesni.c
+++ b/lib/accelerated/x86/aes-ccm-x86-aesni.c
@@ -25,13 +25,13 @@
* using AESNI (without PCLMUL)
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#ifdef HAVE_LIBNETTLE
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <x86-common.h>
#include <byteswap.h>
diff --git a/lib/accelerated/x86/aes-gcm-padlock.c b/lib/accelerated/x86/aes-gcm-padlock.c
index 410cfc055f..51b02a8d5c 100644
--- a/lib/accelerated/x86/aes-gcm-padlock.c
+++ b/lib/accelerated/x86/aes-gcm-padlock.c
@@ -24,13 +24,13 @@
* The following code is an implementation of the AES-128-GCM cipher
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#ifdef HAVE_LIBNETTLE
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <x86-common.h>
#include <byteswap.h>
diff --git a/lib/accelerated/x86/aes-gcm-x86-aesni.c b/lib/accelerated/x86/aes-gcm-x86-aesni.c
index d102732ff4..9cae528912 100644
--- a/lib/accelerated/x86/aes-gcm-x86-aesni.c
+++ b/lib/accelerated/x86/aes-gcm-x86-aesni.c
@@ -25,13 +25,13 @@
* using AESNI (without PCLMUL)
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#ifdef HAVE_LIBNETTLE
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <x86-common.h>
#include <byteswap.h>
diff --git a/lib/accelerated/x86/aes-gcm-x86-pclmul.c b/lib/accelerated/x86/aes-gcm-x86-pclmul.c
index b6672d64f0..40d4769803 100644
--- a/lib/accelerated/x86/aes-gcm-x86-pclmul.c
+++ b/lib/accelerated/x86/aes-gcm-x86-pclmul.c
@@ -25,10 +25,10 @@
* using intel's AES instruction set.
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <x86-common.h>
#include <nettle/memxor.h>
diff --git a/lib/accelerated/x86/aes-gcm-x86-ssse3.c b/lib/accelerated/x86/aes-gcm-x86-ssse3.c
index a655eb44b6..512a8cffd7 100644
--- a/lib/accelerated/x86/aes-gcm-x86-ssse3.c
+++ b/lib/accelerated/x86/aes-gcm-x86-ssse3.c
@@ -24,13 +24,13 @@
* The following code is an implementation of the AES-128-GCM cipher
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#ifdef HAVE_LIBNETTLE
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <x86-common.h>
#include <byteswap.h>
diff --git a/lib/accelerated/x86/aes-padlock.c b/lib/accelerated/x86/aes-padlock.c
index 3e1c4f5a14..ceda0faa5f 100644
--- a/lib/accelerated/x86/aes-padlock.c
+++ b/lib/accelerated/x86/aes-padlock.c
@@ -25,10 +25,10 @@
* using VIA Padlock instruction set.
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <x86-common.h>
#ifdef HAVE_LIBNETTLE
diff --git a/lib/accelerated/x86/aes-padlock.h b/lib/accelerated/x86/aes-padlock.h
index d19ad48d47..cff3128f14 100644
--- a/lib/accelerated/x86/aes-padlock.h
+++ b/lib/accelerated/x86/aes-padlock.h
@@ -1,7 +1,7 @@
#ifndef AES_PADLOCK_H
#define AES_PADLOCK_H
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <aes-x86.h>
struct padlock_cipher_data {
diff --git a/lib/accelerated/x86/aes-x86.h b/lib/accelerated/x86/aes-x86.h
index 4de2631709..e25991bb8c 100644
--- a/lib/accelerated/x86/aes-x86.h
+++ b/lib/accelerated/x86/aes-x86.h
@@ -1,7 +1,7 @@
#ifndef AES_X86_H
#define AES_X86_H
-#include <gnutls_int.h>
+#include "gnutls_int.h"
void register_x86_crypto(void);
diff --git a/lib/accelerated/x86/hmac-padlock.c b/lib/accelerated/x86/hmac-padlock.c
index 868e9f725b..1d1a1bd1e6 100644
--- a/lib/accelerated/x86/hmac-padlock.c
+++ b/lib/accelerated/x86/hmac-padlock.c
@@ -24,9 +24,9 @@
* VIA Padlock hardware acceleration.
*/
-#include <gnutls_int.h>
-#include <gnutls_hash_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <hash_int.h>
+#include "errors.h"
#include <nettle/sha.h>
#include <nettle/hmac.h>
#include <nettle/macros.h>
diff --git a/lib/accelerated/x86/hmac-x86-ssse3.c b/lib/accelerated/x86/hmac-x86-ssse3.c
index 0d5004d30c..54a81140c4 100644
--- a/lib/accelerated/x86/hmac-x86-ssse3.c
+++ b/lib/accelerated/x86/hmac-x86-ssse3.c
@@ -24,9 +24,9 @@
* VIA Padlock hardware acceleration.
*/
-#include <gnutls_int.h>
-#include <gnutls_hash_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <hash_int.h>
+#include "errors.h"
#include <nettle/sha.h>
#include <nettle/hmac.h>
#include <nettle/macros.h>
diff --git a/lib/accelerated/x86/sha-padlock.c b/lib/accelerated/x86/sha-padlock.c
index 04b42e455e..dc74a50f53 100644
--- a/lib/accelerated/x86/sha-padlock.c
+++ b/lib/accelerated/x86/sha-padlock.c
@@ -21,9 +21,9 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_hash_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <hash_int.h>
+#include "errors.h"
#include <nettle/sha.h>
#include <nettle/hmac.h>
#include <nettle/macros.h>
diff --git a/lib/accelerated/x86/sha-x86-ssse3.c b/lib/accelerated/x86/sha-x86-ssse3.c
index 52c6ab0ac4..e99885bcf2 100644
--- a/lib/accelerated/x86/sha-x86-ssse3.c
+++ b/lib/accelerated/x86/sha-x86-ssse3.c
@@ -20,10 +20,10 @@
*
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <nettle/sha.h>
#include <nettle/macros.h>
diff --git a/lib/accelerated/x86/x86-common.c b/lib/accelerated/x86/x86-common.c
index 0f355cc411..18e3710362 100644
--- a/lib/accelerated/x86/x86-common.c
+++ b/lib/accelerated/x86/x86-common.c
@@ -25,10 +25,10 @@
* using intel's AES instruction set.
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <aes-x86.h>
#include <sha-x86.h>
#include <x86-common.h>
diff --git a/lib/gnutls_alert.c b/lib/alert.c
index fb3a9d624b..f0c4af8eff 100644
--- a/lib/gnutls_alert.c
+++ b/lib/alert.c
@@ -20,11 +20,11 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_record.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <record.h>
#include <debug.h>
-#include <gnutls_str.h>
+#include "str.h"
typedef struct {
gnutls_alert_description_t alert;
diff --git a/lib/algorithms.h b/lib/algorithms.h
index f9f0be19ce..9dcfc01160 100644
--- a/lib/algorithms.h
+++ b/lib/algorithms.h
@@ -23,7 +23,7 @@
#ifndef ALGORITHMS_H
#define ALGORITHMS_H
-#include "gnutls_auth.h"
+#include "auth.h"
#define GNUTLS_RENEGO_PROTECTION_REQUEST_MAJOR 0x00
#define GNUTLS_RENEGO_PROTECTION_REQUEST_MINOR 0xFF
diff --git a/lib/algorithms/cert_types.c b/lib/algorithms/cert_types.c
index 7ccab552e3..ca014507dc 100644
--- a/lib/algorithms/cert_types.c
+++ b/lib/algorithms/cert_types.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <x509/common.h>
/**
diff --git a/lib/algorithms/ciphers.c b/lib/algorithms/ciphers.c
index dc6fd1c097..1c5529c507 100644
--- a/lib/algorithms/ciphers.c
+++ b/lib/algorithms/ciphers.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <x509/common.h>
diff --git a/lib/algorithms/ciphersuites.c b/lib/algorithms/ciphersuites.c
index f8e9f3c8fe..68334b350b 100644
--- a/lib/algorithms/ciphersuites.c
+++ b/lib/algorithms/ciphersuites.c
@@ -20,11 +20,11 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
-#include <gnutls_dh.h>
-#include <gnutls_state.h>
+#include "errors.h"
+#include <dh.h>
+#include <state.h>
#include <x509/common.h>
#include <auth/cert.h>
#include <auth/anon.h>
diff --git a/lib/algorithms/ecc.c b/lib/algorithms/ecc.c
index cef9bf4c6a..b42d95aa4d 100644
--- a/lib/algorithms/ecc.c
+++ b/lib/algorithms/ecc.c
@@ -20,11 +20,11 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <x509/common.h>
-#include <gnutls_pk.h>
+#include <pk.h>
/* Supported ECC curves
*/
diff --git a/lib/algorithms/kx.c b/lib/algorithms/kx.c
index 587ec53268..6373f930a0 100644
--- a/lib/algorithms/kx.c
+++ b/lib/algorithms/kx.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <x509/common.h>
diff --git a/lib/algorithms/mac.c b/lib/algorithms/mac.c
index c8b2c941ec..cca95b4513 100644
--- a/lib/algorithms/mac.c
+++ b/lib/algorithms/mac.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <x509/common.h>
static const mac_entry_st hash_algorithms[] = {
diff --git a/lib/algorithms/protocols.c b/lib/algorithms/protocols.c
index 35208b4ac6..0682f1c19b 100644
--- a/lib/algorithms/protocols.c
+++ b/lib/algorithms/protocols.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <x509/common.h>
/* TLS Versions */
diff --git a/lib/algorithms/publickey.c b/lib/algorithms/publickey.c
index d921be4a63..183f436899 100644
--- a/lib/algorithms/publickey.c
+++ b/lib/algorithms/publickey.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <x509/common.h>
diff --git a/lib/algorithms/secparams.c b/lib/algorithms/secparams.c
index 11ae8db3ee..ab02c15d41 100644
--- a/lib/algorithms/secparams.c
+++ b/lib/algorithms/secparams.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <x509/common.h>
typedef struct {
diff --git a/lib/algorithms/sign.c b/lib/algorithms/sign.c
index f322d3cc9d..f2ac184667 100644
--- a/lib/algorithms/sign.c
+++ b/lib/algorithms/sign.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <x509/common.h>
/* signature algorithms;
diff --git a/lib/gnutls_anon_cred.c b/lib/anon_cred.c
index 5818fbdaad..6d45c8f386 100644
--- a/lib/gnutls_anon_cred.c
+++ b/lib/anon_cred.c
@@ -24,12 +24,12 @@
#ifdef ENABLE_ANON
-#include "gnutls_errors.h"
+#include "errors.h"
#include <auth/anon.h>
-#include "gnutls_auth.h"
-#include "gnutls_dh.h"
-#include "gnutls_num.h"
-#include "gnutls_mpi.h"
+#include "auth.h"
+#include "dh.h"
+#include "num.h"
+#include "mpi.h"
/**
* gnutls_anon_free_server_credentials:
diff --git a/lib/gnutls_asn1_tab.c b/lib/asn1_tab.c
index 8021f1f181..8021f1f181 100644
--- a/lib/gnutls_asn1_tab.c
+++ b/lib/asn1_tab.c
diff --git a/lib/atfork.c b/lib/atfork.c
index 3ef9bb9e92..8ec81153ef 100644
--- a/lib/atfork.c
+++ b/lib/atfork.c
@@ -22,8 +22,8 @@
*/
#include <config.h>
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <sys/socket.h>
#include <errno.h>
diff --git a/lib/atfork.h b/lib/atfork.h
index 6c046d0ae0..a6f4c2a98f 100644
--- a/lib/atfork.h
+++ b/lib/atfork.h
@@ -24,7 +24,7 @@
# define ATFORK_H
#include <config.h>
-#include <gnutls_int.h>
+#include "gnutls_int.h"
extern unsigned int _gnutls_forkid;
diff --git a/lib/gnutls_auth.c b/lib/auth.c
index 1238da8d5c..178d5f2aca 100644
--- a/lib/gnutls_auth.c
+++ b/lib/auth.c
@@ -21,14 +21,14 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_auth.h"
-#include "gnutls_auth.h"
+#include "errors.h"
+#include "auth.h"
+#include "auth.h"
#include "algorithms.h"
#include <auth/cert.h>
#include <auth/psk.h>
#include <auth/anon.h>
-#include <gnutls_datum.h>
+#include <datum.h>
/* The functions here are used in order for authentication algorithms
* to be able to retrieve the needed credentials eg public and private
diff --git a/lib/gnutls_auth.h b/lib/auth.h
index 6e843a82dc..0674e1807b 100644
--- a/lib/gnutls_auth.h
+++ b/lib/auth.h
@@ -23,7 +23,7 @@
#ifndef GNUTLS_AUTH_H
#define GNUTLS_AUTH_H
-#include <gnutls_str.h>
+#include "str.h"
typedef struct mod_auth_st_int {
const char *name; /* null terminated */
diff --git a/lib/auth/Makefile.am b/lib/auth/Makefile.am
index 319d3700e6..af8c266383 100644
--- a/lib/auth/Makefile.am
+++ b/lib/auth/Makefile.am
@@ -35,7 +35,7 @@ endif
noinst_LTLIBRARIES = libgnutls_auth.la
libgnutls_auth_la_SOURCES = anon.c cert.c dh_common.c dhe.c \
- rsa_psk.c dhe_psk.c psk.c psk_passwd.c rsa.c srp.c \
+ rsa_psk.c dhe_psk.c psk.c psk_passwd.c rsa.c srp_kx.c \
srp_passwd.c srp_rsa.c srp_sb64.c anon.h cert.h dh_common.h \
- psk.h psk_passwd.h srp.h srp_passwd.h anon_ecdh.c \
+ psk.h psk_passwd.h srp_kx.h srp_passwd.h anon_ecdh.c \
ecdhe.c ecdhe.h rsa_common.h
diff --git a/lib/auth/anon.c b/lib/auth/anon.c
index f72c712e3c..24cfd74f0d 100644
--- a/lib/auth/anon.c
+++ b/lib/auth/anon.c
@@ -25,17 +25,17 @@
* handshake.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#if defined(ENABLE_ANON) && defined(ENABLE_DHE)
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_dh.h"
+#include "auth.h"
+#include "errors.h"
+#include "dh.h"
#include "auth/anon.h"
-#include "gnutls_num.h"
-#include "gnutls_mpi.h"
-#include <gnutls_state.h>
+#include "num.h"
+#include "mpi.h"
+#include <state.h>
#include <auth/dh_common.h>
static int gen_anon_server_kx(gnutls_session_t, gnutls_buffer_st *);
diff --git a/lib/auth/anon.h b/lib/auth/anon.h
index 6424fdd9a7..eb88e86144 100644
--- a/lib/auth/anon.h
+++ b/lib/auth/anon.h
@@ -21,7 +21,7 @@
*/
/* this is not to be included by gnutls_anon.c */
-#include <gnutls_auth.h>
+#include <auth.h>
#include <auth/dh_common.h>
typedef struct gnutls_anon_server_credentials_st {
diff --git a/lib/auth/anon_ecdh.c b/lib/auth/anon_ecdh.c
index e171da84b5..1f8a9b7a2b 100644
--- a/lib/auth/anon_ecdh.c
+++ b/lib/auth/anon_ecdh.c
@@ -25,17 +25,17 @@
* handshake.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#if defined(ENABLE_ANON) && defined(ENABLE_ECDHE)
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_dh.h"
+#include "auth.h"
+#include "errors.h"
+#include "dh.h"
#include "auth/anon.h"
-#include "gnutls_num.h"
-#include "gnutls_mpi.h"
-#include <gnutls_state.h>
+#include "num.h"
+#include "mpi.h"
+#include <state.h>
#include <auth/ecdhe.h>
#include <ext/ecc.h>
diff --git a/lib/auth/cert.c b/lib/auth/cert.c
index f6d5eaafeb..450f9f4d6f 100644
--- a/lib/auth/cert.c
+++ b/lib/auth/cert.c
@@ -24,29 +24,29 @@
* and are common to RSA and DHE key exchange, are in this file.
*/
-#include <gnutls_int.h>
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
+#include "gnutls_int.h"
+#include "auth.h"
+#include "errors.h"
#include <auth/cert.h>
-#include "gnutls_dh.h"
-#include "gnutls_num.h"
+#include "dh.h"
+#include "num.h"
#include "libtasn1.h"
-#include "gnutls_datum.h"
+#include "datum.h"
#include "ext/signature.h"
-#include <gnutls_pk.h>
+#include <pk.h>
#include <algorithms.h>
-#include <gnutls_global.h>
-#include <gnutls_record.h>
-#include <gnutls_sig.h>
-#include <gnutls_state.h>
-#include <gnutls_pk.h>
-#include <gnutls_x509.h>
+#include <global.h>
+#include <record.h>
+#include <tls-sig.h>
+#include <state.h>
+#include <pk.h>
+#include <x509.h>
#include <x509/verify-high.h>
#include <gnutls/abstract.h>
#include "debug.h"
#ifdef ENABLE_OPENPGP
-#include "openpgp/gnutls_openpgp.h"
+#include "openpgp/openpgp.h"
static gnutls_privkey_t alloc_and_load_pgp_key(const
gnutls_openpgp_privkey_t
diff --git a/lib/auth/cert.h b/lib/auth/cert.h
index e660ec84fb..c99a020e09 100644
--- a/lib/auth/cert.h
+++ b/lib/auth/cert.h
@@ -22,13 +22,13 @@
#ifndef AUTH_CERT_H
#define AUTH_CERT_H
-#include "gnutls_auth.h"
+#include "auth.h"
#include <auth/dh_common.h>
#include <x509/x509_int.h>
#include <openpgp/openpgp_int.h>
#include <gnutls/abstract.h>
#include <gnutls/compat.h>
-#include <gnutls_str_array.h>
+#include <str_array.h>
typedef struct {
gnutls_pcert_st *cert_list; /* a certificate chain */
diff --git a/lib/auth/dh_common.c b/lib/auth/dh_common.c
index 226051e23b..cbb538f58d 100644
--- a/lib/auth/dh_common.c
+++ b/lib/auth/dh_common.c
@@ -26,15 +26,15 @@
*/
#include "gnutls_int.h"
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_dh.h"
-#include "gnutls_num.h"
-#include "gnutls_sig.h"
-#include <gnutls_datum.h>
-#include <gnutls_x509.h>
-#include <gnutls_state.h>
-#include <gnutls_pk.h>
+#include "auth.h"
+#include "errors.h"
+#include "dh.h"
+#include "num.h"
+#include "tls-sig.h"
+#include <datum.h>
+#include <x509.h>
+#include <state.h>
+#include <pk.h>
#include <auth/dh_common.h>
#include <algorithms.h>
#include <auth/psk.h>
diff --git a/lib/auth/dh_common.h b/lib/auth/dh_common.h
index 016588062c..3bd8b8ae31 100644
--- a/lib/auth/dh_common.h
+++ b/lib/auth/dh_common.h
@@ -23,7 +23,7 @@
#ifndef AUTH_DH_COMMON
#define AUTH_DH_COMMON
-#include <gnutls_auth.h>
+#include <auth.h>
typedef struct {
int secret_bits;
diff --git a/lib/auth/dhe.c b/lib/auth/dhe.c
index d68817d6ee..16b16bd2a0 100644
--- a/lib/auth/dhe.c
+++ b/lib/auth/dhe.c
@@ -26,16 +26,16 @@
*/
#include "gnutls_int.h"
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_dh.h"
-#include "gnutls_num.h"
-#include "gnutls_sig.h"
-#include <gnutls_datum.h>
+#include "auth.h"
+#include "errors.h"
+#include "dh.h"
+#include "num.h"
+#include "tls-sig.h"
+#include <datum.h>
#include <algorithms.h>
#include <auth/cert.h>
-#include <gnutls_x509.h>
-#include <gnutls_state.h>
+#include <x509.h>
+#include <state.h>
#include <auth/dh_common.h>
#include <auth/ecdhe.h>
diff --git a/lib/auth/dhe_psk.c b/lib/auth/dhe_psk.c
index d517b35be0..d4c6b6e0c5 100644
--- a/lib/auth/dhe_psk.c
+++ b/lib/auth/dhe_psk.c
@@ -24,23 +24,23 @@
* PSK authentication. The functions here are used in the handshake.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef ENABLE_PSK
/* Contains PSK code for DHE and ECDHE
*/
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_dh.h"
+#include "auth.h"
+#include "errors.h"
+#include "dh.h"
#include <auth/psk.h>
-#include "gnutls_num.h"
-#include "gnutls_mpi.h"
-#include <gnutls_state.h>
+#include "num.h"
+#include "mpi.h"
+#include <state.h>
#include <auth/dh_common.h>
#include <auth/ecdhe.h>
-#include <gnutls_datum.h>
+#include <datum.h>
#include <auth/psk_passwd.h>
static int
diff --git a/lib/auth/ecdhe.c b/lib/auth/ecdhe.c
index 885e6057f3..9376c0b67e 100644
--- a/lib/auth/ecdhe.c
+++ b/lib/auth/ecdhe.c
@@ -25,22 +25,22 @@
* procedure of the certificate and anoymous authentication.
*/
-#include <gnutls_int.h>
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_dh.h"
-#include "gnutls_num.h"
-#include "gnutls_sig.h"
-#include <gnutls_state.h>
-#include <gnutls_datum.h>
-#include <gnutls_x509.h>
+#include "gnutls_int.h"
+#include "auth.h"
+#include "errors.h"
+#include "dh.h"
+#include "num.h"
+#include "tls-sig.h"
+#include <state.h>
+#include <datum.h>
+#include <x509.h>
#include <auth/ecdhe.h>
-#include <gnutls_ecc.h>
+#include <ecc.h>
#include <ext/ecc.h>
#include <algorithms.h>
#include <auth/psk.h>
#include <auth/cert.h>
-#include <gnutls_pk.h>
+#include <pk.h>
static int gen_ecdhe_server_kx(gnutls_session_t, gnutls_buffer_st *);
static int
diff --git a/lib/auth/ecdhe.h b/lib/auth/ecdhe.h
index 33a0f47bb8..063c6707c9 100644
--- a/lib/auth/ecdhe.h
+++ b/lib/auth/ecdhe.h
@@ -23,7 +23,7 @@
#ifndef AUTH_ECDH_COMMON
#define AUTH_ECDH_COMMON
-#include <gnutls_auth.h>
+#include <auth.h>
int
_gnutls_gen_ecdh_common_client_kx(gnutls_session_t session,
diff --git a/lib/auth/psk.c b/lib/auth/psk.c
index 7244ed5585..2b3ac41dc0 100644
--- a/lib/auth/psk.c
+++ b/lib/auth/psk.c
@@ -20,19 +20,19 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef ENABLE_PSK
-#include "gnutls_errors.h"
-#include "gnutls_auth.h"
-#include "gnutls_auth.h"
+#include "errors.h"
+#include "auth.h"
+#include "auth.h"
#include "debug.h"
-#include "gnutls_num.h"
+#include "num.h"
#include <auth/psk.h>
#include <auth/psk_passwd.h>
-#include <gnutls_str.h>
-#include <gnutls_datum.h>
+#include <str.h>
+#include <datum.h>
static int _gnutls_proc_psk_client_kx(gnutls_session_t, uint8_t *, size_t);
diff --git a/lib/auth/psk.h b/lib/auth/psk.h
index f9af369796..3c1aba3980 100644
--- a/lib/auth/psk.h
+++ b/lib/auth/psk.h
@@ -23,7 +23,7 @@
#ifndef AUTH_PSK_H
#define AUTH_PSK_H
-#include <gnutls_auth.h>
+#include <auth.h>
#include <auth/dh_common.h>
typedef struct gnutls_psk_client_credentials_st {
diff --git a/lib/auth/psk_passwd.c b/lib/auth/psk_passwd.c
index d593c3c453..2ef2c9c901 100644
--- a/lib/auth/psk_passwd.c
+++ b/lib/auth/psk_passwd.c
@@ -22,20 +22,20 @@
/* Functions for operating in an PSK passwd file are included here */
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef ENABLE_PSK
#include "x509_b64.h"
-#include "gnutls_errors.h"
+#include "errors.h"
#include <auth/psk_passwd.h>
#include <auth/psk.h>
-#include "gnutls_auth.h"
-#include "gnutls_dh.h"
+#include "auth.h"
+#include "dh.h"
#include "debug.h"
-#include <gnutls_str.h>
-#include <gnutls_datum.h>
-#include <gnutls_num.h>
+#include <str.h>
+#include <datum.h>
+#include <num.h>
#include <random.h>
diff --git a/lib/auth/rsa.c b/lib/auth/rsa.c
index d8d0edf29a..4260b945ca 100644
--- a/lib/auth/rsa.c
+++ b/lib/auth/rsa.c
@@ -25,20 +25,20 @@
*/
#include "gnutls_int.h"
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_dh.h"
-#include "gnutls_num.h"
-#include "gnutls_datum.h"
+#include "auth.h"
+#include "errors.h"
+#include "dh.h"
+#include "num.h"
+#include "datum.h"
#include <auth/cert.h>
-#include <gnutls_pk.h>
+#include <pk.h>
#include <algorithms.h>
-#include <gnutls_global.h>
+#include <global.h>
#include "debug.h"
-#include <gnutls_sig.h>
-#include <gnutls_x509.h>
+#include <tls-sig.h>
+#include <x509.h>
#include <random.h>
-#include <gnutls_mpi.h>
+#include <mpi.h>
#include <abstract_int.h>
#include <auth/rsa_common.h>
diff --git a/lib/auth/rsa_psk.c b/lib/auth/rsa_psk.c
index a1f460711c..a14baa1eaa 100644
--- a/lib/auth/rsa_psk.c
+++ b/lib/auth/rsa_psk.c
@@ -27,17 +27,17 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef ENABLE_PSK
-#include "gnutls_auth.h"
-#include "gnutls_dh.h"
-#include "gnutls_errors.h"
-#include "gnutls_mpi.h"
-#include "gnutls_num.h"
+#include "auth.h"
+#include "dh.h"
+#include "errors.h"
+#include "mpi.h"
+#include "num.h"
#include "gnutls_int.h"
-#include "gnutls_pk.h"
+#include "pk.h"
#include "random.h"
#include <abstract_int.h>
#include <algorithms.h>
@@ -46,8 +46,8 @@
#include <auth/psk_passwd.h>
#include <auth/rsa_common.h>
#include <cert.h>
-#include <gnutls_datum.h>
-#include <gnutls_state.h>
+#include <datum.h>
+#include <state.h>
static int _gnutls_gen_rsa_psk_client_kx(gnutls_session_t session,
gnutls_buffer_st * data);
diff --git a/lib/auth/srp.c b/lib/auth/srp_kx.c
index 110d9dc2a4..ec13894d19 100644
--- a/lib/auth/srp.c
+++ b/lib/auth/srp_kx.c
@@ -20,19 +20,18 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef ENABLE_SRP
-#include "gnutls_errors.h"
+#include "errors.h"
#include <auth/srp_passwd.h>
-#include "gnutls_auth.h"
-#include "gnutls_auth.h"
-#include "gnutls_srp.h"
-#include "gnutls_num.h"
-#include <auth/srp.h>
-#include <gnutls_str.h>
-#include <gnutls_datum.h>
+#include "auth.h"
+#include "srp.h"
+#include "num.h"
+#include <auth/srp_kx.h>
+#include <str.h>
+#include <datum.h>
#include <ext/srp.h>
const mod_auth_st srp_auth_struct = {
diff --git a/lib/auth/srp.h b/lib/auth/srp_kx.h
index 63b9de22b4..013e0cc35e 100644
--- a/lib/auth/srp.h
+++ b/lib/auth/srp_kx.h
@@ -23,7 +23,7 @@
#ifndef AUTH_SRP_H
#define AUTH_SRP_H
-#include <gnutls_auth.h>
+#include <auth.h>
typedef struct gnutls_srp_client_credentials_st {
char *username;
diff --git a/lib/auth/srp_passwd.c b/lib/auth/srp_passwd.c
index 980076845f..4e00f88b4f 100644
--- a/lib/auth/srp_passwd.c
+++ b/lib/auth/srp_passwd.c
@@ -22,21 +22,21 @@
/* Functions for operating in an SRP passwd file are included here */
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef ENABLE_SRP
#include "x509_b64.h"
-#include "gnutls_errors.h"
+#include "errors.h"
#include <auth/srp_passwd.h>
-#include <auth/srp.h>
-#include "gnutls_auth.h"
-#include "gnutls_srp.h"
-#include "gnutls_dh.h"
+#include <auth/srp_kx.h>
+#include "auth.h"
+#include "srp.h"
+#include "dh.h"
#include "debug.h"
-#include <gnutls_str.h>
-#include <gnutls_datum.h>
-#include <gnutls_num.h>
+#include <str.h>
+#include <datum.h>
+#include <num.h>
#include <random.h>
#include <algorithms.h>
diff --git a/lib/auth/srp_rsa.c b/lib/auth/srp_rsa.c
index c4a24e09de..33359967da 100644
--- a/lib/auth/srp_rsa.c
+++ b/lib/auth/srp_rsa.c
@@ -20,24 +20,23 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef ENABLE_SRP
-#include "gnutls_errors.h"
+#include "errors.h"
#include <auth/srp_passwd.h>
-#include "gnutls_auth.h"
-#include "gnutls_auth.h"
-#include "gnutls_srp.h"
+#include "auth.h"
+#include "auth.h"
+#include "srp.h"
#include "debug.h"
-#include "gnutls_num.h"
-#include <auth/srp.h>
-#include <gnutls_str.h>
+#include "num.h"
+#include <auth/srp_kx.h>
+#include <str.h>
#include <auth/cert.h>
-#include <gnutls_datum.h>
-#include <gnutls_sig.h>
-#include <auth/srp.h>
-#include <gnutls_x509.h>
+#include <datum.h>
+#include <tls-sig.h>
+#include <x509.h>
#include <algorithms.h>
static int gen_srp_cert_server_kx(gnutls_session_t, gnutls_buffer_st *);
diff --git a/lib/auth/srp_sb64.c b/lib/auth/srp_sb64.c
index c9e2805145..533fbc626c 100644
--- a/lib/auth/srp_sb64.c
+++ b/lib/auth/srp_sb64.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <datum.h>
#include <auth/srp_passwd.h>
#ifdef ENABLE_SRP
diff --git a/lib/gnutls_buffers.c b/lib/buffers.c
index 37d0a89234..cc340710ff 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/buffers.c
@@ -39,17 +39,17 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
-#include <gnutls_record.h>
-#include <gnutls_buffers.h>
-#include <gnutls_mbuffers.h>
-#include <gnutls_state.h>
-#include <gnutls_dtls.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <num.h>
+#include <record.h>
+#include <buffers.h>
+#include <mbuffers.h>
+#include <state.h>
+#include <dtls.h>
#include <system.h>
-#include <gnutls_constate.h> /* gnutls_epoch_get */
-#include <gnutls_handshake.h> /* remaining_time() */
+#include <constate.h> /* gnutls_epoch_get */
+#include <handshake.h> /* remaining_time() */
#include <errno.h>
#include <system.h>
#include "debug.h"
diff --git a/lib/gnutls_buffers.h b/lib/buffers.h
index e4dabf1b5f..e4dabf1b5f 100644
--- a/lib/gnutls_buffers.h
+++ b/lib/buffers.h
diff --git a/lib/gnutls_cert.c b/lib/cert.c
index 54ec023a9e..36f87adaf2 100644
--- a/lib/gnutls_cert.c
+++ b/lib/cert.c
@@ -24,25 +24,25 @@
* in this file.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <auth/cert.h>
-#include <gnutls_datum.h>
-#include <gnutls_mpi.h>
-#include <gnutls_global.h>
+#include <datum.h>
+#include <mpi.h>
+#include <global.h>
#include <algorithms.h>
-#include <gnutls_dh.h>
-#include <gnutls_str.h>
-#include <gnutls_state.h>
-#include <gnutls_auth.h>
-#include <gnutls_x509.h>
-#include <gnutls_str_array.h>
+#include <dh.h>
+#include "str.h"
+#include <state.h>
+#include <auth.h>
+#include <x509.h>
+#include <str_array.h>
#include <x509/verify-high.h>
#include "x509/x509_int.h"
#ifdef ENABLE_OPENPGP
-#include "openpgp/gnutls_openpgp.h"
+#include "openpgp/openpgp.h"
#endif
-#include <gnutls_str.h>
+#include "str.h"
/**
* gnutls_certificate_free_keys:
diff --git a/lib/gnutls_cipher.c b/lib/cipher.c
index ea79068d01..56c5cb1284 100644
--- a/lib/gnutls_cipher.c
+++ b/lib/cipher.c
@@ -26,20 +26,20 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_compress.h"
-#include "gnutls_cipher.h"
+#include "errors.h"
+#include "compress.h"
+#include "cipher.h"
#include "algorithms.h"
-#include "gnutls_hash_int.h"
-#include "gnutls_cipher_int.h"
+#include "hash_int.h"
+#include "cipher_int.h"
#include "debug.h"
-#include "gnutls_num.h"
-#include "gnutls_datum.h"
-#include "gnutls_kx.h"
-#include "gnutls_record.h"
-#include "gnutls_constate.h"
-#include "gnutls_mbuffers.h"
-#include <gnutls_state.h>
+#include "num.h"
+#include "datum.h"
+#include "kx.h"
+#include "record.h"
+#include "constate.h"
+#include "mbuffers.h"
+#include <state.h>
#include <random.h>
static int compressed_to_ciphertext(gnutls_session_t session,
diff --git a/lib/gnutls_cipher.h b/lib/cipher.h
index 121dff6794..121dff6794 100644
--- a/lib/gnutls_cipher.h
+++ b/lib/cipher.h
diff --git a/lib/gnutls_cipher_int.c b/lib/cipher_int.c
index 8e7647ecf2..052d559330 100644
--- a/lib/gnutls_cipher_int.c
+++ b/lib/cipher_int.c
@@ -21,10 +21,10 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_cipher_int.h>
-#include <gnutls_datum.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <cipher_int.h>
+#include <datum.h>
#include <gnutls/crypto.h>
#include <crypto.h>
#include <fips.h>
diff --git a/lib/gnutls_cipher_int.h b/lib/cipher_int.h
index 7fdcb3c240..b2dd763d22 100644
--- a/lib/gnutls_cipher_int.h
+++ b/lib/cipher_int.h
@@ -24,7 +24,7 @@
#define GNUTLS_CIPHER_INT
#include <gnutls/crypto.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <crypto-backend.h>
extern int crypto_cipher_prio;
diff --git a/lib/gnutls_compress.c b/lib/compress.c
index 16b128487a..2e7197fb63 100644
--- a/lib/gnutls_compress.c
+++ b/lib/compress.c
@@ -25,9 +25,9 @@
*/
#include "gnutls_int.h"
-#include "gnutls_compress.h"
-#include "gnutls_errors.h"
-#include "gnutls_constate.h"
+#include "compress.h"
+#include "errors.h"
+#include "constate.h"
#include <algorithms.h>
#include <gnutls/gnutls.h>
diff --git a/lib/gnutls_compress.h b/lib/compress.h
index 691044113e..691044113e 100644
--- a/lib/gnutls_compress.h
+++ b/lib/compress.h
diff --git a/lib/gnutls_constate.c b/lib/constate.c
index 544134026b..d89079363a 100644
--- a/lib/gnutls_constate.c
+++ b/lib/constate.c
@@ -24,16 +24,16 @@
* finished. These functions activate the established security parameters.
*/
-#include <gnutls_int.h>
-#include <gnutls_constate.h>
-#include <gnutls_errors.h>
-#include <gnutls_kx.h>
+#include "gnutls_int.h"
+#include <constate.h>
+#include "errors.h"
+#include <kx.h>
#include <algorithms.h>
-#include <gnutls_num.h>
-#include <gnutls_datum.h>
-#include <gnutls_state.h>
-#include <gnutls_extensions.h>
-#include <gnutls_buffers.h>
+#include <num.h>
+#include <datum.h>
+#include <state.h>
+#include <extensions.h>
+#include <buffers.h>
static int
_gnutls_set_kx(gnutls_session_t session, gnutls_kx_algorithm_t algo);
diff --git a/lib/gnutls_constate.h b/lib/constate.h
index bfec4534bb..bfec4534bb 100644
--- a/lib/gnutls_constate.h
+++ b/lib/constate.h
diff --git a/lib/crypto-api.c b/lib/crypto-api.c
index e169092cf1..f6de124e68 100644
--- a/lib/crypto-api.c
+++ b/lib/crypto-api.c
@@ -20,10 +20,10 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_cipher_int.h>
-#include <gnutls_datum.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <cipher_int.h>
+#include <datum.h>
#include <gnutls/crypto.h>
#include <algorithms.h>
#include <random.h>
diff --git a/lib/crypto-backend.c b/lib/crypto-backend.c
index 714f86f9fb..32f66d3e14 100644
--- a/lib/crypto-backend.c
+++ b/lib/crypto-backend.c
@@ -20,15 +20,15 @@
*
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
+#include "errors.h"
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
#include <crypto-backend.h>
#include <crypto.h>
-#include <gnutls_mpi.h>
-#include <gnutls_pk.h>
+#include <mpi.h>
+#include <pk.h>
#include <random.h>
-#include <gnutls_cipher_int.h>
+#include <cipher_int.h>
/* default values for priorities */
int crypto_mac_prio = INT_MAX;
diff --git a/lib/crypto-selftests-pk.c b/lib/crypto-selftests-pk.c
index 31afb0be14..84a9963cea 100644
--- a/lib/crypto-selftests-pk.c
+++ b/lib/crypto-selftests-pk.c
@@ -20,15 +20,15 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_cipher_int.h>
-#include <gnutls_datum.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <cipher_int.h>
+#include <datum.h>
#include <gnutls/crypto.h>
#include <gnutls/self-test.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <gnutls/abstract.h>
-#include <gnutls_pk.h>
+#include <pk.h>
#include <debug.h>
#define DATASTR "Hello there!"
diff --git a/lib/crypto-selftests.c b/lib/crypto-selftests.c
index 7999b79507..310a54518d 100644
--- a/lib/crypto-selftests.c
+++ b/lib/crypto-selftests.c
@@ -20,13 +20,13 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_cipher_int.h>
-#include <gnutls_datum.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <cipher_int.h>
+#include <datum.h>
#include <gnutls/crypto.h>
#include <gnutls/self-test.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <random.h>
#include <crypto.h>
diff --git a/lib/gnutls_datum.c b/lib/datum.c
index 545e090f27..41c54d3369 100644
--- a/lib/gnutls_datum.c
+++ b/lib/datum.c
@@ -25,10 +25,10 @@
* should be preallocated (datum.size+(bits/8))
*/
-#include <gnutls_int.h>
-#include <gnutls_num.h>
-#include <gnutls_datum.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <num.h>
+#include <datum.h>
+#include "errors.h"
int
_gnutls_set_datum(gnutls_datum_t * dat, const void *data, size_t data_size)
diff --git a/lib/gnutls_datum.h b/lib/datum.h
index 4f7205863e..6b4ff48b8f 100644
--- a/lib/gnutls_datum.h
+++ b/lib/datum.h
@@ -23,7 +23,7 @@
#ifndef GNUTLS_DATUM_H
#define GNUTLS_DATUM_H
-# include <gnutls_int.h>
+# include "gnutls_int.h"
int _gnutls_set_datum(gnutls_datum_t * dat, const void *data,
size_t data_size);
diff --git a/lib/gnutls_db.c b/lib/db.c
index 82737d2c86..2554251f28 100644
--- a/lib/gnutls_db.c
+++ b/lib/db.c
@@ -25,10 +25,10 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include <gnutls_db.h>
-#include <gnutls_session_pack.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <db.h>
+#include <session_pack.h>
+#include <datum.h>
/**
* gnutls_db_set_retrieve_function:
diff --git a/lib/gnutls_db.h b/lib/db.h
index 20a8cbf886..20a8cbf886 100644
--- a/lib/gnutls_db.h
+++ b/lib/db.h
diff --git a/lib/debug.c b/lib/debug.c
index b50e1f1bf5..6ab12c6943 100644
--- a/lib/debug.c
+++ b/lib/debug.c
@@ -21,11 +21,11 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
+#include "errors.h"
#include <stdio.h>
#include <stdlib.h>
#include "debug.h"
-#include <gnutls_mpi.h>
+#include <mpi.h>
#ifdef DEBUG
void _gnutls_dump_mpi(const char *prefix, bigint_t a)
diff --git a/lib/gnutls_dh.c b/lib/dh.c
index 2f7ed4ce98..82a411934c 100644
--- a/lib/gnutls_dh.c
+++ b/lib/dh.c
@@ -20,17 +20,17 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <datum.h>
#include <x509_b64.h> /* for PKCS3 PEM decoding */
-#include <gnutls_global.h>
-#include <gnutls_dh.h>
-#include <gnutls_pk.h>
+#include <global.h>
+#include <dh.h>
+#include <pk.h>
#include <x509/common.h>
#include <gnutls/crypto.h>
#include "x509/x509_int.h"
-#include <gnutls_mpi.h>
+#include <mpi.h>
#include "debug.h"
/*-
diff --git a/lib/gnutls_dh.h b/lib/dh.h
index 7bc7bec125..7bc7bec125 100644
--- a/lib/gnutls_dh.h
+++ b/lib/dh.h
diff --git a/lib/gnutls_dtls.c b/lib/dtls.c
index fda04fe965..26ddaf2b77 100644
--- a/lib/gnutls_dtls.c
+++ b/lib/dtls.c
@@ -26,14 +26,14 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
+#include "errors.h"
#include "debug.h"
-#include "gnutls_dtls.h"
-#include "gnutls_record.h"
-#include <gnutls_mbuffers.h>
-#include <gnutls_buffers.h>
-#include <gnutls_constate.h>
-#include <gnutls_state.h>
+#include "dtls.h"
+#include "record.h"
+#include <mbuffers.h>
+#include <buffers.h>
+#include <constate.h>
+#include <state.h>
#include <gnutls/dtls.h>
#include <algorithms.h>
diff --git a/lib/gnutls_dtls.h b/lib/dtls.h
index 25e76b93ca..2c694ebffc 100644
--- a/lib/gnutls_dtls.h
+++ b/lib/dtls.h
@@ -24,10 +24,10 @@
#define DTLS_H
#include <config.h>
-#include <gnutls_int.h>
-#include <gnutls_buffers.h>
-#include <gnutls_mbuffers.h>
-#include <gnutls_constate.h>
+#include "gnutls_int.h"
+#include <buffers.h>
+#include <mbuffers.h>
+#include <constate.h>
int _dtls_transmit(gnutls_session_t session);
int _dtls_record_check(struct record_parameters_st *rp, uint64 * _seq);
diff --git a/lib/gnutls_ecc.c b/lib/ecc.c
index aa6399b5df..14ad242fac 100644
--- a/lib/gnutls_ecc.c
+++ b/lib/ecc.c
@@ -23,11 +23,11 @@
/* Helper functions for ECC handling
* based on public domain code by Tom St. Dennis.
*/
-#include <gnutls_int.h>
-#include <gnutls_mpi.h>
-#include <gnutls_ecc.h>
+#include "gnutls_int.h"
+#include <mpi.h>
+#include <ecc.h>
#include <algorithms.h>
-#include <gnutls_errors.h>
+#include "errors.h"
int
_gnutls_ecc_ansi_x963_export(gnutls_ecc_curve_t curve, bigint_t x,
diff --git a/lib/gnutls_ecc.h b/lib/ecc.h
index a0bd94c19d..a0bd94c19d 100644
--- a/lib/gnutls_ecc.h
+++ b/lib/ecc.h
diff --git a/lib/gnutls_errors.c b/lib/errors.c
index 885427b980..219deb179a 100644
--- a/lib/gnutls_errors.c
+++ b/lib/errors.c
@@ -20,14 +20,14 @@
*
*/
-#include <gnutls_int.h>
-#include "gnutls_errors.h"
+#include "gnutls_int.h"
+#include "errors.h"
#include <libtasn1.h>
#ifdef STDC_HEADERS
#include <stdarg.h>
#endif
#include "vasprintf.h"
-#include <gnutls_str.h>
+#include "str.h"
#define ERROR_ENTRY(desc, name) \
{ desc, #name, name}
diff --git a/lib/gnutls_errors.h b/lib/errors.h
index a810834fb4..4335ec27db 100644
--- a/lib/gnutls_errors.h
+++ b/lib/errors.h
@@ -23,8 +23,9 @@
#ifndef GNUTLS_ERRORS_H
#define GNUTLS_ERRORS_H
-#include <gnutls_int.h>
-#include <gnutls_global.h>
+#include "gnutls_int.h"
+#include <global.h>
+#include <mpi.h>
#define GNUTLS_E_INT_RET_0 -1251
#define GNUTLS_E_INT_CHECK_AGAIN -1252
diff --git a/lib/ext/alpn.c b/lib/ext/alpn.c
index 9fc946582e..96d3cf0dc7 100644
--- a/lib/ext/alpn.c
+++ b/lib/ext/alpn.c
@@ -19,9 +19,9 @@
*/
#include "gnutls_int.h"
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
+#include "auth.h"
+#include "errors.h"
+#include "num.h"
#include <ext/alpn.h>
static int _gnutls_alpn_recv_params(gnutls_session_t session,
diff --git a/lib/ext/alpn.h b/lib/ext/alpn.h
index 739879a2d1..b79ecdd961 100644
--- a/lib/ext/alpn.h
+++ b/lib/ext/alpn.h
@@ -20,7 +20,7 @@
#ifndef EXT_ALPN_H
#define EXT_ALPN_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
#define MAX_ALPN_PROTOCOLS 8
#define MAX_ALPN_PROTOCOL_NAME 32
diff --git a/lib/ext/cert_type.c b/lib/ext/cert_type.c
index f9f5e8ab93..408ac07764 100644
--- a/lib/ext/cert_type.c
+++ b/lib/ext/cert_type.c
@@ -25,11 +25,11 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
+#include "errors.h"
+#include "num.h"
#include <ext/cert_type.h>
-#include <gnutls_state.h>
-#include <gnutls_num.h>
+#include <state.h>
+#include <num.h>
#ifdef ENABLE_OPENPGP
diff --git a/lib/ext/cert_type.h b/lib/ext/cert_type.h
index 0eb521a447..b78cc13adc 100644
--- a/lib/ext/cert_type.h
+++ b/lib/ext/cert_type.h
@@ -23,7 +23,7 @@
#ifndef EXT_CERT_TYPE_H
#define EXT_CERT_TYPE_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
extern extension_entry_st ext_mod_cert_type;
diff --git a/lib/ext/dumbfw.c b/lib/ext/dumbfw.c
index 0a66f1a994..b4c850e212 100644
--- a/lib/ext/dumbfw.c
+++ b/lib/ext/dumbfw.c
@@ -19,9 +19,9 @@
*/
#include "gnutls_int.h"
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
+#include "auth.h"
+#include "errors.h"
+#include "num.h"
#include <ext/dumbfw.h>
/* This extension adds additional padding data in the TLS client hello.
diff --git a/lib/ext/dumbfw.h b/lib/ext/dumbfw.h
index bf0a49f9d7..e6a14fc886 100644
--- a/lib/ext/dumbfw.h
+++ b/lib/ext/dumbfw.h
@@ -20,7 +20,7 @@
#ifndef EXT_DUMBFW_H
#define EXT_DUMBFW_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
extern extension_entry_st ext_mod_dumbfw;
diff --git a/lib/ext/ecc.c b/lib/ext/ecc.c
index 68b3f89542..2d785353cb 100644
--- a/lib/ext/ecc.c
+++ b/lib/ext/ecc.c
@@ -25,11 +25,11 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
+#include "errors.h"
+#include "num.h"
#include <ext/ecc.h>
-#include <gnutls_state.h>
-#include <gnutls_num.h>
+#include <state.h>
+#include <num.h>
#include <algorithms.h>
static int _gnutls_supported_ecc_recv_params(gnutls_session_t session,
diff --git a/lib/ext/ecc.h b/lib/ext/ecc.h
index 268ca8e1f8..357fa87c4d 100644
--- a/lib/ext/ecc.h
+++ b/lib/ext/ecc.h
@@ -22,7 +22,7 @@
#ifndef EXT_ECC_H
#define EXT_ECC_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
extern extension_entry_st ext_mod_supported_ecc;
extern extension_entry_st ext_mod_supported_ecc_pf;
diff --git a/lib/ext/etm.c b/lib/ext/etm.c
index d77db63eb1..69474ddd60 100644
--- a/lib/ext/etm.c
+++ b/lib/ext/etm.c
@@ -24,9 +24,9 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
-#include <gnutls_extensions.h>
+#include "errors.h"
+#include "num.h"
+#include <extensions.h>
#include <ext/etm.h>
static int _gnutls_ext_etm_recv_params(gnutls_session_t session,
diff --git a/lib/ext/etm.h b/lib/ext/etm.h
index 23a35a6d9b..fcbf94751d 100644
--- a/lib/ext/etm.h
+++ b/lib/ext/etm.h
@@ -23,7 +23,7 @@
#ifndef EXT_ETM_H
#define EXT_ETM_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
extern extension_entry_st ext_mod_etm;
diff --git a/lib/ext/ext_master_secret.c b/lib/ext/ext_master_secret.c
index 9610f1207b..30b26d3864 100644
--- a/lib/ext/ext_master_secret.c
+++ b/lib/ext/ext_master_secret.c
@@ -24,9 +24,9 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
-#include <gnutls_extensions.h>
+#include "errors.h"
+#include "num.h"
+#include <extensions.h>
#include <ext/ext_master_secret.h>
static int _gnutls_ext_master_secret_recv_params(gnutls_session_t session,
diff --git a/lib/ext/ext_master_secret.h b/lib/ext/ext_master_secret.h
index 2cdb29538b..12f07fb66b 100644
--- a/lib/ext/ext_master_secret.h
+++ b/lib/ext/ext_master_secret.h
@@ -23,7 +23,7 @@
#ifndef EXT_EXT_MASTER_SECRET_H
#define EXT_EXT_MASTER_SECRET_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
extern extension_entry_st ext_mod_ext_master_secret;
diff --git a/lib/ext/heartbeat.c b/lib/ext/heartbeat.c
index f847a53f96..e137f7e1a8 100644
--- a/lib/ext/heartbeat.c
+++ b/lib/ext/heartbeat.c
@@ -26,12 +26,12 @@
* and later rewritten by Nikos Mavrogiannopoulos.
*/
-#include <gnutls_errors.h>
-#include <gnutls_int.h>
-#include <gnutls_dtls.h>
-#include <gnutls_record.h>
+#include "errors.h"
+#include "gnutls_int.h"
+#include <dtls.h>
+#include <record.h>
#include <ext/heartbeat.h>
-#include <gnutls_extensions.h>
+#include <extensions.h>
#include <random.h>
#ifdef ENABLE_HEARTBEAT
diff --git a/lib/ext/heartbeat.h b/lib/ext/heartbeat.h
index ceb09bb737..5851435293 100644
--- a/lib/ext/heartbeat.h
+++ b/lib/ext/heartbeat.h
@@ -24,7 +24,7 @@
#ifndef EXT_HEARTBEAT_H
#define EXT_HEARTBEAT_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
#define HEARTBEAT_REQUEST 1
#define HEARTBEAT_RESPONSE 2
diff --git a/lib/ext/max_record.c b/lib/ext/max_record.c
index cd636ea2ef..607222680c 100644
--- a/lib/ext/max_record.c
+++ b/lib/ext/max_record.c
@@ -24,9 +24,9 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
-#include <gnutls_extensions.h>
+#include "errors.h"
+#include "num.h"
+#include <extensions.h>
#include <ext/max_record.h>
static int _gnutls_max_record_recv_params(gnutls_session_t session,
diff --git a/lib/ext/max_record.h b/lib/ext/max_record.h
index 82c7ab7bc4..536b9da749 100644
--- a/lib/ext/max_record.h
+++ b/lib/ext/max_record.h
@@ -23,7 +23,7 @@
#ifndef EXT_MAX_RECORD_H
#define EXT_MAX_RECORD_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
extern extension_entry_st ext_mod_max_record_size;
diff --git a/lib/ext/safe_renegotiation.c b/lib/ext/safe_renegotiation.c
index ea8208c508..3bc0bf363f 100644
--- a/lib/ext/safe_renegotiation.c
+++ b/lib/ext/safe_renegotiation.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <ext/safe_renegotiation.h>
-#include <gnutls_errors.h>
+#include "errors.h"
static int _gnutls_sr_recv_params(gnutls_session_t state,
diff --git a/lib/ext/safe_renegotiation.h b/lib/ext/safe_renegotiation.h
index cd334158a3..52e3fcd733 100644
--- a/lib/ext/safe_renegotiation.h
+++ b/lib/ext/safe_renegotiation.h
@@ -23,7 +23,7 @@
#ifndef EXT_SAFE_RENEGOTIATION_H
#define EXT_SAFE_RENEGOTIATION_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
typedef struct {
uint8_t client_verify_data[MAX_VERIFY_DATA_SIZE];
diff --git a/lib/ext/server_name.c b/lib/ext/server_name.c
index 2dd86930da..800f4de8f9 100644
--- a/lib/ext/server_name.c
+++ b/lib/ext/server_name.c
@@ -21,9 +21,9 @@
*/
#include "gnutls_int.h"
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
+#include "auth.h"
+#include "errors.h"
+#include "num.h"
#include <ext/server_name.h>
#ifdef HAVE_LIBIDN
# include <idna.h>
diff --git a/lib/ext/server_name.h b/lib/ext/server_name.h
index fbc52177dc..f25d28051f 100644
--- a/lib/ext/server_name.h
+++ b/lib/ext/server_name.h
@@ -22,7 +22,7 @@
#ifndef EXT_SERVER_NAME_H
#define EXT_SERVER_NAME_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
typedef struct {
uint8_t name[MAX_SERVER_NAME_SIZE];
diff --git a/lib/ext/session_ticket.c b/lib/ext/session_ticket.c
index 585544b4eb..799f009ed9 100644
--- a/lib/ext/session_ticket.c
+++ b/lib/ext/session_ticket.c
@@ -20,20 +20,20 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <datum.h>
#include <algorithms.h>
-#include <gnutls_handshake.h>
-#include <gnutls_num.h>
-#include <gnutls_constate.h>
-#include <gnutls_session_pack.h>
+#include <handshake.h>
+#include <num.h>
+#include <constate.h>
+#include <session_pack.h>
#include <random.h>
#include <ext/session_ticket.h>
-#include <gnutls_mbuffers.h>
-#include <gnutls_extensions.h>
-#include <gnutls_constate.h>
-#include <gnutls_dtls.h>
+#include <mbuffers.h>
+#include <extensions.h>
+#include <constate.h>
+#include <dtls.h>
#ifdef ENABLE_SESSION_TICKETS
diff --git a/lib/ext/session_ticket.h b/lib/ext/session_ticket.h
index 8c76a7a271..3bb90f875a 100644
--- a/lib/ext/session_ticket.h
+++ b/lib/ext/session_ticket.h
@@ -23,7 +23,7 @@
#ifndef EXT_SESSION_TICKET_H
#define EXT_SESSION_TICKET_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
extern extension_entry_st ext_mod_session_ticket;
diff --git a/lib/ext/signature.c b/lib/ext/signature.c
index 3e2fa2be37..03dd4a07da 100644
--- a/lib/ext/signature.c
+++ b/lib/ext/signature.c
@@ -25,12 +25,12 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
+#include "errors.h"
+#include "num.h"
#include <gnutls/gnutls.h>
#include <ext/signature.h>
-#include <gnutls_state.h>
-#include <gnutls_num.h>
+#include <state.h>
+#include <num.h>
#include <algorithms.h>
#include <abstract_int.h>
diff --git a/lib/ext/signature.h b/lib/ext/signature.h
index 93858ef725..ad2815a51c 100644
--- a/lib/ext/signature.h
+++ b/lib/ext/signature.h
@@ -25,7 +25,7 @@
#ifndef EXT_SIGNATURE_H
#define EXT_SIGNATURE_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
extern extension_entry_st ext_mod_sig;
diff --git a/lib/ext/srp.c b/lib/ext/srp.c
index ca9baaeddc..cd1b54fe93 100644
--- a/lib/ext/srp.c
+++ b/lib/ext/srp.c
@@ -20,17 +20,17 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <ext/srp.h>
#ifdef ENABLE_SRP
-#include "gnutls_auth.h"
-#include <auth/srp.h>
-#include "gnutls_errors.h"
+#include "auth.h"
+#include <auth/srp_kx.h>
+#include "errors.h"
#include "algorithms.h"
-#include <gnutls_num.h>
-#include <gnutls_extensions.h>
+#include <num.h>
+#include <extensions.h>
static int _gnutls_srp_unpack(gnutls_buffer_st * ps,
extension_priv_data_t * _priv);
diff --git a/lib/ext/srp.h b/lib/ext/srp.h
index 77e275dfc1..ae9a03c1a4 100644
--- a/lib/ext/srp.h
+++ b/lib/ext/srp.h
@@ -23,7 +23,7 @@
#ifndef EXT_SRP_H
#define EXT_SRP_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
#ifdef ENABLE_SRP
diff --git a/lib/ext/srtp.c b/lib/ext/srtp.c
index 23bdc54ca0..0f5d3c0ff8 100644
--- a/lib/ext/srtp.c
+++ b/lib/ext/srtp.c
@@ -21,9 +21,9 @@
*/
#include "gnutls_int.h"
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
+#include "auth.h"
+#include "errors.h"
+#include "num.h"
#include <ext/srtp.h>
static int _gnutls_srtp_recv_params(gnutls_session_t session,
diff --git a/lib/ext/srtp.h b/lib/ext/srtp.h
index 46ecfd7f02..bed8fc3963 100644
--- a/lib/ext/srtp.h
+++ b/lib/ext/srtp.h
@@ -22,7 +22,7 @@
#ifndef EXT_SRTP_H
#define EXT_SRTP_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
#define MAX_SRTP_PROFILES 4
diff --git a/lib/ext/status_request.c b/lib/ext/status_request.c
index 4209f42ea0..e3226b2dd7 100644
--- a/lib/ext/status_request.c
+++ b/lib/ext/status_request.c
@@ -26,13 +26,13 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include <gnutls_extensions.h>
+#include "errors.h"
+#include <extensions.h>
#include <ext/status_request.h>
-#include <gnutls_mbuffers.h>
-#include <gnutls_auth.h>
+#include <mbuffers.h>
+#include <auth.h>
#include <auth/cert.h>
-#include <gnutls_handshake.h>
+#include <handshake.h>
#ifdef ENABLE_OCSP
diff --git a/lib/ext/status_request.h b/lib/ext/status_request.h
index cd1aaeea46..604c39248e 100644
--- a/lib/ext/status_request.h
+++ b/lib/ext/status_request.h
@@ -23,7 +23,7 @@
#ifndef EXT_STATUS_REQUEST_H
#define EXT_STATUS_REQUEST_H
-#include <gnutls_extensions.h>
+#include <extensions.h>
extern extension_entry_st ext_mod_status_request;
diff --git a/lib/gnutls_extensions.c b/lib/extensions.c
index fece34995e..1e0aae5998 100644
--- a/lib/gnutls_extensions.c
+++ b/lib/extensions.c
@@ -26,8 +26,8 @@
*/
#include "gnutls_int.h"
-#include "gnutls_extensions.h"
-#include "gnutls_errors.h"
+#include "extensions.h"
+#include "errors.h"
#include "ext/max_record.h"
#include <ext/cert_type.h>
#include <ext/server_name.h>
@@ -44,7 +44,7 @@
#include <ext/alpn.h>
#include <ext/dumbfw.h>
#include <ext/etm.h>
-#include <gnutls_num.h>
+#include <num.h>
static int ext_register(extension_entry_st * mod);
diff --git a/lib/gnutls_extensions.h b/lib/extensions.h
index 03fdd79e4a..03fdd79e4a 100644
--- a/lib/gnutls_extensions.h
+++ b/lib/extensions.h
diff --git a/lib/extras/randomart.c b/lib/extras/randomart.c
index 37e6c69129..cfd7e1c9db 100644
--- a/lib/extras/randomart.c
+++ b/lib/extras/randomart.c
@@ -24,8 +24,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <randomart.h>
/*
diff --git a/lib/fips.c b/lib/fips.c
index 4233485e4c..54a706c27a 100644
--- a/lib/fips.c
+++ b/lib/fips.c
@@ -19,11 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>
#include <unistd.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <fips.h>
#include <gnutls/self-test.h>
#include <stdio.h>
diff --git a/lib/fips.h b/lib/fips.h
index f7fc7f6253..23c3c9e2bc 100644
--- a/lib/fips.h
+++ b/lib/fips.h
@@ -23,7 +23,7 @@
#ifndef FIPS_H
# define FIPS_H
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/gnutls.h>
#define FIPS140_RND_KEY_SIZE 32
diff --git a/lib/gnutls_global.c b/lib/global.c
index e8374aa2b3..ee33a5178b 100644
--- a/lib/gnutls_global.c
+++ b/lib/global.c
@@ -20,15 +20,15 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <libtasn1.h>
-#include <gnutls_dh.h>
+#include <dh.h>
#include <random.h>
#include <gnutls/pkcs11.h>
-#include <gnutls_extensions.h> /* for _gnutls_ext_init */
-#include <gnutls_supplemental.h> /* for _gnutls_supplemental_deinit */
+#include <extensions.h> /* for _gnutls_ext_init */
+#include <supplemental.h> /* for _gnutls_supplemental_deinit */
#include <locks.h>
#include <system.h>
#include <accelerated/cryptodev.h>
@@ -36,7 +36,7 @@
#include <fips.h>
#include <atfork.h>
#include <system-keys.h>
-#include <gnutls_str.h>
+#include "str.h"
/* Minimum library versions we accept. */
#define GNUTLS_MIN_LIBTASN1_VERSION "0.3.4"
diff --git a/lib/gnutls_global.h b/lib/global.h
index e1a8f2e25c..e1a8f2e25c 100644
--- a/lib/gnutls_global.h
+++ b/lib/global.h
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 848acfec86..2846fa9610 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -194,7 +194,7 @@ typedef enum record_flush_t {
#define DEFAULT_MAX_VERIFY_BITS 16*1024
#define MAX_VERIFY_DEPTH 4096
-#include <gnutls_mem.h>
+#include <mem.h>
#define MEMSUB(x,y) ((ssize_t)((ptrdiff_t)x-(ptrdiff_t)y))
@@ -214,7 +214,7 @@ typedef struct {
uint8_t pint[3];
} uint24;
-#include <gnutls_mpi.h>
+#include <mpi.h>
typedef enum handshake_state_t { STATE0 = 0, STATE1, STATE2,
STATE3, STATE4, STATE5, STATE6, STATE7, STATE8,
@@ -236,7 +236,7 @@ typedef enum recv_state_t {
RECV_STATE_DTLS_RETRANSMIT,
} recv_state_t;
-#include <gnutls_str.h>
+#include "str.h"
/* This is the maximum number of algorithms (ciphers or macs etc).
* keep it synced with GNUTLS_MAX_ALGORITHM_NUM in gnutls.h
@@ -495,9 +495,9 @@ typedef struct {
/* STATE (cont) */
-#include <gnutls_hash_int.h>
-#include <gnutls_cipher_int.h>
-#include <gnutls_compress.h>
+#include <hash_int.h>
+#include <cipher_int.h>
+#include <compress.h>
typedef struct {
uint8_t hash_algorithm;
diff --git a/lib/gnutls_handshake.c b/lib/handshake.c
index 3a2631f921..3ea25bc81f 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/handshake.c
@@ -24,27 +24,27 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_dh.h"
+#include "errors.h"
+#include "dh.h"
#include "debug.h"
#include "algorithms.h"
-#include "gnutls_compress.h"
-#include "gnutls_cipher.h"
-#include "gnutls_buffers.h"
-#include "gnutls_mbuffers.h"
-#include "gnutls_kx.h"
-#include "gnutls_handshake.h"
-#include "gnutls_num.h"
-#include "gnutls_hash_int.h"
-#include "gnutls_db.h"
-#include "gnutls_extensions.h"
-#include "gnutls_supplemental.h"
-#include "gnutls_auth.h"
-#include "gnutls_v2_compat.h"
+#include "compress.h"
+#include "cipher.h"
+#include "buffers.h"
+#include "mbuffers.h"
+#include "kx.h"
+#include "handshake.h"
+#include "num.h"
+#include "hash_int.h"
+#include "db.h"
+#include "extensions.h"
+#include "supplemental.h"
+#include "auth.h"
+#include "sslv2_compat.h"
#include <auth/cert.h>
-#include "gnutls_constate.h"
-#include <gnutls_record.h>
-#include <gnutls_state.h>
+#include "constate.h"
+#include <record.h>
+#include <state.h>
#include <ext/srp.h>
#include <ext/session_ticket.h>
#include <ext/status_request.h>
@@ -52,7 +52,7 @@
#include <auth/anon.h> /* for gnutls_anon_server_credentials_t */
#include <auth/psk.h> /* for gnutls_psk_server_credentials_t */
#include <random.h>
-#include <gnutls_dtls.h>
+#include <dtls.h>
#ifdef HANDSHAKE_DEBUG
#define ERR(x, y) _gnutls_handshake_log("HSK[%p]: %s (%d)\n", session, x,y)
diff --git a/lib/gnutls_handshake.h b/lib/handshake.h
index 65b190238d..3387b3c7da 100644
--- a/lib/gnutls_handshake.h
+++ b/lib/handshake.h
@@ -23,7 +23,7 @@
#ifndef HANDSHAKE_H
#define HANDSHAKE_H
-#include <gnutls_errors.h>
+#include "errors.h"
int _gnutls_send_handshake(gnutls_session_t session, mbuffer_st * bufel,
gnutls_handshake_description_t type);
diff --git a/lib/gnutls_hash_int.c b/lib/hash_int.c
index 39b04780a0..5201a16843 100644
--- a/lib/gnutls_hash_int.c
+++ b/lib/hash_int.c
@@ -24,9 +24,9 @@
* and HMACs.
*/
-#include <gnutls_int.h>
-#include <gnutls_hash_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <hash_int.h>
+#include "errors.h"
#include <algorithms.h>
#include <fips.h>
diff --git a/lib/gnutls_hash_int.h b/lib/hash_int.h
index 2e00b8c495..9ebd3fce2b 100644
--- a/lib/gnutls_hash_int.h
+++ b/lib/hash_int.h
@@ -23,7 +23,7 @@
#ifndef GNUTLS_HASH_INT_H
#define GNUTLS_HASH_INT_H
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/crypto.h>
#include <crypto-backend.h>
#include <crypto.h>
diff --git a/lib/gnutls_helper.c b/lib/helper.c
index d647fe3327..9bdb35115d 100644
--- a/lib/gnutls_helper.c
+++ b/lib/helper.c
@@ -20,8 +20,8 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_helper.h>
+#include "gnutls_int.h"
+#include <helper.h>
int _gnutls_file_exists(const char *file)
{
diff --git a/lib/gnutls_helper.h b/lib/helper.h
index 3529d6a494..3529d6a494 100644
--- a/lib/gnutls_helper.h
+++ b/lib/helper.h
diff --git a/lib/gnutls_kx.c b/lib/kx.c
index d02d42d271..2c9197a4fc 100644
--- a/lib/gnutls_kx.c
+++ b/lib/kx.c
@@ -25,16 +25,16 @@
*/
#include "gnutls_int.h"
-#include "gnutls_handshake.h"
-#include "gnutls_kx.h"
-#include "gnutls_dh.h"
-#include "gnutls_errors.h"
+#include "handshake.h"
+#include "kx.h"
+#include "dh.h"
+#include "errors.h"
#include "algorithms.h"
#include "debug.h"
-#include "gnutls_mpi.h"
-#include <gnutls_state.h>
-#include <gnutls_datum.h>
-#include <gnutls_mbuffers.h>
+#include "mpi.h"
+#include <state.h>
+#include <datum.h>
+#include <mbuffers.h>
/* This is a temporary function to be used before the generate_*
internal API is changed to use mbuffers. For now we don't avoid the
diff --git a/lib/gnutls_kx.h b/lib/kx.h
index 00bd22f1af..00bd22f1af 100644
--- a/lib/gnutls_kx.h
+++ b/lib/kx.h
diff --git a/lib/locks.c b/lib/locks.c
index e2acc79618..d632e0e3c9 100644
--- a/lib/locks.c
+++ b/lib/locks.c
@@ -20,10 +20,10 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <libtasn1.h>
-#include <gnutls_dh.h>
+#include <dh.h>
#include <random.h>
#include <locks.h>
diff --git a/lib/locks.h b/lib/locks.h
index d046341ea4..58077545e0 100644
--- a/lib/locks.h
+++ b/lib/locks.h
@@ -24,7 +24,7 @@
#define GNUTLS_LOCKS_H
#include <gnutls/gnutls.h>
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <system.h>
extern mutex_init_func gnutls_mutex_init;
diff --git a/lib/gnutls_mbuffers.c b/lib/mbuffers.c
index c8fe95a024..2bcd57e426 100644
--- a/lib/gnutls_mbuffers.c
+++ b/lib/mbuffers.c
@@ -20,8 +20,8 @@
*
*/
-#include "gnutls_mbuffers.h"
-#include "gnutls_errors.h"
+#include "mbuffers.h"
+#include "errors.h"
/* Here be mbuffers */
diff --git a/lib/gnutls_mbuffers.h b/lib/mbuffers.h
index e48353da97..4c68b55f98 100644
--- a/lib/gnutls_mbuffers.h
+++ b/lib/mbuffers.h
@@ -23,8 +23,8 @@
#ifndef GNUTLS_MBUFFERS_H
#define GNUTLS_MBUFFERS_H
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
void _mbuffer_head_init(mbuffer_head_st * buf);
void _mbuffer_head_clear(mbuffer_head_st * buf);
diff --git a/lib/gnutls_mem.c b/lib/mem.c
index b4b49ddd45..2f4fc93f34 100644
--- a/lib/gnutls_mem.c
+++ b/lib/mem.c
@@ -20,9 +20,9 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <num.h>
#include <xsize.h>
gnutls_alloc_function gnutls_secure_malloc = malloc;
diff --git a/lib/gnutls_mem.h b/lib/mem.h
index 418a7b724f..418a7b724f 100644
--- a/lib/gnutls_mem.h
+++ b/lib/mem.h
diff --git a/lib/gnutls_mpi.c b/lib/mpi.c
index 9348b5905e..828a0b8dad 100644
--- a/lib/gnutls_mpi.c
+++ b/lib/mpi.c
@@ -24,11 +24,11 @@
* other stuff that didn't fit anywhere else.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <libtasn1.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
-#include <gnutls_mpi.h>
+#include "errors.h"
+#include <num.h>
+#include <mpi.h>
#include <random.h>
#include <x509/x509_int.h>
diff --git a/lib/gnutls_mpi.h b/lib/mpi.h
index 23eee6637f..c7533673ac 100644
--- a/lib/gnutls_mpi.h
+++ b/lib/mpi.h
@@ -23,7 +23,7 @@
#ifndef GNUTLS_MPI_H
#define GNUTLS_MPI_H
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <crypto-backend.h>
diff --git a/lib/nettle/cipher.c b/lib/nettle/cipher.c
index 74e42031c6..0bf94fc694 100644
--- a/lib/nettle/cipher.c
+++ b/lib/nettle/cipher.c
@@ -24,9 +24,9 @@
/* Here lie nettle's wrappers for cipher support.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_cipher_int.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <cipher_int.h>
#include <nettle/aes.h>
#include <nettle/camellia.h>
#include <nettle/arcfour.h>
diff --git a/lib/nettle/egd.c b/lib/nettle/egd.c
index 051ee2b5d5..ae51901d2f 100644
--- a/lib/nettle/egd.c
+++ b/lib/nettle/egd.c
@@ -33,9 +33,9 @@
#include <sys/socket.h>
#include <sys/un.h>
#include "egd.h"
-#include <gnutls_int.h>
-#include <gnutls_str.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <str.h>
+#include "errors.h"
#ifdef AF_UNIX
#define LOCAL_SOCKET_TYPE AF_UNIX
diff --git a/lib/nettle/init.c b/lib/nettle/init.c
index 4f75859403..c2d488e743 100644
--- a/lib/nettle/init.c
+++ b/lib/nettle/init.c
@@ -20,10 +20,10 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
-#include <gnutls_mpi.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <num.h>
+#include <mpi.h>
/* Functions that refer to the initialization of the nettle library.
*/
diff --git a/lib/nettle/int/drbg-aes-self-test.c b/lib/nettle/int/drbg-aes-self-test.c
index eb62cf0a4d..c4547a6665 100644
--- a/lib/nettle/int/drbg-aes-self-test.c
+++ b/lib/nettle/int/drbg-aes-self-test.c
@@ -21,7 +21,7 @@
*/
#include <config.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <drbg-aes.h>
#include <string.h>
#include <stdio.h>
diff --git a/lib/nettle/mac.c b/lib/nettle/mac.c
index cfa37e3479..eafba8fcc3 100644
--- a/lib/nettle/mac.c
+++ b/lib/nettle/mac.c
@@ -23,9 +23,9 @@
/* This file provides the backend hash/mac API for nettle.
*/
-#include <gnutls_int.h>
-#include <gnutls_hash_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <hash_int.h>
+#include "errors.h"
#include <nettle/md5.h>
#include <nettle/md2.h>
#include <nettle/sha.h>
diff --git a/lib/nettle/mpi.c b/lib/nettle/mpi.c
index 1324263e7c..61fddfb7e0 100644
--- a/lib/nettle/mpi.c
+++ b/lib/nettle/mpi.c
@@ -23,11 +23,11 @@
/* Here lie everything that has to do with large numbers, gmp.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <algorithms.h>
-#include <gnutls_num.h>
-#include <gnutls_mpi.h>
+#include <num.h>
+#include <mpi.h>
#include <nettle/bignum.h> /* includes gmp.h */
#include <gnettle.h>
#include <random.h>
diff --git a/lib/nettle/pk.c b/lib/nettle/pk.c
index 2fba4de3a7..98621ec87b 100644
--- a/lib/nettle/pk.c
+++ b/lib/nettle/pk.c
@@ -25,18 +25,18 @@
* encryption and signatures.
*/
-#include <gnutls_int.h>
-#include <gnutls_mpi.h>
-#include <gnutls_pk.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_sig.h>
-#include <gnutls_num.h>
+#include "gnutls_int.h"
+#include <mpi.h>
+#include <pk.h>
+#include "errors.h"
+#include <datum.h>
+#include <global.h>
+#include <tls-sig.h>
+#include <num.h>
#include <x509/x509_int.h>
#include <x509/common.h>
#include <random.h>
-#include <gnutls_pk.h>
+#include <pk.h>
#include <nettle/dsa.h>
#ifdef ENABLE_FIPS140
# include <dsa-fips.h>
diff --git a/lib/nettle/rnd-common.c b/lib/nettle/rnd-common.c
index c69ff3bdbb..680126033a 100644
--- a/lib/nettle/rnd-common.c
+++ b/lib/nettle/rnd-common.c
@@ -28,10 +28,10 @@
* Original author Niels Möller.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <locks.h>
-#include <gnutls_num.h>
+#include <num.h>
#include <nettle/yarrow.h>
#include <errno.h>
#include <rnd-common.h>
diff --git a/lib/nettle/rnd-common.h b/lib/nettle/rnd-common.h
index f6354793c9..3ffb4a9bb0 100644
--- a/lib/nettle/rnd-common.h
+++ b/lib/nettle/rnd-common.h
@@ -21,7 +21,7 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef HAVE_GETPID
# include <unistd.h> /* getpid */
#endif
diff --git a/lib/nettle/rnd-fips.c b/lib/nettle/rnd-fips.c
index 8e31f73895..ef64649c8f 100644
--- a/lib/nettle/rnd-fips.c
+++ b/lib/nettle/rnd-fips.c
@@ -25,8 +25,8 @@
#include <drbg-aes.h>
#include <fips.h>
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <nettle/aes.h>
#include <nettle/memxor.h>
#include <locks.h>
diff --git a/lib/nettle/rnd.c b/lib/nettle/rnd.c
index 8ac30a8d95..8a5a76286c 100644
--- a/lib/nettle/rnd.c
+++ b/lib/nettle/rnd.c
@@ -27,10 +27,10 @@
* Original author Niels Möller.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <locks.h>
-#include <gnutls_num.h>
+#include <num.h>
#include <nettle/yarrow.h>
#include <nettle/salsa20.h>
#include <rnd-common.h>
diff --git a/lib/gnutls_num.c b/lib/num.c
index e9a7487917..4169720b0b 100644
--- a/lib/gnutls_num.c
+++ b/lib/num.c
@@ -24,9 +24,9 @@
* TLS, and functions which ease the access to TLS vectors (data of given size).
*/
-#include <gnutls_int.h>
-#include <gnutls_num.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <num.h>
+#include "errors.h"
/* This function will add one to uint64 x.
* Returns 0 on success, or -1 if the uint64 max limit
diff --git a/lib/gnutls_num.h b/lib/num.h
index 13d33ba9d7..c491be735b 100644
--- a/lib/gnutls_num.h
+++ b/lib/num.h
@@ -23,7 +23,7 @@
#ifndef GNUTLS_NUM_H
#define GNUTLS_NUM_H
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <minmax.h>
#include <byteswap.h>
diff --git a/lib/opencdk/literal.c b/lib/opencdk/literal.c
index 7b4baec82f..2c7b1b86a4 100644
--- a/lib/opencdk/literal.c
+++ b/lib/opencdk/literal.c
@@ -27,8 +27,8 @@
#include <opencdk.h>
#include <main.h>
#include <filters.h>
-#include <gnutls_int.h>
-#include <gnutls_str.h>
+#include "gnutls_int.h"
+#include <str.h>
/* Duplicate the string @s but strip of possible
diff --git a/lib/opencdk/misc.c b/lib/opencdk/misc.c
index 0d4ee89121..3aab45573e 100644
--- a/lib/opencdk/misc.c
+++ b/lib/opencdk/misc.c
@@ -31,8 +31,8 @@
#include <opencdk.h>
#include <main.h>
#include <random.h>
-#include <gnutls_int.h>
-#include <gnutls_str.h>
+#include "gnutls_int.h"
+#include <str.h>
u32 _cdk_buftou32(const byte * buf)
diff --git a/lib/opencdk/opencdk.h b/lib/opencdk/opencdk.h
index c06b749845..07bac6128d 100644
--- a/lib/opencdk/opencdk.h
+++ b/lib/opencdk/opencdk.h
@@ -24,13 +24,13 @@
#define OPENCDK_H
#include <config.h>
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <stddef.h> /* for size_t */
#include <stdarg.h>
-#include <gnutls_mem.h>
+#include <mem.h>
#include <gnutls/gnutls.h>
-#include <gnutls_errors.h>
-#include <gnutls_hash_int.h>
+#include "errors.h"
+#include <hash_int.h>
/* The OpenCDK version as a string. */
#define OPENCDK_VERSION "0.6.6"
diff --git a/lib/opencdk/pubkey.c b/lib/opencdk/pubkey.c
index 6e753bd256..72e7d77b7e 100644
--- a/lib/opencdk/pubkey.c
+++ b/lib/opencdk/pubkey.c
@@ -23,10 +23,10 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <gnutls_int.h>
-#include <gnutls_datum.h>
-#include <gnutls_pk.h>
-#include <gnutls_sig.h>
+#include "gnutls_int.h"
+#include <datum.h>
+#include <pk.h>
+#include <tls-sig.h>
#include <x509/common.h>
#include "opencdk.h"
#include "main.h"
diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c
index 932c95ec41..6956915820 100644
--- a/lib/opencdk/read-packet.c
+++ b/lib/opencdk/read-packet.c
@@ -33,7 +33,7 @@
#include "packet.h"
#include "types.h"
#include <algorithms.h>
-#include <gnutls_str.h>
+#include <str.h>
#include <minmax.h>
/* The version of the MDC packet considering the lastest OpenPGP draft. */
diff --git a/lib/opencdk/sig-check.c b/lib/opencdk/sig-check.c
index 931bb138cb..935895fc5f 100644
--- a/lib/opencdk/sig-check.c
+++ b/lib/opencdk/sig-check.c
@@ -24,7 +24,7 @@
#include <config.h>
#endif
#include <stdio.h>
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <algorithms.h>
#include "opencdk.h"
diff --git a/lib/openpgp/Makefile.am b/lib/openpgp/Makefile.am
index 893f5966b0..0522cec51a 100644
--- a/lib/openpgp/Makefile.am
+++ b/lib/openpgp/Makefile.am
@@ -35,6 +35,6 @@ endif
noinst_LTLIBRARIES = libgnutls_openpgp.la
COBJECTS = pgp.c pgpverify.c extras.c compat.c privkey.c output.c \
- gnutls_openpgp.c
+ openpgp.c
libgnutls_openpgp_la_SOURCES = $(COBJECTS) openpgp_int.h gnutls_openpgp.h
diff --git a/lib/openpgp/compat.c b/lib/openpgp/compat.c
index 4fae6714fd..cf39024c7a 100644
--- a/lib/openpgp/compat.c
+++ b/lib/openpgp/compat.c
@@ -23,9 +23,9 @@
/* Compatibility functions on OpenPGP key parsing.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_openpgp.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <openpgp.h>
#include <openpgp_int.h>
/*-
diff --git a/lib/openpgp/extras.c b/lib/openpgp/extras.c
index 114cae1372..0e3dadd078 100644
--- a/lib/openpgp/extras.c
+++ b/lib/openpgp/extras.c
@@ -23,13 +23,13 @@
/* Functions on keyring parsing
*/
-#include <gnutls_int.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <openpgp_int.h>
-#include <gnutls_openpgp.h>
-#include <gnutls_num.h>
+#include <openpgp.h>
+#include <num.h>
/* Keyring stuff.
*/
diff --git a/lib/openpgp/gnutls_openpgp.c b/lib/openpgp/openpgp.c
index 4c867960dc..d2f69335d8 100644
--- a/lib/openpgp/gnutls_openpgp.c
+++ b/lib/openpgp/openpgp.c
@@ -21,16 +21,16 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_mpi.h"
-#include "gnutls_num.h"
-#include "gnutls_datum.h"
-#include "gnutls_global.h"
-#include "gnutls_openpgp.h"
+#include "errors.h"
+#include "mpi.h"
+#include "num.h"
+#include "datum.h"
+#include "global.h"
+#include "openpgp.h"
#include "read-file.h"
#include <gnutls/abstract.h>
-#include <gnutls_str.h>
-#include <gnutls_sig.h>
+#include <str.h>
+#include <tls-sig.h>
#include <stdio.h>
#include <sys/stat.h>
diff --git a/lib/openpgp/gnutls_openpgp.h b/lib/openpgp/openpgp.h
index 3d37bdc314..3d37bdc314 100644
--- a/lib/openpgp/gnutls_openpgp.h
+++ b/lib/openpgp/openpgp.h
diff --git a/lib/openpgp/output.c b/lib/openpgp/output.c
index 8ed87f894e..0995b8071d 100644
--- a/lib/openpgp/output.c
+++ b/lib/openpgp/output.c
@@ -23,9 +23,9 @@
/* Functions for printing X.509 Certificate structures
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/openpgp.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <extras/randomart.h>
#define addf _gnutls_buffer_append_printf
diff --git a/lib/openpgp/pgp.c b/lib/openpgp/pgp.c
index 1e37c81c23..dd6957e247 100644
--- a/lib/openpgp/pgp.c
+++ b/lib/openpgp/pgp.c
@@ -23,13 +23,13 @@
/* Functions on OpenPGP key parsing
*/
-#include <gnutls_int.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <openpgp_int.h>
-#include <gnutls_str.h>
-#include <gnutls_num.h>
+#include <str.h>
+#include <num.h>
#include <x509/common.h>
/**
diff --git a/lib/openpgp/pgpverify.c b/lib/openpgp/pgpverify.c
index b1748daf7e..f9083507d8 100644
--- a/lib/openpgp/pgpverify.c
+++ b/lib/openpgp/pgpverify.c
@@ -23,11 +23,11 @@
/* Functions on OpenPGP key parsing
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <openpgp_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_openpgp.h>
-#include <gnutls_num.h>
+#include "errors.h"
+#include <openpgp.h>
+#include <num.h>
/**
* gnutls_openpgp_crt_verify_ring:
diff --git a/lib/openpgp/privkey.c b/lib/openpgp/privkey.c
index a9627f63f1..5766a142bf 100644
--- a/lib/openpgp/privkey.c
+++ b/lib/openpgp/privkey.c
@@ -23,15 +23,15 @@
/* Functions on OpenPGP privkey parsing
*/
-#include <gnutls_int.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
+#include "gnutls_int.h"
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
+#include <num.h>
#include <openpgp_int.h>
-#include <gnutls_openpgp.h>
-#include <gnutls_sig.h>
-#include <gnutls_pk.h>
+#include <openpgp.h>
+#include <tls-sig.h>
+#include <pk.h>
/**
* gnutls_openpgp_privkey_init:
diff --git a/lib/gnutls_pcert.c b/lib/pcert.c
index 06088c8654..6127f182d5 100644
--- a/lib/gnutls_pcert.c
+++ b/lib/pcert.c
@@ -20,14 +20,14 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <auth/cert.h>
#include <x509/common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include "x509/x509_int.h"
#ifdef ENABLE_OPENPGP
-#include "openpgp/gnutls_openpgp.h"
+#include "openpgp/openpgp.h"
#endif
/**
diff --git a/lib/pin.c b/lib/pin.c
index 64edffb4c4..86903fd0b5 100644
--- a/lib/pin.c
+++ b/lib/pin.c
@@ -18,10 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
#include <pin.h>
-#include <gnutls_errors.h>
+#include "errors.h"
gnutls_pin_callback_t _gnutls_pin_func;
void *_gnutls_pin_data;
diff --git a/lib/gnutls_pk.c b/lib/pk.c
index 22a5133755..60d1f78087 100644
--- a/lib/gnutls_pk.c
+++ b/lib/pk.c
@@ -24,13 +24,13 @@
* encryption and signatures.
*/
-#include <gnutls_int.h>
-#include <gnutls_mpi.h>
-#include <gnutls_pk.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_num.h>
+#include "gnutls_int.h"
+#include <mpi.h>
+#include <pk.h>
+#include "errors.h"
+#include <datum.h>
+#include <global.h>
+#include <num.h>
#include "debug.h"
#include <x509/x509_int.h>
#include <x509/common.h>
diff --git a/lib/gnutls_pk.h b/lib/pk.h
index 34712f5098..34712f5098 100644
--- a/lib/gnutls_pk.h
+++ b/lib/pk.h
diff --git a/lib/pkcs11.c b/lib/pkcs11.c
index 46351ab034..4500ac9b25 100644
--- a/lib/pkcs11.c
+++ b/lib/pkcs11.c
@@ -25,11 +25,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
#include <string.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <datum.h>
#include <x509/common.h>
#include <locks.h>
diff --git a/lib/pkcs11_int.c b/lib/pkcs11_int.c
index 848b8b94b0..a2277b8823 100644
--- a/lib/pkcs11_int.c
+++ b/lib/pkcs11_int.c
@@ -23,12 +23,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
#include <stdio.h>
#include <string.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <datum.h>
#include <pin.h>
#include <pkcs11_int.h>
diff --git a/lib/pkcs11_privkey.c b/lib/pkcs11_privkey.c
index 5e4e5d2017..3e61f50d96 100644
--- a/lib/pkcs11_privkey.c
+++ b/lib/pkcs11_privkey.c
@@ -18,15 +18,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
#include <stdio.h>
#include <string.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <datum.h>
#include <pkcs11_int.h>
-#include <gnutls_sig.h>
-#include <gnutls_pk.h>
+#include <tls-sig.h>
+#include <pk.h>
#include <fips.h>
#include "urls.h"
#include <p11-kit/uri.h>
diff --git a/lib/pkcs11_secret.c b/lib/pkcs11_secret.c
index 0b90ee8993..a53763e7dc 100644
--- a/lib/pkcs11_secret.c
+++ b/lib/pkcs11_secret.c
@@ -18,12 +18,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
#include <stdio.h>
#include <string.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <datum.h>
#include <pkcs11_int.h>
#include <random.h>
diff --git a/lib/pkcs11_write.c b/lib/pkcs11_write.c
index fe5f32ad0b..7b949530c5 100644
--- a/lib/pkcs11_write.c
+++ b/lib/pkcs11_write.c
@@ -18,12 +18,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
#include <stdio.h>
#include <string.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <datum.h>
#include <pkcs11_int.h>
#include "pkcs11x.h"
#include <x509/common.h>
diff --git a/lib/pkcs11x.c b/lib/pkcs11x.c
index 9faaf9d3ce..ddffa8ee23 100644
--- a/lib/pkcs11x.c
+++ b/lib/pkcs11x.c
@@ -19,10 +19,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <global.h>
+#include "errors.h"
#include "x509/common.h"
#include <pkcs11_int.h>
diff --git a/lib/prf.c b/lib/prf.c
index 5b95511dc4..a2cad25b7c 100644
--- a/lib/prf.c
+++ b/lib/prf.c
@@ -24,10 +24,10 @@
/* Functions for the TLS PRF handling.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
-#include <gnutls_state.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <num.h>
+#include <state.h>
#include <algorithms.h>
#define MAX_PRF_BYTES 200
diff --git a/lib/gnutls_priority.c b/lib/priority.c
index 652da6722e..ee158a5f13 100644
--- a/lib/gnutls_priority.c
+++ b/lib/priority.c
@@ -25,11 +25,11 @@
#include "gnutls_int.h"
#include "algorithms.h"
-#include "gnutls_errors.h"
-#include <gnutls_num.h>
+#include "errors.h"
+#include <num.h>
#include <gnutls/x509.h>
#include <c-ctype.h>
-#include <gnutls_extensions.h>
+#include <extensions.h>
#define MAX_ELEMENTS 64
diff --git a/lib/gnutls_privkey.c b/lib/privkey.c
index 3312cdf8b8..6394a9000e 100644
--- a/lib/gnutls_privkey.c
+++ b/lib/privkey.c
@@ -19,19 +19,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
#include <stdio.h>
#include <string.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <datum.h>
#include <pkcs11_int.h>
#include <gnutls/abstract.h>
-#include <gnutls_pk.h>
+#include <pk.h>
#include <x509_int.h>
#include <openpgp/openpgp_int.h>
-#include <openpgp/gnutls_openpgp.h>
-#include <gnutls_sig.h>
+#include <openpgp/openpgp.h>
+#include <tls-sig.h>
#include <algorithms.h>
#include <fips.h>
#include <system-keys.h>
diff --git a/lib/gnutls_privkey_raw.c b/lib/privkey_raw.c
index 10ea3e012c..47754831ee 100644
--- a/lib/gnutls_privkey_raw.c
+++ b/lib/privkey_raw.c
@@ -17,19 +17,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
#include <stdio.h>
#include <string.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <datum.h>
#include <pkcs11_int.h>
#include <gnutls/abstract.h>
-#include <gnutls_pk.h>
+#include <pk.h>
#include <x509_int.h>
#include <openpgp/openpgp_int.h>
-#include <openpgp/gnutls_openpgp.h>
-#include <gnutls_sig.h>
+#include <openpgp/openpgp.h>
+#include <tls-sig.h>
#include <algorithms.h>
#include <fips.h>
#include <abstract_int.h>
diff --git a/lib/gnutls_psk.c b/lib/psk.c
index aaa39de9ca..1295657023 100644
--- a/lib/gnutls_psk.c
+++ b/lib/psk.c
@@ -22,17 +22,17 @@
/* Functions for manipulating the PSK credentials. */
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <auth/psk.h>
-#include <gnutls_state.h>
+#include <state.h>
#ifdef ENABLE_PSK
#include <auth/psk_passwd.h>
-#include <gnutls_num.h>
-#include <gnutls_helper.h>
-#include <gnutls_datum.h>
+#include <num.h>
+#include <helper.h>
+#include <datum.h>
#include "debug.h"
/**
diff --git a/lib/gnutls_pubkey.c b/lib/pubkey.c
index e461c14150..c686444fbd 100644
--- a/lib/gnutls_pubkey.c
+++ b/lib/pubkey.c
@@ -18,25 +18,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <gnutls/pkcs11.h>
#include <stdio.h>
#include <string.h>
-#include <gnutls_errors.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <datum.h>
#include <pkcs11_int.h>
#include <gnutls/abstract.h>
-#include <gnutls_sig.h>
-#include <gnutls_pk.h>
+#include <tls-sig.h>
+#include <pk.h>
#include <x509_int.h>
#include <openpgp/openpgp_int.h>
-#include <gnutls_num.h>
+#include <num.h>
#include <x509/common.h>
#include <x509_b64.h>
#include <abstract_int.h>
#include <fips.h>
#include "urls.h"
-#include <gnutls_ecc.h>
+#include <ecc.h>
#define OPENPGP_KEY_PRIMARY 2
diff --git a/lib/random.c b/lib/random.c
index 89e8827069..d7f18f2ce7 100644
--- a/lib/random.c
+++ b/lib/random.c
@@ -23,8 +23,8 @@
/* This file handles all the internal functions that cope with random data.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <random.h>
#include <fips.h>
diff --git a/lib/gnutls_range.c b/lib/range.c
index 488312d9c4..a29c3bfee1 100644
--- a/lib/gnutls_range.c
+++ b/lib/range.c
@@ -21,10 +21,10 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
+#include "errors.h"
#include "algorithms.h"
-#include "gnutls_constate.h"
-#include "gnutls_record.h"
+#include "constate.h"
+#include "record.h"
static void
_gnutls_set_range(gnutls_range_st * dst, const size_t low,
diff --git a/lib/gnutls_record.c b/lib/record.c
index d83bf098c4..51683e67cd 100644
--- a/lib/gnutls_record.c
+++ b/lib/record.c
@@ -30,27 +30,27 @@
#define CIPHER_SLACK_SIZE 32
#include "gnutls_int.h"
-#include "gnutls_errors.h"
+#include "errors.h"
#include "debug.h"
-#include "gnutls_compress.h"
-#include "gnutls_cipher.h"
-#include "gnutls_buffers.h"
-#include "gnutls_mbuffers.h"
-#include "gnutls_handshake.h"
-#include "gnutls_hash_int.h"
-#include "gnutls_cipher_int.h"
+#include "compress.h"
+#include "cipher.h"
+#include "buffers.h"
+#include "mbuffers.h"
+#include "handshake.h"
+#include "hash_int.h"
+#include "cipher_int.h"
#include "algorithms.h"
-#include "gnutls_db.h"
-#include "gnutls_auth.h"
-#include "gnutls_num.h"
-#include "gnutls_record.h"
-#include "gnutls_datum.h"
-#include "gnutls_constate.h"
+#include "db.h"
+#include "auth.h"
+#include "num.h"
+#include "record.h"
+#include "datum.h"
+#include "constate.h"
#include "ext/max_record.h"
#include <ext/heartbeat.h>
-#include <gnutls_state.h>
-#include <gnutls_dtls.h>
-#include <gnutls_dh.h>
+#include <state.h>
+#include <dtls.h>
+#include <dh.h>
#include <random.h>
struct tls_record_st {
diff --git a/lib/gnutls_record.h b/lib/record.h
index cb0320c7a7..7da8d3086f 100644
--- a/lib/gnutls_record.h
+++ b/lib/record.h
@@ -24,8 +24,8 @@
#define GNUTLS_RECORD_H
#include <gnutls/gnutls.h>
-#include <gnutls_buffers.h>
-#include <gnutls_constate.h>
+#include <buffers.h>
+#include <constate.h>
ssize_t _gnutls_send_tlen_int(gnutls_session_t session,
content_type_t type,
diff --git a/lib/safe-memfuncs.c b/lib/safe-memfuncs.c
index 47d9ad1287..e5673e5737 100644
--- a/lib/safe-memfuncs.c
+++ b/lib/safe-memfuncs.c
@@ -21,7 +21,7 @@
#ifdef TEST_SAFE_MEMSET
# include <string.h>
#else
-# include <gnutls_int.h>
+# include "gnutls_int.h"
#endif
/**
diff --git a/lib/gnutls_session.c b/lib/session.c
index bd13d93030..256e8d8f68 100644
--- a/lib/gnutls_session.c
+++ b/lib/session.c
@@ -20,10 +20,10 @@
*
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
+#include "errors.h"
#include "debug.h"
-#include <gnutls_session_pack.h>
-#include <gnutls_datum.h>
+#include <session_pack.h>
+#include <datum.h>
/**
* gnutls_session_get_data:
diff --git a/lib/gnutls_session_pack.c b/lib/session_pack.c
index c4ed67bae2..19229b70d9 100644
--- a/lib/gnutls_session_pack.c
+++ b/lib/session_pack.c
@@ -24,25 +24,25 @@
* before and after they are sent to the database backend.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef ENABLE_SRP
-#include <auth/srp.h>
+#include <auth/srp_kx.h>
#endif
#ifdef ENABLE_PSK
#include <auth/psk.h>
#endif
#include <auth/anon.h>
#include <auth/cert.h>
-#include <gnutls_errors.h>
-#include <gnutls_auth.h>
-#include <gnutls_session_pack.h>
-#include <gnutls_datum.h>
-#include <gnutls_num.h>
-#include <gnutls_extensions.h>
-#include <gnutls_constate.h>
+#include "errors.h"
+#include <auth.h>
+#include <session_pack.h>
+#include <datum.h>
+#include <num.h>
+#include <extensions.h>
+#include <constate.h>
#include <algorithms.h>
-#include <gnutls_state.h>
-#include <gnutls_db.h>
+#include <state.h>
+#include <db.h>
static int pack_certificate_auth_info(gnutls_session_t,
gnutls_buffer_st * packed_session);
diff --git a/lib/gnutls_session_pack.h b/lib/session_pack.h
index efb6cda01b..efb6cda01b 100644
--- a/lib/gnutls_session_pack.h
+++ b/lib/session_pack.h
diff --git a/lib/gnutls_srp.c b/lib/srp.c
index b5d9170bf2..b993eae71e 100644
--- a/lib/gnutls_srp.c
+++ b/lib/srp.c
@@ -20,18 +20,18 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <auth/srp.h>
-#include <gnutls_state.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <auth/srp_kx.h>
+#include <state.h>
#ifdef ENABLE_SRP
-#include <gnutls_srp.h>
+#include "srp.h"
#include <auth/srp_passwd.h>
-#include <gnutls_mpi.h>
-#include <gnutls_num.h>
-#include <gnutls_helper.h>
+#include <mpi.h>
+#include <num.h>
+#include <helper.h>
#include <algorithms.h>
#include <random.h>
diff --git a/lib/gnutls_srp.h b/lib/srp.h
index b82cc577ef..3120f4b5b9 100644
--- a/lib/gnutls_srp.h
+++ b/lib/srp.h
@@ -20,6 +20,11 @@
*
*/
+#ifndef _SRP_H
+# define _SRP_H
+
+#include <config.h>
+
#ifdef ENABLE_SRP
bigint_t _gnutls_calc_srp_B(bigint_t * ret_b, bigint_t g, bigint_t n,
@@ -38,3 +43,5 @@ int _gnutls_srp_gn(uint8_t ** ret_g, uint8_t ** ret_n, int bits);
#define SRP_MAX_HASH_SIZE 24
#endif
+
+#endif
diff --git a/lib/gnutls_v2_compat.c b/lib/sslv2_compat.c
index 2d2b2d2a43..8a717d3835 100644
--- a/lib/gnutls_v2_compat.c
+++ b/lib/sslv2_compat.c
@@ -24,22 +24,22 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_dh.h"
+#include "errors.h"
+#include "dh.h"
#include "debug.h"
#include "algorithms.h"
-#include "gnutls_compress.h"
-#include "gnutls_cipher.h"
-#include "gnutls_buffers.h"
-#include "gnutls_kx.h"
-#include "gnutls_handshake.h"
-#include "gnutls_num.h"
-#include "gnutls_hash_int.h"
-#include "gnutls_db.h"
-#include "gnutls_extensions.h"
-#include "gnutls_auth.h"
-#include "gnutls_v2_compat.h"
-#include "gnutls_constate.h"
+#include "compress.h"
+#include "cipher.h"
+#include "buffers.h"
+#include "kx.h"
+#include "handshake.h"
+#include "num.h"
+#include "hash_int.h"
+#include "db.h"
+#include "extensions.h"
+#include "auth.h"
+#include "sslv2_compat.h"
+#include "constate.h"
/* This selects the best supported ciphersuite from the ones provided */
static int
diff --git a/lib/gnutls_v2_compat.h b/lib/sslv2_compat.h
index fffd17e5e7..fffd17e5e7 100644
--- a/lib/gnutls_v2_compat.h
+++ b/lib/sslv2_compat.h
diff --git a/lib/gnutls_state.c b/lib/state.c
index 940ea3f5ff..738706a4d3 100644
--- a/lib/gnutls_state.c
+++ b/lib/state.c
@@ -26,24 +26,24 @@
* state has been renamed to session.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_auth.h>
-#include <gnutls_num.h>
-#include <gnutls_datum.h>
-#include <gnutls_db.h>
-#include <gnutls_record.h>
-#include <gnutls_handshake.h>
-#include <gnutls_dh.h>
-#include <gnutls_buffers.h>
-#include <gnutls_mbuffers.h>
-#include <gnutls_state.h>
-#include <gnutls_constate.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <auth.h>
+#include <num.h>
+#include <datum.h>
+#include <db.h>
+#include <record.h>
+#include <handshake.h>
+#include <dh.h>
+#include <buffers.h>
+#include <mbuffers.h>
+#include <state.h>
+#include <constate.h>
#include <auth/cert.h>
#include <auth/anon.h>
#include <auth/psk.h>
#include <algorithms.h>
-#include <gnutls_extensions.h>
+#include <extensions.h>
#include <system.h>
#include <random.h>
#include <fips.h>
diff --git a/lib/gnutls_state.h b/lib/state.h
index da419a2d99..9e5fff848a 100644
--- a/lib/gnutls_state.h
+++ b/lib/state.h
@@ -23,7 +23,7 @@
#ifndef GNUTLS_STATE_H
#define GNUTLS_STATE_H
-#include <gnutls_int.h>
+#include "gnutls_int.h"
void _gnutls_session_cert_type_set(gnutls_session_t session,
gnutls_certificate_type_t);
@@ -50,7 +50,7 @@ _gnutls_hello_set_default_version(gnutls_session_t session,
unsigned char major,
unsigned char minor);
-#include <gnutls_auth.h>
+#include <auth.h>
#define CHECK_AUTH(auth, ret) if (gnutls_auth_get_type(session) != auth) { \
gnutls_assert(); \
diff --git a/lib/gnutls_str.c b/lib/str.c
index 469b6680f6..6b5f49ca89 100644
--- a/lib/gnutls_str.c
+++ b/lib/str.c
@@ -20,10 +20,10 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
-#include <gnutls_str.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <num.h>
+#include "str.h"
#include <stdarg.h>
#include <c-ctype.h>
#include <intprops.h>
diff --git a/lib/gnutls_str.h b/lib/str.h
index 016a538e32..c723e1457a 100644
--- a/lib/gnutls_str.h
+++ b/lib/str.h
@@ -24,8 +24,8 @@
#define GNUTLS_STR_H
#include <config.h>
-#include <gnutls_int.h>
-#include <gnutls_datum.h>
+#include "gnutls_int.h"
+#include <datum.h>
#ifdef HAVE_DCGETTEXT
# include "gettext.h"
@@ -67,7 +67,7 @@ int _gnutls_buffer_append_str(gnutls_buffer_st *, const char *str);
#define _gnutls_buffer_append_data gnutls_buffer_append_data
-#include <gnutls_num.h>
+#include <num.h>
void _gnutls_buffer_replace_data(gnutls_buffer_st * buf,
gnutls_datum_t * data);
diff --git a/lib/gnutls_str_array.h b/lib/str_array.h
index 57aa828ac6..ef68783905 100644
--- a/lib/gnutls_str_array.h
+++ b/lib/str_array.h
@@ -23,8 +23,8 @@
#ifndef GNUTLS_STR_ARRAY_H
#define GNUTLS_STR_ARRAY_H
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
/* Functionality to allow an array of strings. Strings
* are allowed to be added to the list and matched against it.
diff --git a/lib/gnutls_supplemental.c b/lib/supplemental.c
index 91dfeb1321..4e2df85abd 100644
--- a/lib/gnutls_supplemental.c
+++ b/lib/supplemental.c
@@ -45,9 +45,9 @@
#include "gnutls_int.h"
#include <gnutls/gnutls.h>
-#include "gnutls_supplemental.h"
-#include "gnutls_errors.h"
-#include "gnutls_num.h"
+#include "supplemental.h"
+#include "errors.h"
+#include "num.h"
typedef struct {
char *name;
diff --git a/lib/gnutls_supplemental.h b/lib/supplemental.h
index 63004f57ad..e9ffd55c26 100644
--- a/lib/gnutls_supplemental.h
+++ b/lib/supplemental.h
@@ -20,7 +20,7 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
int _gnutls_parse_supplemental(gnutls_session_t session,
const uint8_t * data, int data_size);
diff --git a/lib/system-keys-dummy.c b/lib/system-keys-dummy.c
index 369542f5ec..269af8038c 100644
--- a/lib/system-keys-dummy.c
+++ b/lib/system-keys-dummy.c
@@ -18,15 +18,15 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <gnutls/gnutls.h>
#include <gnutls/abstract.h>
#include <gnutls/pkcs12.h>
#include <gnutls/system-keys.h>
#include "system-keys.h"
-#include <gnutls_sig.h>
-#include <gnutls_pk.h>
+#include <tls-sig.h>
+#include <pk.h>
void gnutls_system_key_iter_deinit(gnutls_system_key_iter_t iter)
{
diff --git a/lib/system-keys-win.c b/lib/system-keys-win.c
index 170d13cd8a..e3f6b57c58 100644
--- a/lib/system-keys-win.c
+++ b/lib/system-keys-win.c
@@ -26,15 +26,15 @@
#endif
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <gnutls/gnutls.h>
#include <gnutls/abstract.h>
#include <gnutls/pkcs12.h>
#include <gnutls/system-keys.h>
#include "system-keys.h"
-#include <gnutls_sig.h>
-#include <gnutls_pk.h>
+#include <tls-sig.h>
+#include <pk.h>
#include <urls.h>
#if !defined(_WIN32)
diff --git a/lib/system.c b/lib/system.c
index f12dbfc2f3..d5ad679c73 100644
--- a/lib/system.c
+++ b/lib/system.c
@@ -22,8 +22,8 @@
#include <config.h>
#include <system.h>
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <sys/socket.h>
#include <errno.h>
diff --git a/lib/system.h b/lib/system.h
index 23d291d41d..dd77365a1c 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -23,7 +23,7 @@
#ifndef SYSTEM_H
#define SYSTEM_H
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <time.h>
#include <sys/time.h>
diff --git a/lib/system_override.c b/lib/system_override.c
index ec6747bfb2..79a4db0de4 100644
--- a/lib/system_override.c
+++ b/lib/system_override.c
@@ -24,14 +24,14 @@
* default berkeley sockets API per session.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
-#include <gnutls_record.h>
-#include <gnutls_buffers.h>
-#include <gnutls_mbuffers.h>
-#include <gnutls_state.h>
-#include <gnutls_dtls.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <num.h>
+#include <record.h>
+#include <buffers.h>
+#include <mbuffers.h>
+#include <state.h>
+#include <dtls.h>
#include <system.h>
#include <errno.h>
diff --git a/lib/gnutls_sig.c b/lib/tls-sig.c
index 215404b170..8706ac598b 100644
--- a/lib/gnutls_sig.c
+++ b/lib/tls-sig.c
@@ -20,22 +20,22 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <x509_b64.h>
#include <auth/cert.h>
#include <algorithms.h>
-#include <gnutls_datum.h>
-#include <gnutls_mpi.h>
-#include <gnutls_global.h>
-#include <gnutls_pk.h>
+#include <datum.h>
+#include <mpi.h>
+#include <global.h>
+#include <pk.h>
#include <debug.h>
-#include <gnutls_buffers.h>
-#include <gnutls_sig.h>
-#include <gnutls_kx.h>
+#include <buffers.h>
+#include <tls-sig.h>
+#include <kx.h>
#include <libtasn1.h>
#include <ext/signature.h>
-#include <gnutls_state.h>
+#include <state.h>
#include <x509/common.h>
#include <abstract_int.h>
diff --git a/lib/gnutls_sig.h b/lib/tls-sig.h
index 0bfdc4edec..0bfdc4edec 100644
--- a/lib/gnutls_sig.h
+++ b/lib/tls-sig.h
diff --git a/lib/tpm.c b/lib/tpm.c
index 272f96aa87..4ec9a95927 100644
--- a/lib/tpm.c
+++ b/lib/tpm.c
@@ -32,11 +32,11 @@
#include <gnutls/gnutls.h>
#include <gnutls/abstract.h>
#include <gnutls/tpm.h>
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#ifdef HAVE_TROUSERS
-#include <gnutls_errors.h>
+#include "errors.h"
#include <pkcs11_int.h>
#include <x509/common.h>
#include <x509_b64.h>
diff --git a/lib/gnutls_ui.c b/lib/ui.c
index f5e8530327..7aa9f06af7 100644
--- a/lib/gnutls_ui.c
+++ b/lib/ui.c
@@ -24,15 +24,15 @@
* API which did not fit elsewhere.
*/
-#include <gnutls_int.h>
-#include <auth/srp.h>
+#include "gnutls_int.h"
+#include <auth/srp_kx.h>
#include <auth/anon.h>
#include <auth/cert.h>
#include <auth/psk.h>
-#include <gnutls_errors.h>
-#include <gnutls_auth.h>
-#include <gnutls_state.h>
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <auth.h>
+#include <state.h>
+#include <datum.h>
#include <extras/randomart.h>
#include <read-file.h>
#include <algorithms.h>
diff --git a/lib/urls.c b/lib/urls.c
index 1092cb4c7f..77aac9a305 100644
--- a/lib/urls.c
+++ b/lib/urls.c
@@ -18,9 +18,9 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_str.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include "str.h"
#include "urls.h"
#include "system-keys.h"
diff --git a/lib/verify-tofu.c b/lib/verify-tofu.c
index fd775ed0c4..b81d255183 100644
--- a/lib/verify-tofu.c
+++ b/lib/verify-tofu.c
@@ -20,14 +20,14 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <libtasn1.h>
-#include <gnutls_global.h>
-#include <gnutls_num.h> /* MAX */
-#include <gnutls_sig.h>
-#include <gnutls_str.h>
-#include <gnutls_datum.h>
+#include <global.h>
+#include <num.h> /* MAX */
+#include <tls-sig.h>
+#include "str.h"
+#include <datum.h>
#include "x509_int.h"
#include <nettle/base64.h>
#include <common.h>
diff --git a/lib/gnutls_x509.c b/lib/x509.c
index ae41d7119b..59a856bba6 100644
--- a/lib/gnutls_x509.c
+++ b/lib/x509.c
@@ -20,28 +20,28 @@
*
*/
-#include <gnutls_int.h>
-#include "gnutls_auth.h"
-#include "gnutls_errors.h"
+#include "gnutls_int.h"
+#include "auth.h"
+#include "errors.h"
#include <auth/cert.h>
-#include "gnutls_dh.h"
-#include "gnutls_num.h"
-#include "gnutls_datum.h"
-#include <gnutls_pk.h>
+#include "dh.h"
+#include "num.h"
+#include "datum.h"
+#include <pk.h>
#include <algorithms.h>
-#include <gnutls_global.h>
-#include <gnutls_record.h>
-#include <gnutls_sig.h>
-#include <gnutls_state.h>
-#include <gnutls_pk.h>
-#include <gnutls_str.h>
+#include <global.h>
+#include <record.h>
+#include <tls-sig.h>
+#include <state.h>
+#include <pk.h>
+#include "str.h"
#include <debug.h>
#include <x509_b64.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <gnutls/ocsp.h>
#include "x509/common.h"
#include "x509/x509_int.h"
-#include <gnutls_str_array.h>
+#include <str_array.h>
#include <gnutls/x509.h>
#include "read-file.h"
#include "system-keys.h"
diff --git a/lib/gnutls_x509.h b/lib/x509.h
index bc11f7b93f..bc11f7b93f 100644
--- a/lib/gnutls_x509.h
+++ b/lib/x509.h
diff --git a/lib/x509/common.c b/lib/x509/common.c
index 8e8ee68fb5..eb0c411e54 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -20,14 +20,14 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <libtasn1.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
-#include <gnutls_str.h>
-#include <gnutls_x509.h>
-#include <gnutls_num.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
+#include <str.h>
+#include <x509.h>
+#include <num.h>
#include <x509_b64.h>
#include "x509_int.h"
#include "extras/hex.h"
diff --git a/lib/x509/crl.c b/lib/x509/crl.c
index ea9175e0fe..3b7ab83dcd 100644
--- a/lib/x509/crl.c
+++ b/lib/x509/crl.c
@@ -20,16 +20,16 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <libtasn1.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
#include <x509_b64.h>
#include <x509_int.h>
-#include <gnutls_x509.h>
+#include <x509.h>
static int crl_reinit(gnutls_x509_crl_t crl)
{
diff --git a/lib/x509/crl_write.c b/lib/x509/crl_write.c
index 7716ce3e4e..ce0beb5dbc 100644
--- a/lib/x509/crl_write.c
+++ b/lib/x509/crl_write.c
@@ -23,13 +23,13 @@
/* This file contains functions to handle CRL generation.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_b64.h>
#include <x509_int.h>
#include <libtasn1.h>
diff --git a/lib/x509/crq.c b/lib/x509/crq.c
index 81daee88fc..77eff5b848 100644
--- a/lib/x509/crq.c
+++ b/lib/x509/crq.c
@@ -25,13 +25,13 @@
requests, see RFC 2986.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_b64.h>
#include <gnutls/x509-ext.h>
#include "x509_int.h"
diff --git a/lib/x509/dn.c b/lib/x509/dn.c
index a3522e6a30..5e6242698c 100644
--- a/lib/x509/dn.c
+++ b/lib/x509/dn.c
@@ -20,14 +20,14 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <libtasn1.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
-#include <gnutls_str.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
+#include <str.h>
#include <common.h>
-#include <gnutls_num.h>
+#include <num.h>
/* This file includes all the required to parse an X.509 Distriguished
* Name (you need a parser just to read a name in the X.509 protocols!!!)
diff --git a/lib/x509/email-verify.c b/lib/x509/email-verify.c
index 4e9b0a1672..1b0da2e3df 100644
--- a/lib/x509/email-verify.c
+++ b/lib/x509/email-verify.c
@@ -19,11 +19,11 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_str.h>
+#include "gnutls_int.h"
+#include <str.h>
#include <x509_int.h>
#include <common.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <system.h>
#include <gnutls-idna.h>
diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c
index af90dec6c2..148766dc68 100644
--- a/lib/x509/extensions.c
+++ b/lib/x509/extensions.c
@@ -23,15 +23,15 @@
/* Functions that relate to the X.509 extension parsing.
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_global.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <global.h>
#include <libtasn1.h>
#include <common.h>
#include <gnutls/x509-ext.h>
#include <gnutls/x509.h>
#include <x509_int.h>
-#include <gnutls_datum.h>
+#include <datum.h>
int
_gnutls_get_extension(ASN1_TYPE asn, const char *root,
diff --git a/lib/x509/hostname-verify.c b/lib/x509/hostname-verify.c
index 62ad4fafa9..a086240e58 100644
--- a/lib/x509/hostname-verify.c
+++ b/lib/x509/hostname-verify.c
@@ -19,11 +19,11 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_str.h>
+#include "gnutls_int.h"
+#include <str.h>
#include <x509_int.h>
#include <common.h>
-#include <gnutls_errors.h>
+#include "errors.h"
#include <system.h>
#include <gnutls-idna.h>
diff --git a/lib/x509/key_decode.c b/lib/x509/key_decode.c
index a312910415..049e93a951 100644
--- a/lib/x509/key_decode.c
+++ b/lib/x509/key_decode.c
@@ -21,15 +21,15 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_global.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <global.h>
#include <libtasn1.h>
-#include <gnutls_datum.h>
+#include <datum.h>
#include "common.h"
#include "x509_int.h"
-#include <gnutls_num.h>
-#include <gnutls_ecc.h>
+#include <num.h>
+#include <ecc.h>
static int _gnutls_x509_read_rsa_pubkey(uint8_t * der, int dersize,
gnutls_pk_params_st * params);
diff --git a/lib/x509/key_encode.c b/lib/x509/key_encode.c
index cbad9c4621..7da4cbef2d 100644
--- a/lib/x509/key_encode.c
+++ b/lib/x509/key_encode.c
@@ -21,17 +21,17 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_global.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <global.h>
#include <libtasn1.h>
-#include <gnutls_datum.h>
+#include <datum.h>
#include "common.h"
#include "x509_int.h"
-#include <gnutls_num.h>
-#include <gnutls_pk.h>
-#include <gnutls_mpi.h>
-#include <gnutls_ecc.h>
+#include <num.h>
+#include <pk.h>
+#include <mpi.h>
+#include <ecc.h>
static int _gnutls_x509_write_rsa_pubkey(gnutls_pk_params_st * params,
gnutls_datum_t * der);
diff --git a/lib/x509/mpi.c b/lib/x509/mpi.c
index 536e599e8f..49059d2867 100644
--- a/lib/x509/mpi.c
+++ b/lib/x509/mpi.c
@@ -20,14 +20,14 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_global.h>
+#include "gnutls_int.h"
+#include "errors.h"
+#include <global.h>
#include <libtasn1.h>
-#include <gnutls_datum.h>
+#include <datum.h>
#include "common.h"
#include "x509_int.h"
-#include <gnutls_num.h>
+#include <num.h>
/* Reads an Integer from the DER encoded data
*/
diff --git a/lib/x509/name_constraints.c b/lib/x509/name_constraints.c
index 26b3fcf25a..ca57561347 100644
--- a/lib/x509/name_constraints.c
+++ b/lib/x509/name_constraints.c
@@ -21,12 +21,12 @@
/* Functions on X.509 Certificate parsing
*/
-#include <gnutls_int.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <gnutls/x509-ext.h>
#include <x509_b64.h>
#include <x509_int.h>
diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c
index 7686a4e8f3..8049e24e91 100644
--- a/lib/x509/ocsp.c
+++ b/lib/x509/ocsp.c
@@ -22,11 +22,11 @@
/* Online Certificate Status Protocol - RFC 2560
*/
-#include <gnutls_int.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <global.h>
+#include "errors.h"
#include <libtasn1.h>
-#include <gnutls_pk.h>
+#include <pk.h>
#include "common.h"
#include "verify-high.h"
diff --git a/lib/x509/ocsp_output.c b/lib/x509/ocsp_output.c
index 311c5aaf91..a4e7497744 100644
--- a/lib/x509/ocsp_output.c
+++ b/lib/x509/ocsp_output.c
@@ -22,12 +22,12 @@
/* Online Certificate Status Protocol - RFC 2560
*/
-#include <gnutls_int.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <global.h>
+#include "errors.h"
#include <libtasn1.h>
-#include <gnutls_pk.h>
-#include <gnutls_str.h>
+#include <pk.h>
+#include <str.h>
#include "algorithms.h"
#include <gnutls/ocsp.h>
diff --git a/lib/x509/output.c b/lib/x509/output.c
index 5cef68c77b..b4d6777c27 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -23,12 +23,12 @@
/* Functions for printing X.509 Certificate structures
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_int.h>
-#include <gnutls_num.h>
-#include <gnutls_errors.h>
+#include <num.h>
+#include "errors.h"
#include <extras/randomart.h>
#include <c-ctype.h>
#include <gnutls-idna.h>
diff --git a/lib/x509/pkcs12.c b/lib/x509/pkcs12.c
index 5e4fe11528..007823f9c5 100644
--- a/lib/x509/pkcs12.c
+++ b/lib/x509/pkcs12.c
@@ -24,13 +24,13 @@
/* Functions that relate on PKCS12 packet parsing.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <libtasn1.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
+#include <num.h>
#include <common.h>
#include <x509_b64.h>
#include "x509_int.h"
diff --git a/lib/x509/pkcs12_bag.c b/lib/x509/pkcs12_bag.c
index 2807b5dd9a..480e13b6d6 100644
--- a/lib/x509/pkcs12_bag.c
+++ b/lib/x509/pkcs12_bag.c
@@ -24,11 +24,11 @@
/* Functions that relate on PKCS12 Bag packet parsing.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
#include "x509_int.h"
diff --git a/lib/x509/pkcs12_encr.c b/lib/x509/pkcs12_encr.c
index adb84ba6a1..5c6de640db 100644
--- a/lib/x509/pkcs12_encr.c
+++ b/lib/x509/pkcs12_encr.c
@@ -19,10 +19,10 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_mpi.h>
-#include <gnutls_errors.h>
+#include <mpi.h>
+#include "errors.h"
#include <x509_int.h>
#include <c-ctype.h>
#include <algorithms.h>
diff --git a/lib/x509/pkcs7-attrs.c b/lib/x509/pkcs7-attrs.c
index 73593f683f..9bfbe2f329 100644
--- a/lib/x509/pkcs7-attrs.c
+++ b/lib/x509/pkcs7-attrs.c
@@ -23,11 +23,11 @@
/* Functions that relate on PKCS7 attribute setting.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
#include <x509_b64.h>
#include <gnutls/abstract.h>
diff --git a/lib/x509/pkcs7-output.c b/lib/x509/pkcs7-output.c
index 54427b3009..84986800d5 100644
--- a/lib/x509/pkcs7-output.c
+++ b/lib/x509/pkcs7-output.c
@@ -20,12 +20,12 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_int.h>
-#include <gnutls_num.h>
-#include <gnutls_errors.h>
+#include <num.h>
+#include "errors.h"
#include <extras/randomart.h>
#include <c-ctype.h>
#include <gnutls-idna.h>
diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c
index 1367b2507b..5d3910f98c 100644
--- a/lib/x509/pkcs7.c
+++ b/lib/x509/pkcs7.c
@@ -24,12 +24,12 @@
/* Functions that relate on PKCS7 certificate lists parsing.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
#include <libtasn1.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
#include <x509_b64.h>
#include <gnutls/abstract.h>
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index 2676bd8811..f97477cf9c 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -20,18 +20,18 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
-#include <gnutls_sig.h>
+#include "gnutls_int.h"
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
+#include <tls-sig.h>
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_b64.h>
#include <x509_int.h>
-#include <gnutls_pk.h>
-#include <gnutls_mpi.h>
-#include <gnutls_ecc.h>
+#include <pk.h>
+#include <mpi.h>
+#include <ecc.h>
#include <pin.h>
/**
diff --git a/lib/x509/privkey_openssl.c b/lib/x509/privkey_openssl.c
index c6feb00630..3b143f8457 100644
--- a/lib/x509/privkey_openssl.c
+++ b/lib/x509/privkey_openssl.c
@@ -20,17 +20,17 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_b64.h>
#include "x509_int.h"
#include <algorithms.h>
-#include <gnutls_num.h>
+#include <num.h>
#include <random.h>
static int
diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c
index ff8d598457..771043a40e 100644
--- a/lib/x509/privkey_pkcs8.c
+++ b/lib/x509/privkey_pkcs8.c
@@ -22,17 +22,17 @@
*
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_b64.h>
#include "x509_int.h"
#include <algorithms.h>
-#include <gnutls_num.h>
+#include <num.h>
#include <random.h>
#include <nettle/pbkdf2.h>
diff --git a/lib/x509/sign.c b/lib/x509/sign.c
index 3b9ceb6c19..9ed7fd94a9 100644
--- a/lib/x509/sign.c
+++ b/lib/x509/sign.c
@@ -24,15 +24,15 @@
* included here
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_errors.h>
+#include "errors.h"
#include <libtasn1.h>
-#include <gnutls_global.h>
-#include <gnutls_num.h> /* MAX */
-#include <gnutls_sig.h>
-#include <gnutls_str.h>
-#include <gnutls_datum.h>
+#include <global.h>
+#include <num.h> /* MAX */
+#include <tls-sig.h>
+#include <str.h>
+#include <datum.h>
#include <x509_int.h>
#include <common.h>
#include <gnutls/abstract.h>
diff --git a/lib/x509/verify-high.c b/lib/x509/verify-high.c
index ff5524e4e0..895f9b8858 100644
--- a/lib/x509/verify-high.c
+++ b/lib/x509/verify-high.c
@@ -21,14 +21,14 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <libtasn1.h>
-#include <gnutls_global.h>
-#include <gnutls_num.h> /* MAX */
-#include <gnutls_sig.h>
-#include <gnutls_str.h>
-#include <gnutls_datum.h>
+#include <global.h>
+#include <num.h> /* MAX */
+#include <tls-sig.h>
+#include <str.h>
+#include <datum.h>
#include <hash-pjw-bare.h>
#include "x509_int.h"
#include <common.h>
diff --git a/lib/x509/verify-high2.c b/lib/x509/verify-high2.c
index 558fa89e43..46a0db9f68 100644
--- a/lib/x509/verify-high2.c
+++ b/lib/x509/verify-high2.c
@@ -21,14 +21,14 @@
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <libtasn1.h>
-#include <gnutls_global.h>
-#include <gnutls_num.h>
-#include <gnutls_sig.h>
-#include <gnutls_str.h>
-#include <gnutls_datum.h>
+#include <global.h>
+#include <num.h>
+#include <tls-sig.h>
+#include <str.h>
+#include <datum.h>
#include "x509_int.h"
#include <common.h>
#include "verify-high.h"
diff --git a/lib/x509/verify.c b/lib/x509/verify.c
index 0d83a78d0b..27eba6ed46 100644
--- a/lib/x509/verify.c
+++ b/lib/x509/verify.c
@@ -26,17 +26,17 @@
* included here
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include "errors.h"
#include <libtasn1.h>
-#include <gnutls_global.h>
-#include <gnutls_num.h> /* MAX */
-#include <gnutls_sig.h>
-#include <gnutls_str.h>
-#include <gnutls_datum.h>
+#include <global.h>
+#include <num.h> /* MAX */
+#include <tls-sig.h>
+#include <str.h>
+#include <datum.h>
#include <x509_int.h>
#include <common.h>
-#include <gnutls_pk.h>
+#include <pk.h>
#include <stdbool.h>
/* Checks if two certs have the same name and the same key. Return 1 on match.
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index aac2b2630c..cfc8ee1649 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -22,17 +22,17 @@
/* Functions on X.509 Certificate parsing
*/
-#include <gnutls_int.h>
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include "gnutls_int.h"
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
#include <gnutls/x509-ext.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_b64.h>
#include <x509_int.h>
#include <libtasn1.h>
-#include <gnutls_pk.h>
+#include <pk.h>
#include <pkcs11_int.h>
#include "urls.h"
#include "system-keys.h"
diff --git a/lib/x509/x509_dn.c b/lib/x509/x509_dn.c
index b6fe3f61fe..371fbd0c90 100644
--- a/lib/x509/x509_dn.c
+++ b/lib/x509/x509_dn.c
@@ -21,13 +21,13 @@
/* This file contains functions to handle X.509 certificate generation.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_b64.h>
#include <c-ctype.h>
diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c
index b4230b21a2..9a0052733e 100644
--- a/lib/x509/x509_ext.c
+++ b/lib/x509/x509_ext.c
@@ -21,12 +21,12 @@
/* This file contains functions to handle X.509 certificate extensions (the x509-ext API)
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_datum.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include "errors.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <x509_b64.h>
#include <c-ctype.h>
#include <gnutls/x509-ext.h>
diff --git a/lib/x509/x509_write.c b/lib/x509/x509_write.c
index 5ddbc0869d..9ef092a35e 100644
--- a/lib/x509/x509_write.c
+++ b/lib/x509/x509_write.c
@@ -23,13 +23,13 @@
/* This file contains functions to handle X.509 certificate generation.
*/
-#include <gnutls_int.h>
+#include "gnutls_int.h"
-#include <gnutls_datum.h>
-#include <gnutls_global.h>
-#include <gnutls_errors.h>
+#include <datum.h>
+#include <global.h>
+#include "errors.h"
#include <common.h>
-#include <gnutls_x509.h>
+#include <x509.h>
#include <gnutls/x509-ext.h>
#include <x509_b64.h>
#include "x509_int.h"
diff --git a/lib/x509_b64.c b/lib/x509_b64.c
index 09e860c208..d9527b2bd9 100644
--- a/lib/x509_b64.c
+++ b/lib/x509_b64.c
@@ -24,8 +24,8 @@
*/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include <gnutls_datum.h>
+#include "errors.h"
+#include <datum.h>
#include <x509_b64.h>
#include <nettle/base64.h>
diff --git a/tests/gc.c b/tests/gc.c
index 106fb4222c..e58bd17a1e 100644
--- a/tests/gc.c
+++ b/tests/gc.c
@@ -29,7 +29,7 @@
#include "utils.h"
#include "../lib/gnutls_int.h"
-#include "../lib/gnutls_hash_int.h"
+#include "../lib/hash_int.h"
#include "../lib/debug.h"
static void tls_log_func(int level, const char *str)
diff --git a/tests/mpi.c b/tests/mpi.c
index f0cf9aba8a..604024622d 100644
--- a/tests/mpi.c
+++ b/tests/mpi.c
@@ -28,8 +28,8 @@
#include "utils.h"
#include "../lib/gnutls_int.h"
-#include "../lib/gnutls_mpi.h"
-#include "../lib/gnutls_errors.h"
+#include "../lib/mpi.h"
+#include "../lib/errors.h"
#include "../lib/debug.h"
static void tls_log_func(int level, const char *str)
diff --git a/tests/openpgp_test.c b/tests/openpgp_test.c
index 861efaa610..ee9522f2e9 100644
--- a/tests/openpgp_test.c
+++ b/tests/openpgp_test.c
@@ -1,15 +1,15 @@
/** t-openpgp.c -- OpenPGP regression test **/
#include "gnutls_int.h"
-#include "gnutls_errors.h"
-#include "gnutls_mpi.h"
-#include "gnutls_cert.h"
-#include "gnutls_datum.h"
-#include "gnutls_global.h"
-#include "auth_cert.h"
-#include "gnutls_openpgp.h"
-
-#include <gnutls_str.h>
+#include "errors.h"
+#include "mpi.h"
+#include "cert.h"
+#include "datum.h"
+#include "global.h"
+#include "auth/cert.h"
+#include "openpgp.h"
+
+#include <str.h>
#include <stdio.h>
#include <gcrypt.h>
#include <time.h>