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/libstrongswan/plugins/rc2 | |
parent | 518dd33c94e041db0444c7d1f33da363bb8e3faf (diff) | |
download | vyos-strongswan-bf372706c469764d59e9f29c39e3ecbebd72b8d2.tar.gz vyos-strongswan-bf372706c469764d59e9f29c39e3ecbebd72b8d2.zip |
Imported Upstream version 5.5.0
Diffstat (limited to 'src/libstrongswan/plugins/rc2')
-rw-r--r-- | src/libstrongswan/plugins/rc2/Makefile.in | 27 | ||||
-rw-r--r-- | src/libstrongswan/plugins/rc2/rc2_crypter.c | 20 |
2 files changed, 31 insertions, 16 deletions
diff --git a/src/libstrongswan/plugins/rc2/Makefile.in b/src/libstrongswan/plugins/rc2/Makefile.in index b9fc8bdf6..51f6a17a7 100644 --- a/src/libstrongswan/plugins/rc2/Makefile.in +++ b/src/libstrongswan/plugins/rc2/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 \ ?) ;; \ @@ -79,8 +89,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/libstrongswan/plugins/rc2 -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 \ @@ -94,6 +102,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 = @@ -200,12 +209,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@ @@ -255,6 +266,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@ @@ -289,6 +301,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@ @@ -400,6 +413,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@ @@ -456,7 +470,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libstrongswan/plugins/rc2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libstrongswan/plugins/rc2/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -770,6 +783,8 @@ uninstall-am: uninstall-pluginLTLIBRARIES mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-pluginLTLIBRARIES +.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/libstrongswan/plugins/rc2/rc2_crypter.c b/src/libstrongswan/plugins/rc2/rc2_crypter.c index 256acf817..d9681e834 100644 --- a/src/libstrongswan/plugins/rc2/rc2_crypter.c +++ b/src/libstrongswan/plugins/rc2/rc2_crypter.c @@ -19,11 +19,11 @@ typedef struct private_rc2_crypter_t private_rc2_crypter_t; #define RC2_BLOCK_SIZE 8 -#define ROL16(x, k) ({ u_int16_t _x = (x); (_x << (k)) | (_x >> (16 - (k))); }) -#define ROR16(x, k) ({ u_int16_t _x = (x); (_x >> (k)) | (_x << (16 - (k))); }) +#define ROL16(x, k) ({ uint16_t _x = (x); (_x << (k)) | (_x >> (16 - (k))); }) +#define ROR16(x, k) ({ uint16_t _x = (x); (_x >> (k)) | (_x << (16 - (k))); }) -#define GET16(x) ({ u_char *_x = (x); (u_int16_t)_x[0] | ((u_int16_t)_x[1] << 8); }) -#define PUT16(x, v) ({ u_char *_x = (x); u_int16_t _v = (v); _x[0] = _v, _x[1] = _v >> 8; }) +#define GET16(x) ({ u_char *_x = (x); (uint16_t)_x[0] | ((uint16_t)_x[1] << 8); }) +#define PUT16(x, v) ({ u_char *_x = (x); uint16_t _v = (v); _x[0] = _v, _x[1] = _v >> 8; }) /** * Private data of rc2_crypter_t @@ -38,7 +38,7 @@ struct private_rc2_crypter_t { /** * The expanded key in 16-bit words */ - u_int16_t K[64]; + uint16_t K[64]; /** * Key size in bytes @@ -95,7 +95,7 @@ static const u_char PITABLE[256] = */ static void encrypt_block(private_rc2_crypter_t *this, u_char R[]) { - register u_int16_t R0, R1, R2, R3, *Kj; + register uint16_t R0, R1, R2, R3, *Kj; int rounds = 3, mix = 5; R0 = GET16(R); @@ -139,7 +139,7 @@ static void encrypt_block(private_rc2_crypter_t *this, u_char R[]) */ static void decrypt_block(private_rc2_crypter_t *this, u_char R[]) { - register u_int16_t R0, R1, R2, R3, *Kj; + register uint16_t R0, R1, R2, R3, *Kj; int rounds = 3, mix = 5; R0 = GET16(R); @@ -185,7 +185,7 @@ static void decrypt_block(private_rc2_crypter_t *this, u_char R[]) METHOD(crypter_t, decrypt, bool, private_rc2_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *decrypted) { - u_int8_t *in, *out, *prev; + uint8_t *in, *out, *prev; if (data.len % RC2_BLOCK_SIZE || iv.len != RC2_BLOCK_SIZE) { @@ -222,7 +222,7 @@ METHOD(crypter_t, decrypt, bool, METHOD(crypter_t, encrypt, bool, private_rc2_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *encrypted) { - u_int8_t *in, *out, *end, *prev; + uint8_t *in, *out, *end, *prev; if (data.len % RC2_BLOCK_SIZE || iv.len != RC2_BLOCK_SIZE) { @@ -273,7 +273,7 @@ METHOD(crypter_t, get_key_size, size_t, METHOD(crypter_t, set_key, bool, private_rc2_crypter_t *this, chunk_t key) { - u_int8_t L[128], T8, TM, idx; + uint8_t L[128], T8, TM, idx; int i; if (key.len != this->T) |