diff options
Diffstat (limited to 'src/libtls')
-rw-r--r-- | src/libtls/Makefile.in | 28 | ||||
-rw-r--r-- | src/libtls/tests/Makefile.in | 27 | ||||
-rw-r--r-- | src/libtls/tests/suites/test_socket.c | 4 | ||||
-rw-r--r-- | src/libtls/tls.c | 6 | ||||
-rw-r--r-- | src/libtls/tls_aead.c | 16 | ||||
-rw-r--r-- | src/libtls/tls_aead.h | 4 | ||||
-rw-r--r-- | src/libtls/tls_aead_expl.c | 16 | ||||
-rw-r--r-- | src/libtls/tls_aead_impl.c | 16 | ||||
-rw-r--r-- | src/libtls/tls_aead_null.c | 12 | ||||
-rw-r--r-- | src/libtls/tls_crypto.c | 6 | ||||
-rw-r--r-- | src/libtls/tls_fragmentation.c | 6 | ||||
-rw-r--r-- | src/libtls/tls_peer.c | 10 | ||||
-rw-r--r-- | src/libtls/tls_protection.c | 4 | ||||
-rw-r--r-- | src/libtls/tls_server.c | 8 |
14 files changed, 97 insertions, 66 deletions
diff --git a/src/libtls/Makefile.in b/src/libtls/Makefile.in index 8d16059f3..0bd5f741e 100644 --- a/src/libtls/Makefile.in +++ b/src/libtls/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,8 +91,6 @@ build_triplet = @build@ host_triplet = @host@ @USE_WINDOWS_TRUE@am__append_1 = -lws2_32 subdir = src/libtls -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(am__nobase_tls_include_HEADERS_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/config/libtool.m4 \ $(top_srcdir)/m4/config/ltoptions.m4 \ @@ -96,6 +104,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/config/libtool.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am \ + $(am__nobase_tls_include_HEADERS_DIST) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -227,6 +237,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -258,6 +269,7 @@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ATOMICLIB = @ATOMICLIB@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -307,6 +319,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -341,6 +354,7 @@ PTHREADLIB = @PTHREADLIB@ PYTHON = @PYTHON@ PYTHONEGGINSTALLDIR = @PYTHONEGGINSTALLDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PACKAGE_VERSION = @PYTHON_PACKAGE_VERSION@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ @@ -452,6 +466,7 @@ random_device = @random_device@ resolv_conf = @resolv_conf@ routing_table = @routing_table@ routing_table_prio = @routing_table_prio@ +runstatedir = @runstatedir@ s_plugins = @s_plugins@ sbindir = @sbindir@ scepclient_plugins = @scepclient_plugins@ @@ -518,7 +533,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libtls/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libtls/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -937,6 +951,8 @@ uninstall-am: uninstall-ipseclibLTLIBRARIES \ uninstall-ipseclibLTLIBRARIES \ uninstall-nobase_tls_includeHEADERS +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/libtls/tests/Makefile.in b/src/libtls/tests/Makefile.in index e57a95f4f..e00de3f47 100644 --- a/src/libtls/tests/Makefile.in +++ b/src/libtls/tests/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,8 +90,6 @@ host_triplet = @host@ TESTS = tls_tests$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_1) subdir = src/libtls/tests -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/config/libtool.m4 \ $(top_srcdir)/m4/config/ltoptions.m4 \ @@ -95,6 +103,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/config/libtool.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -197,12 +206,14 @@ am__tty_colors = { \ std='[m'; \ fi; \ } +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ATOMICLIB = @ATOMICLIB@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -252,6 +263,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -286,6 +298,7 @@ PTHREADLIB = @PTHREADLIB@ PYTHON = @PYTHON@ PYTHONEGGINSTALLDIR = @PYTHONEGGINSTALLDIR@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PACKAGE_VERSION = @PYTHON_PACKAGE_VERSION@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ @@ -397,6 +410,7 @@ random_device = @random_device@ resolv_conf = @resolv_conf@ routing_table = @routing_table@ routing_table_prio = @routing_table_prio@ +runstatedir = @runstatedir@ s_plugins = @s_plugins@ sbindir = @sbindir@ scepclient_plugins = @scepclient_plugins@ @@ -460,7 +474,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libtls/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libtls/tests/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -885,6 +898,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/libtls/tests/suites/test_socket.c b/src/libtls/tests/suites/test_socket.c index 42a4607b7..d105dd372 100644 --- a/src/libtls/tests/suites/test_socket.c +++ b/src/libtls/tests/suites/test_socket.c @@ -267,7 +267,7 @@ END_TEARDOWN */ typedef struct { tls_version_t version; - u_int16_t port; + uint16_t port; char *addr; chunk_t data; int fd; @@ -411,7 +411,7 @@ static void run_echo_client(echo_server_config_t *config) /** * Common test wrapper function for different test variants */ -static void test_tls(tls_version_t version, u_int16_t port, bool cauth, u_int i) +static void test_tls(tls_version_t version, uint16_t port, bool cauth, u_int i) { echo_server_config_t *config; tls_cipher_suite_t *suites; diff --git a/src/libtls/tls.c b/src/libtls/tls.c index 08a06f5ef..ea39f7fd1 100644 --- a/src/libtls/tls.c +++ b/src/libtls/tls.c @@ -83,9 +83,9 @@ ENUM_END(tls_extension_names, TLS_EXT_RENEGOTIATION_INFO); * TLS record */ typedef struct __attribute__((packed)) { - u_int8_t type; - u_int16_t version; - u_int16_t length; + uint8_t type; + uint16_t version; + uint16_t length; char data[]; } tls_record_t; diff --git a/src/libtls/tls_aead.c b/src/libtls/tls_aead.c index 67cfd3a75..f1daa6f45 100644 --- a/src/libtls/tls_aead.c +++ b/src/libtls/tls_aead.c @@ -44,18 +44,18 @@ struct private_tls_aead_t { * Associated header data to create signature over */ typedef struct __attribute__((__packed__)) { - u_int64_t seq; - u_int8_t type; - u_int16_t version; - u_int16_t length; + uint64_t seq; + uint8_t type; + uint16_t version; + uint16_t length; } sigheader_t; METHOD(tls_aead_t, encrypt, bool, private_tls_aead_t *this, tls_version_t version, tls_content_type_t type, - u_int64_t seq, chunk_t *data) + uint64_t seq, chunk_t *data) { chunk_t assoc, encrypted, iv, plain; - u_int8_t icvlen; + uint8_t icvlen; sigheader_t hdr; iv_gen_t *gen; @@ -92,10 +92,10 @@ METHOD(tls_aead_t, encrypt, bool, METHOD(tls_aead_t, decrypt, bool, private_tls_aead_t *this, tls_version_t version, tls_content_type_t type, - u_int64_t seq, chunk_t *data) + uint64_t seq, chunk_t *data) { chunk_t assoc, iv; - u_int8_t icvlen; + uint8_t icvlen; sigheader_t hdr; iv.len = this->aead->get_iv_size(this->aead); diff --git a/src/libtls/tls_aead.h b/src/libtls/tls_aead.h index 1d5ba92b5..8b5cda5a7 100644 --- a/src/libtls/tls_aead.h +++ b/src/libtls/tls_aead.h @@ -50,7 +50,7 @@ struct tls_aead_t { * @return TRUE if successfully encrypted */ bool (*encrypt)(tls_aead_t *this, tls_version_t version, - tls_content_type_t type, u_int64_t seq, chunk_t *data); + tls_content_type_t type, uint64_t seq, chunk_t *data); /** * Decrypt and verify a TLS record. @@ -65,7 +65,7 @@ struct tls_aead_t { * @return TRUE if successfully decrypted */ bool (*decrypt)(tls_aead_t *this, tls_version_t version, - tls_content_type_t type, u_int64_t seq, chunk_t *data); + tls_content_type_t type, uint64_t seq, chunk_t *data); /** * Get the authentication key size. diff --git a/src/libtls/tls_aead_expl.c b/src/libtls/tls_aead_expl.c index 80b0db38c..201c9bcf8 100644 --- a/src/libtls/tls_aead_expl.c +++ b/src/libtls/tls_aead_expl.c @@ -49,18 +49,18 @@ struct private_tls_aead_t { * Associated header data to create signature over */ typedef struct __attribute__((__packed__)) { - u_int64_t seq; - u_int8_t type; - u_int16_t version; - u_int16_t length; + uint64_t seq; + uint8_t type; + uint16_t version; + uint16_t length; } sigheader_t; METHOD(tls_aead_t, encrypt, bool, private_tls_aead_t *this, tls_version_t version, tls_content_type_t type, - u_int64_t seq, chunk_t *data) + uint64_t seq, chunk_t *data) { chunk_t assoc, mac, padding, iv; - u_int8_t bs, padlen; + uint8_t bs, padlen; sigheader_t hdr; hdr.type = type; @@ -100,10 +100,10 @@ METHOD(tls_aead_t, encrypt, bool, METHOD(tls_aead_t, decrypt, bool, private_tls_aead_t *this, tls_version_t version, tls_content_type_t type, - u_int64_t seq, chunk_t *data) + uint64_t seq, chunk_t *data) { chunk_t assoc, mac, iv; - u_int8_t bs, padlen; + uint8_t bs, padlen; sigheader_t hdr; size_t i; diff --git a/src/libtls/tls_aead_impl.c b/src/libtls/tls_aead_impl.c index d529ceba7..8f83cb456 100644 --- a/src/libtls/tls_aead_impl.c +++ b/src/libtls/tls_aead_impl.c @@ -47,18 +47,18 @@ struct private_tls_aead_t { * Associated header data to create signature over */ typedef struct __attribute__((__packed__)) { - u_int64_t seq; - u_int8_t type; - u_int16_t version; - u_int16_t length; + uint64_t seq; + uint8_t type; + uint16_t version; + uint16_t length; } sigheader_t; METHOD(tls_aead_t, encrypt, bool, private_tls_aead_t *this, tls_version_t version, - tls_content_type_t type, u_int64_t seq, chunk_t *data) + tls_content_type_t type, uint64_t seq, chunk_t *data) { chunk_t assoc, mac, padding; - u_int8_t bs, padlen; + uint8_t bs, padlen; sigheader_t hdr; hdr.type = type; @@ -95,10 +95,10 @@ METHOD(tls_aead_t, encrypt, bool, METHOD(tls_aead_t, decrypt, bool, private_tls_aead_t *this, tls_version_t version, - tls_content_type_t type, u_int64_t seq, chunk_t *data) + tls_content_type_t type, uint64_t seq, chunk_t *data) { chunk_t assoc, mac, iv; - u_int8_t bs, padlen; + uint8_t bs, padlen; sigheader_t hdr; size_t i; diff --git a/src/libtls/tls_aead_null.c b/src/libtls/tls_aead_null.c index 595b64000..cb4c10633 100644 --- a/src/libtls/tls_aead_null.c +++ b/src/libtls/tls_aead_null.c @@ -37,15 +37,15 @@ struct private_tls_aead_t { * Associated header data to create signature over */ typedef struct __attribute__((__packed__)) { - u_int64_t seq; - u_int8_t type; - u_int16_t version; - u_int16_t length; + uint64_t seq; + uint8_t type; + uint16_t version; + uint16_t length; } sigheader_t; METHOD(tls_aead_t, encrypt, bool, private_tls_aead_t *this, tls_version_t version, - tls_content_type_t type, u_int64_t seq, chunk_t *data) + tls_content_type_t type, uint64_t seq, chunk_t *data) { chunk_t assoc, mac; sigheader_t hdr; @@ -67,7 +67,7 @@ METHOD(tls_aead_t, encrypt, bool, METHOD(tls_aead_t, decrypt, bool, private_tls_aead_t *this, tls_version_t version, - tls_content_type_t type, u_int64_t seq, chunk_t *data) + tls_content_type_t type, uint64_t seq, chunk_t *data) { chunk_t assoc, mac; sigheader_t hdr; diff --git a/src/libtls/tls_crypto.c b/src/libtls/tls_crypto.c index 2cffeb820..6bbd95873 100644 --- a/src/libtls/tls_crypto.c +++ b/src/libtls/tls_crypto.c @@ -1340,7 +1340,7 @@ METHOD(tls_crypto_t, set_protection, void, METHOD(tls_crypto_t, append_handshake, void, private_tls_crypto_t *this, tls_handshake_type_t type, chunk_t data) { - u_int32_t header; + uint32_t header; /* reconstruct handshake header */ header = htonl(data.len | (type << 24)); @@ -1407,7 +1407,7 @@ METHOD(tls_crypto_t, sign, bool, { signature_scheme_t scheme; bio_reader_t *reader; - u_int8_t hash, alg; + uint8_t hash, alg; chunk_t sig; bool done = FALSE; @@ -1487,7 +1487,7 @@ METHOD(tls_crypto_t, verify, bool, if (this->tls->get_version(this->tls) >= TLS_1_2) { signature_scheme_t scheme = SIGN_UNKNOWN; - u_int8_t hash, alg; + uint8_t hash, alg; chunk_t sig; if (!reader->read_uint8(reader, &hash) || diff --git a/src/libtls/tls_fragmentation.c b/src/libtls/tls_fragmentation.c index a97ca1eaa..3607aa3cb 100644 --- a/src/libtls/tls_fragmentation.c +++ b/src/libtls/tls_fragmentation.c @@ -127,7 +127,7 @@ static bool send_close_notify(private_tls_fragmentation_t *this) static status_t process_alert(private_tls_fragmentation_t *this, bio_reader_t *reader) { - u_int8_t level, description; + uint8_t level, description; if (!reader->read_uint8(reader, &level) || !reader->read_uint8(reader, &description)) @@ -147,8 +147,8 @@ static status_t process_handshake(private_tls_fragmentation_t *this, while (reader->remaining(reader)) { bio_reader_t *msg; - u_int8_t type; - u_int32_t len; + uint8_t type; + uint32_t len; status_t status; chunk_t data; diff --git a/src/libtls/tls_peer.c b/src/libtls/tls_peer.c index 8087e2e2d..2ba6dd2a6 100644 --- a/src/libtls/tls_peer.c +++ b/src/libtls/tls_peer.c @@ -141,8 +141,8 @@ struct private_tls_peer_t { static status_t process_server_hello(private_tls_peer_t *this, bio_reader_t *reader) { - u_int8_t compression; - u_int16_t version, cipher; + uint8_t compression; + uint16_t version, cipher; chunk_t random, session, ext = chunk_empty; tls_cipher_suite_t suite = 0; @@ -434,8 +434,8 @@ static status_t process_ec_key_exchange(private_tls_peer_t *this, { diffie_hellman_group_t group; public_key_t *public; - u_int8_t type; - u_int16_t curve; + uint8_t type; + uint16_t curve; chunk_t pub, chunk; chunk = reader->peek(reader); @@ -833,7 +833,7 @@ static private_key_t *find_private_key(private_tls_peer_t *this) private_key_t *key = NULL; bio_reader_t *reader; key_type_t type; - u_int8_t cert; + uint8_t cert; if (!this->peer) { diff --git a/src/libtls/tls_protection.c b/src/libtls/tls_protection.c index e73fedc5d..cea3eca14 100644 --- a/src/libtls/tls_protection.c +++ b/src/libtls/tls_protection.c @@ -47,12 +47,12 @@ struct private_tls_protection_t { /** * Sequence number of incoming records */ - u_int64_t seq_in; + uint64_t seq_in; /** * Sequence number for outgoing records */ - u_int64_t seq_out; + uint64_t seq_out; /** * AEAD transform for inbound traffic diff --git a/src/libtls/tls_server.c b/src/libtls/tls_server.c index cfbe02037..422211afa 100644 --- a/src/libtls/tls_server.c +++ b/src/libtls/tls_server.c @@ -213,7 +213,7 @@ static bool select_suite_and_key(private_tls_server_t *this, static status_t process_client_hello(private_tls_server_t *this, bio_reader_t *reader) { - u_int16_t version, extension; + uint16_t version, extension; chunk_t random, session, ciphers, compression, ext = chunk_empty; bio_reader_t *extensions; tls_cipher_suite_t *suites; @@ -304,12 +304,12 @@ static status_t process_client_hello(private_tls_server_t *this, } else { - count = ciphers.len / sizeof(u_int16_t); + count = ciphers.len / sizeof(uint16_t); suites = alloca(count * sizeof(tls_cipher_suite_t)); DBG2(DBG_TLS, "received %d TLS cipher suites:", count); for (i = 0; i < count; i++) { - suites[i] = untoh16(&ciphers.ptr[i * sizeof(u_int16_t)]); + suites[i] = untoh16(&ciphers.ptr[i * sizeof(uint16_t)]); DBG2(DBG_TLS, " %N", tls_cipher_suite_names, suites[i]); } if (!select_suite_and_key(this, suites, count)) @@ -831,7 +831,7 @@ static tls_named_curve_t ec_group_to_curve(private_tls_server_t *this, bool peer_supports_curve(private_tls_server_t *this, tls_named_curve_t curve) { bio_reader_t *reader; - u_int16_t current; + uint16_t current; if (!this->curves_received) { /* none received, assume yes */ |