Skip to content

Commit

Permalink
Merge branch 'release/1.18.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaeckel committed Jan 22, 2018
2 parents 0676c9a + 60df7d3 commit e08fd86
Show file tree
Hide file tree
Showing 42 changed files with 1,116 additions and 1,286 deletions.
14 changes: 13 additions & 1 deletion changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
XXX, 2017
January 22nd, 2018
v1.18.1
-- Fix wrong SHA3 blocksizes, thanks to Claus Fischer for reporting this via Mail (PR #329)
-- Fix NULL-pointer dereference in `ccm_memory()` with LTC_CLEAN_STACK enabled (PR #327)
-- Fix `ccm_process()` being unable to process input buffers longer than 256 bytes (PR #326)
-- Fix the `register_all_{ciphers,hashes,prngs}()` return values (PR #316)
-- Fix some typos, warnings and duplicate prototypes in code & doc (PR's #310 #320 #321 #335)
-- Fix possible undefined behavior with LTC_PTHREAD (PR #337)
-- Fix some DER bugs (PR #339)
-- Fix CTR-mode when accelerator is used (OP-TEE/optee_os #2086)
-- Fix installation procedure (Issue #340)

October 10th, 2017
v1.18.0
-- Bugfix multi2
-- Bugfix Noekeon
Expand Down
2 changes: 1 addition & 1 deletion demos/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
#include "tomcrypt.h"

#if _POSIX_C_SOURCE >= 200112L
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
#include <libgen.h>
#else
#define basename(x) x
Expand Down
2 changes: 1 addition & 1 deletion demos/hashsum.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <tomcrypt.h>

#if _POSIX_C_SOURCE >= 200112L
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
#include <libgen.h>
#else
#define basename(x) x
Expand Down
2 changes: 1 addition & 1 deletion demos/sizes.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "tomcrypt.h"

#if _POSIX_C_SOURCE >= 200112L
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
#include <libgen.h>
#else
#define basename(x) x
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = LibTomCrypt
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER=1.18.0
PROJECT_NUMBER=1.18.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
7 changes: 4 additions & 3 deletions doc/crypt.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2281,8 +2281,8 @@ \subsection{One--Shot Packet}
int direction);
\end{verbatim}
This will initialize the ChaCha20--Poly1305 state with the given key, IV and AAD value then proceed to
encrypt (\textit{direction} equals \textbf{CHCHA20POLY1305\_ENCRYPT}) or decrypt (\textit{direction} equals
\textbf{CHCHA20POLY1305\_DECRYPT}) the message text and store the final message tag. The definition of the
encrypt (\textit{direction} equals \textbf{CHACHA20POLY1305\_ENCRYPT}) or decrypt (\textit{direction} equals
\textbf{CHACHA20POLY1305\_DECRYPT}) the message text and store the final message tag. The definition of the
variables is the same as it is for all the manual functions.

\chapter{One-Way Cryptographic Hash Functions}
Expand Down Expand Up @@ -5407,7 +5407,7 @@ \chapter{Standards Support}
\index{ltc\_asn1\_list structure}
\begin{verbatim}
typedef struct {
int type;
ltc_asn1_type type;
void *data;
unsigned long size;
int used;
Expand Down Expand Up @@ -5479,6 +5479,7 @@ \chapter{Standards Support}
\hline
\end{tabular}
\caption{List of ASN.1 Supported Types}
\index{ltc\_asn1\_type}
\end{small}
\end{center}
\end{figure}
Expand Down
7 changes: 4 additions & 3 deletions helper.pl
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ sub check_source {
push @{$troubles->{unwanted_strcmp}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bstrcmp\s*\(/;
push @{$troubles->{unwanted_clock}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bclock\s*\(/;
push @{$troubles->{unwanted_qsort}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bqsort\s*\(/;
push @{$troubles->{sizeof_no_brackets}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bsizeof\s*[^\(]/;
if ($file =~ m|src/.*\.c$| &&
$file !~ m|src/ciphers/.*\.c$| &&
$file !~ m|src/hashes/.*\.c$| &&
$file !~ m|src/math/.+_desc.c$| &&
$file !~ m|src/stream/sober128/sober128_stream.c$| &&
$l =~ /^static\s+\S+\s+([^_][a-zA-Z0-9_]+)\s*\(/) {
push @{$troubles->{staticfunc_name}}, "$lineno($1)";
$l =~ /^static(\s+[a-zA-Z0-9_]+)+\s+([^_][a-zA-Z0-9_]+)\s*\(/) {
push @{$troubles->{staticfunc_name}}, "$lineno($2)";
}
$lineno++;
}
Expand Down Expand Up @@ -277,7 +278,7 @@ sub patch_file {
sub version_from_tomcrypt_h {
my $h = read_file(shift);
if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)\.([0-9]+)(.*)"/s) {
return "VERSION_PC=$1.$2.$3", "VERSION_LT=1:0", "VERSION=$1.$2.$3$4", "PROJECT_NUMBER=$1.$2.$3$4";
return "VERSION_PC=$1.$2.$3", "VERSION_LT=1:1", "VERSION=$1.$2.$3$4", "PROJECT_NUMBER=$1.$2.$3$4";
}
else {
die "#define SCRYPT not found in tomcrypt.h";
Expand Down
2 changes: 1 addition & 1 deletion makefile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ EXTRALIBS = -L../libtommath -ltommath
#Compilation flags
LTC_CFLAGS = -Isrc/headers -Itests -DLTC_SOURCE $(CFLAGS)
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
VERSION=1.18.0
VERSION=1.18.1

#Libraries to be created
LIBMAIN_S =libtomcrypt.a
Expand Down
2 changes: 1 addition & 1 deletion makefile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ EXTRALIBS = ../libtommath/tommath.lib
#Compilation flags
LTC_CFLAGS = /nologo /Isrc/headers/ /Itests/ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /DLTC_SOURCE /W3 $(CFLAGS)
LTC_LDFLAGS = advapi32.lib $(EXTRALIBS)
VERSION=1.18.0
VERSION=1.18.1

#Libraries to be created (this makefile builds only static libraries)
LIBMAIN_S =tomcrypt.lib
Expand Down
4 changes: 2 additions & 2 deletions makefile.shared
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ $(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))

install: $(call print-help,install,Installs the library + headers + pkg-config file) .common_install
sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtomcrypt.pc.in > libtomcrypt.pc
install -d $(DESTDIR)$(LIBPATH)/pkgconfig
install -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
install -p -d $(DESTDIR)$(LIBPATH)/pkgconfig
install -p -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/

install_bins: $(call print-help,install_bins,Installs the useful demos ($(USEFUL_DEMOS))) .common_install_bins

Expand Down
2 changes: 1 addition & 1 deletion makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ EXTRALIBS = ../libtommath/libtommath.a
#Compilation flags
LTC_CFLAGS = -Isrc/headers -Itests -DLTC_SOURCE $(CFLAGS)
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
VERSION=1.18.0
VERSION=1.18.1

#Libraries to be created (this makefile builds only static libraries)
LIBMAIN_S =libtomcrypt.a
Expand Down
26 changes: 14 additions & 12 deletions makefile_include.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# (GNU make only)

# The version - BEWARE: VERSION, VERSION_PC and VERSION_LT are updated via ./updatemakes.sh
VERSION=1.18.0
VERSION_PC=1.18.0
VERSION=1.18.1
VERSION_PC=1.18.1
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
VERSION_LT=1:0
VERSION_LT=1:1

# Compiler and Linker Names
ifndef CROSS_COMPILE
Expand Down Expand Up @@ -394,23 +394,23 @@ install_all: $(call print-help,install_all,Install everything - library bins doc
INSTALL_OPTS ?= -m 644

.common_install: $(LIBNAME)
install -d $(DESTDIR)$(INCPATH)
install -d $(DESTDIR)$(LIBPATH)
$(INSTALL_CMD) $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
install -p -d $(DESTDIR)$(INCPATH)
install -p -d $(DESTDIR)$(LIBPATH)
$(INSTALL_CMD) -p $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
install -p -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)

$(DESTDIR)$(BINPATH):
install -d $(DESTDIR)$(BINPATH)
install -p -d $(DESTDIR)$(BINPATH)

.common_install_bins: $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH)
$(INSTALL_CMD) -m 775 $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH)
$(INSTALL_CMD) -p -m 775 $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH)

install_docs: $(call print-help,install_docs,Installs the Developer Manual) doc/crypt.pdf
install -d $(DESTDIR)$(DATAPATH)
install -m 644 doc/crypt.pdf $(DESTDIR)$(DATAPATH)
install -p -d $(DESTDIR)$(DATAPATH)
install -p -m 644 doc/crypt.pdf $(DESTDIR)$(DATAPATH)

install_test: $(call print-help,install_test,Installs the self-test binary) test $(DESTDIR)$(BINPATH)
$(INSTALL_CMD) -m 775 $< $(DESTDIR)$(BINPATH)
$(INSTALL_CMD) -p -m 775 $< $(DESTDIR)$(BINPATH)

install_hooks: $(call print-help,install_hooks,Installs the git hooks)
for s in `ls hooks/`; do ln -s ../../hooks/$$s .git/hooks/$$s; done
Expand Down Expand Up @@ -454,6 +454,8 @@ zipup: $(call print-help,zipup,Prepare the archives for a release) doc/crypt.pdf
rm -rf libtomcrypt-$(VERSION) crypt-$(VERSION).*
@# files/dirs excluded from "git archive" are defined in .gitattributes
git archive --format=tar --prefix=libtomcrypt-$(VERSION)/ HEAD | tar x
@echo 'fixme check'
-@(find libtomcrypt-$(VERSION)/ -type f | xargs grep 'FIXM[E]') && echo '############## BEWARE: the "fixme" marker was found !!! ##############' || true
mkdir -p libtomcrypt-$(VERSION)/doc
cp doc/crypt.pdf libtomcrypt-$(VERSION)/doc/crypt.pdf
tar -c libtomcrypt-$(VERSION)/ | xz -6e -c - > crypt-$(VERSION).tar.xz
Expand Down
Loading

0 comments on commit e08fd86

Please sign in to comment.