summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/sha2
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/sha2')
-rw-r--r--src/libstrongswan/plugins/sha2/Makefile.in14
-rw-r--r--src/libstrongswan/plugins/sha2/sha2_hasher.c40
2 files changed, 38 insertions, 16 deletions
diff --git a/src/libstrongswan/plugins/sha2/Makefile.in b/src/libstrongswan/plugins/sha2/Makefile.in
index c99f30e43..adf7d10b4 100644
--- a/src/libstrongswan/plugins/sha2/Makefile.in
+++ b/src/libstrongswan/plugins/sha2/Makefile.in
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/config/libtool.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -82,7 +83,7 @@ libstrongswan_sha2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(libstrongswan_sha2_la_LDFLAGS) $(LDFLAGS) -o $@
@MONOLITHIC_FALSE@am_libstrongswan_sha2_la_rpath = -rpath $(plugindir)
@MONOLITHIC_TRUE@am_libstrongswan_sha2_la_rpath =
-DEFAULT_INCLUDES = -I.@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
@@ -108,6 +109,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BFDLIB = @BFDLIB@
BTLIB = @BTLIB@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -202,11 +204,14 @@ build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
c_plugins = @c_plugins@
+charon_natt_port = @charon_natt_port@
+charon_plugins = @charon_plugins@
+charon_udp_port = @charon_udp_port@
clearsilver_LIBS = @clearsilver_LIBS@
datadir = @datadir@
datarootdir = @datarootdir@
dbusservicedir = @dbusservicedir@
-default_pkcs11 = @default_pkcs11@
+dev_headers = @dev_headers@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
@@ -223,11 +228,12 @@ imcvdir = @imcvdir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
+ipsec_script = @ipsec_script@
+ipsec_script_upper = @ipsec_script_upper@
ipsecdir = @ipsecdir@
ipsecgroup = @ipsecgroup@
ipseclibdir = @ipseclibdir@
ipsecuser = @ipsecuser@
-libcharon_plugins = @libcharon_plugins@
libdir = @libdir@
libexecdir = @libexecdir@
linux_headers = @linux_headers@
@@ -243,6 +249,7 @@ mkdir_p = @mkdir_p@
nm_CFLAGS = @nm_CFLAGS@
nm_LIBS = @nm_LIBS@
nm_ca_dir = @nm_ca_dir@
+nm_plugins = @nm_plugins@
oldincludedir = @oldincludedir@
openac_plugins = @openac_plugins@
p_plugins = @p_plugins@
@@ -252,7 +259,6 @@ pdfdir = @pdfdir@
piddir = @piddir@
pki_plugins = @pki_plugins@
plugindir = @plugindir@
-pluto_plugins = @pluto_plugins@
pool_plugins = @pool_plugins@
prefix = @prefix@
program_transform_name = @program_transform_name@
diff --git a/src/libstrongswan/plugins/sha2/sha2_hasher.c b/src/libstrongswan/plugins/sha2/sha2_hasher.c
index 60fe4bd20..1c6dd2533 100644
--- a/src/libstrongswan/plugins/sha2/sha2_hasher.c
+++ b/src/libstrongswan/plugins/sha2/sha2_hasher.c
@@ -426,41 +426,49 @@ static void sha512_final(private_sha512_hasher_t *ctx)
} while(++j < 8);
}
-METHOD(hasher_t, reset224, void,
+METHOD(hasher_t, reset224, bool,
private_sha256_hasher_t *this)
{
memcpy(&this->sha_H[0], &sha224_hashInit[0], sizeof(this->sha_H));
this->sha_blocks = 0;
this->sha_bufCnt = 0;
+
+ return TRUE;
}
-METHOD(hasher_t, reset256, void,
+METHOD(hasher_t, reset256, bool,
private_sha256_hasher_t *this)
{
memcpy(&this->sha_H[0], &sha256_hashInit[0], sizeof(this->sha_H));
this->sha_blocks = 0;
this->sha_bufCnt = 0;
+
+ return TRUE;
}
-METHOD(hasher_t, reset384, void,
+METHOD(hasher_t, reset384, bool,
private_sha512_hasher_t *this)
{
memcpy(&this->sha_H[0], &sha384_hashInit[0], sizeof(this->sha_H));
this->sha_blocks = 0;
this->sha_blocksMSB = 0;
this->sha_bufCnt = 0;
+
+ return TRUE;
}
-METHOD(hasher_t, reset512, void,
+METHOD(hasher_t, reset512, bool,
private_sha512_hasher_t *this)
{
memcpy(&this->sha_H[0], &sha512_hashInit[0], sizeof(this->sha_H));
this->sha_blocks = 0;
this->sha_blocksMSB = 0;
this->sha_bufCnt = 0;
+
+ return TRUE;
}
-METHOD(hasher_t, get_hash224, void,
+METHOD(hasher_t, get_hash224, bool,
private_sha256_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
{
sha256_write(this, chunk.ptr, chunk.len);
@@ -470,9 +478,10 @@ METHOD(hasher_t, get_hash224, void,
memcpy(buffer, this->sha_out, HASH_SIZE_SHA224);
reset224(this);
}
+ return TRUE;
}
-METHOD(hasher_t, get_hash256, void,
+METHOD(hasher_t, get_hash256, bool,
private_sha256_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
{
sha256_write(this, chunk.ptr, chunk.len);
@@ -482,9 +491,10 @@ METHOD(hasher_t, get_hash256, void,
memcpy(buffer, this->sha_out, HASH_SIZE_SHA256);
reset256(this);
}
+ return TRUE;
}
-METHOD(hasher_t, get_hash384, void,
+METHOD(hasher_t, get_hash384, bool,
private_sha512_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
{
sha512_write(this, chunk.ptr, chunk.len);
@@ -494,9 +504,10 @@ METHOD(hasher_t, get_hash384, void,
memcpy(buffer, this->sha_out, HASH_SIZE_SHA384);
reset384(this);
}
+ return TRUE;
}
-METHOD(hasher_t, get_hash512, void,
+METHOD(hasher_t, get_hash512, bool,
private_sha512_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
{
sha512_write(this, chunk.ptr, chunk.len);
@@ -506,9 +517,10 @@ METHOD(hasher_t, get_hash512, void,
memcpy(buffer, this->sha_out, HASH_SIZE_SHA512);
reset512(this);
}
+ return TRUE;
}
-METHOD(hasher_t, allocate_hash224, void,
+METHOD(hasher_t, allocate_hash224, bool,
private_sha256_hasher_t *this, chunk_t chunk, chunk_t *hash)
{
chunk_t allocated_hash;
@@ -522,9 +534,10 @@ METHOD(hasher_t, allocate_hash224, void,
reset224(this);
*hash = allocated_hash;
}
+ return TRUE;
}
-METHOD(hasher_t, allocate_hash256, void,
+METHOD(hasher_t, allocate_hash256, bool,
private_sha256_hasher_t *this, chunk_t chunk, chunk_t *hash)
{
chunk_t allocated_hash;
@@ -538,9 +551,10 @@ METHOD(hasher_t, allocate_hash256, void,
reset256(this);
*hash = allocated_hash;
}
+ return TRUE;
}
-METHOD(hasher_t, allocate_hash384, void,
+METHOD(hasher_t, allocate_hash384, bool,
private_sha512_hasher_t *this, chunk_t chunk, chunk_t *hash)
{
chunk_t allocated_hash;
@@ -554,9 +568,10 @@ METHOD(hasher_t, allocate_hash384, void,
reset384(this);
*hash = allocated_hash;
}
+ return TRUE;
}
-METHOD(hasher_t, allocate_hash512, void,
+METHOD(hasher_t, allocate_hash512, bool,
private_sha512_hasher_t *this, chunk_t chunk, chunk_t *hash)
{
chunk_t allocated_hash;
@@ -570,6 +585,7 @@ METHOD(hasher_t, allocate_hash512, void,
reset512(this);
*hash = allocated_hash;
}
+ return TRUE;
}
METHOD(hasher_t, get_hash_size224, size_t,