diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2016-07-16 15:19:53 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2016-07-16 15:19:53 +0200 |
commit | bf372706c469764d59e9f29c39e3ecbebd72b8d2 (patch) | |
tree | 0f0e296e2d50e4a7faf99ae6fa428d2681e81ea1 /src/libpttls | |
parent | 518dd33c94e041db0444c7d1f33da363bb8e3faf (diff) | |
download | vyos-strongswan-bf372706c469764d59e9f29c39e3ecbebd72b8d2.tar.gz vyos-strongswan-bf372706c469764d59e9f29c39e3ecbebd72b8d2.zip |
Imported Upstream version 5.5.0
Diffstat (limited to 'src/libpttls')
-rw-r--r-- | src/libpttls/Makefile.in | 27 | ||||
-rw-r--r-- | src/libpttls/pt_tls.c | 11 | ||||
-rw-r--r-- | src/libpttls/pt_tls.h | 6 | ||||
-rw-r--r-- | src/libpttls/pt_tls_client.c | 16 | ||||
-rw-r--r-- | src/libpttls/pt_tls_server.c | 14 |
5 files changed, 45 insertions, 29 deletions
diff --git a/src/libpttls/Makefile.in b/src/libpttls/Makefile.in index c4eb8b4a9..a4d4b332b 100644 --- a/src/libpttls/Makefile.in +++ b/src/libpttls/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, @@ -15,7 +15,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 @@ build_triplet = @build@ host_triplet = @host@ @USE_WINDOWS_TRUE@am__append_1 = -lws2_32 subdir = src/libpttls -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 = @@ -201,12 +210,14 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +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@ @@ -256,6 +267,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@ @@ -290,6 +302,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@ @@ -401,6 +414,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@ @@ -465,7 +479,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libpttls/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libpttls/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -798,6 +811,8 @@ uninstall-am: uninstall-ipseclibLTLIBRARIES pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-ipseclibLTLIBRARIES +.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/libpttls/pt_tls.c b/src/libpttls/pt_tls.c index 3c1f874d7..01493f45c 100644 --- a/src/libpttls/pt_tls.c +++ b/src/libpttls/pt_tls.c @@ -17,6 +17,7 @@ #include <utils/debug.h> #include <pen/pen.h> + /** * Described in header. */ @@ -87,12 +88,12 @@ static bio_reader_t* read_tls(tls_socket_t *tls, size_t len) /** * Read a PT-TLS message, return header data */ -bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor, - u_int32_t *type, u_int32_t *identifier) +bio_reader_t* pt_tls_read(tls_socket_t *tls, uint32_t *vendor, + uint32_t *type, uint32_t *identifier) { bio_reader_t *reader; - u_int32_t len; - u_int8_t reserved; + uint32_t len; + uint8_t reserved; reader = read_tls(tls, PT_TLS_HEADER_LEN); if (!reader) @@ -135,7 +136,7 @@ bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor, * Prepend a PT-TLS header to a writer, send data, destroy writer */ bool pt_tls_write(tls_socket_t *tls, pt_tls_message_type_t type, - u_int32_t identifier, chunk_t data) + uint32_t identifier, chunk_t data) { bio_writer_t *writer; chunk_t out; diff --git a/src/libpttls/pt_tls.h b/src/libpttls/pt_tls.h index b2f3198a4..2cee8e10f 100644 --- a/src/libpttls/pt_tls.h +++ b/src/libpttls/pt_tls.h @@ -105,8 +105,8 @@ enum pt_tls_auth_t { * @param identifier receives Message Identifer * @return reader over message value, NULL on error */ -bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor, - u_int32_t *type, u_int32_t *identifier); +bio_reader_t* pt_tls_read(tls_socket_t *tls, uint32_t *vendor, + uint32_t *type, uint32_t *identifier); /** * Prepend a PT-TLS header to a writer, send data, destroy writer. @@ -118,7 +118,7 @@ bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor, * @return TRUE if data written successfully */ bool pt_tls_write(tls_socket_t *tls, pt_tls_message_type_t type, - u_int32_t identifier, chunk_t data); + uint32_t identifier, chunk_t data); /** * Dummy libpttls initialization function needed for integrity test diff --git a/src/libpttls/pt_tls_client.c b/src/libpttls/pt_tls_client.c index bd5b96f70..167918811 100644 --- a/src/libpttls/pt_tls_client.c +++ b/src/libpttls/pt_tls_client.c @@ -60,7 +60,7 @@ struct private_pt_tls_client_t { /** * Current PT-TLS message identifier */ - u_int32_t identifier; + uint32_t identifier; }; /** @@ -101,8 +101,8 @@ static bool negotiate_version(private_pt_tls_client_t *this) { bio_writer_t *writer; bio_reader_t *reader; - u_int32_t type, vendor, identifier, reserved; - u_int8_t version; + uint32_t type, vendor, identifier, reserved; + uint8_t version; bool res; DBG1(DBG_TNC, "sending offer for PT-TLS version %d", PT_TLS_VERSION); @@ -143,8 +143,8 @@ static bool negotiate_version(private_pt_tls_client_t *this) */ static status_t do_sasl(private_pt_tls_client_t *this, sasl_mechanism_t *sasl) { - u_int32_t type, vendor, identifier; - u_int8_t result; + uint32_t type, vendor, identifier; + uint8_t result; bio_reader_t *reader; bio_writer_t *writer; chunk_t data; @@ -277,8 +277,8 @@ static status_t select_and_do_sasl(private_pt_tls_client_t *this) { bio_reader_t *reader; sasl_mechanism_t *sasl = NULL; - u_int32_t type, vendor, identifier; - u_int8_t len; + uint32_t type, vendor, identifier; + uint8_t len; chunk_t chunk; char buf[21]; status_t status = NEED_MORE; @@ -364,7 +364,7 @@ static bool assess(private_pt_tls_client_t *this, tls_t *tnccs) size_t buflen = PT_TLS_MAX_MESSAGE_LEN; char buf[buflen]; bio_reader_t *reader; - u_int32_t vendor, type, identifier; + uint32_t vendor, type, identifier; chunk_t data; switch (tnccs->build(tnccs, buf, &buflen, &msglen)) diff --git a/src/libpttls/pt_tls_server.c b/src/libpttls/pt_tls_server.c index cedc2632c..a1c645319 100644 --- a/src/libpttls/pt_tls_server.c +++ b/src/libpttls/pt_tls_server.c @@ -55,7 +55,7 @@ struct private_pt_tls_server_t { /** * Message Identifier */ - u_int32_t identifier; + uint32_t identifier; /** * TNCCS protocol handler, implemented as tls_t @@ -71,8 +71,8 @@ static bool negotiate_version(private_pt_tls_server_t *this) { bio_reader_t *reader; bio_writer_t *writer; - u_int32_t vendor, type, identifier; - u_int8_t reserved, vmin, vmax, vpref; + uint32_t vendor, type, identifier; + uint8_t reserved, vmin, vmax, vpref; bool res; reader = pt_tls_read(this->tls, &vendor, &type, &identifier); @@ -161,7 +161,7 @@ static status_t process_sasl(private_pt_tls_server_t *this, static status_t read_sasl(private_pt_tls_server_t *this, sasl_mechanism_t *sasl) { - u_int32_t vendor, type, identifier; + uint32_t vendor, type, identifier; bio_reader_t *reader; status_t status; chunk_t data; @@ -260,11 +260,11 @@ static bool send_sasl_mechs(private_pt_tls_server_t *this) static status_t read_sasl_mech_selection(private_pt_tls_server_t *this, sasl_mechanism_t **out) { - u_int32_t vendor, type, identifier; + uint32_t vendor, type, identifier; sasl_mechanism_t *sasl; bio_reader_t *reader; chunk_t chunk; - u_int8_t len; + uint8_t len; char buf[21]; reader = pt_tls_read(this->tls, &vendor, &type, &identifier); @@ -406,7 +406,7 @@ static status_t assess(private_pt_tls_server_t *this, tls_t *tnccs) size_t buflen = PT_TLS_MAX_MESSAGE_LEN; char buf[buflen]; bio_reader_t *reader; - u_int32_t vendor, type, identifier; + uint32_t vendor, type, identifier; chunk_t data; status_t status; |