Skip to content

Commit e08fd86

Browse files
committed
Merge branch 'release/1.18.1'
2 parents 0676c9a + 60df7d3 commit e08fd86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1116
-1286
lines changed

changes

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
XXX, 2017
1+
January 22nd, 2018
2+
v1.18.1
3+
-- Fix wrong SHA3 blocksizes, thanks to Claus Fischer for reporting this via Mail (PR #329)
4+
-- Fix NULL-pointer dereference in `ccm_memory()` with LTC_CLEAN_STACK enabled (PR #327)
5+
-- Fix `ccm_process()` being unable to process input buffers longer than 256 bytes (PR #326)
6+
-- Fix the `register_all_{ciphers,hashes,prngs}()` return values (PR #316)
7+
-- Fix some typos, warnings and duplicate prototypes in code & doc (PR's #310 #320 #321 #335)
8+
-- Fix possible undefined behavior with LTC_PTHREAD (PR #337)
9+
-- Fix some DER bugs (PR #339)
10+
-- Fix CTR-mode when accelerator is used (OP-TEE/optee_os #2086)
11+
-- Fix installation procedure (Issue #340)
12+
13+
October 10th, 2017
214
v1.18.0
315
-- Bugfix multi2
416
-- Bugfix Noekeon

demos/constants.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
#include "tomcrypt.h"
1010

11-
#if _POSIX_C_SOURCE >= 200112L
11+
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
1212
#include <libgen.h>
1313
#else
1414
#define basename(x) x

demos/hashsum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include <tomcrypt.h>
2020

21-
#if _POSIX_C_SOURCE >= 200112L
21+
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
2222
#include <libgen.h>
2323
#else
2424
#define basename(x) x

demos/sizes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "tomcrypt.h"
1111

12-
#if _POSIX_C_SOURCE >= 200112L
12+
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
1313
#include <libgen.h>
1414
#else
1515
#define basename(x) x

doc/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = LibTomCrypt
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER=1.18.0
41+
PROJECT_NUMBER=1.18.1
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

doc/crypt.tex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,8 +2281,8 @@ \subsection{One--Shot Packet}
22812281
int direction);
22822282
\end{verbatim}
22832283
This will initialize the ChaCha20--Poly1305 state with the given key, IV and AAD value then proceed to
2284-
encrypt (\textit{direction} equals \textbf{CHCHA20POLY1305\_ENCRYPT}) or decrypt (\textit{direction} equals
2285-
\textbf{CHCHA20POLY1305\_DECRYPT}) the message text and store the final message tag. The definition of the
2284+
encrypt (\textit{direction} equals \textbf{CHACHA20POLY1305\_ENCRYPT}) or decrypt (\textit{direction} equals
2285+
\textbf{CHACHA20POLY1305\_DECRYPT}) the message text and store the final message tag. The definition of the
22862286
variables is the same as it is for all the manual functions.
22872287

22882288
\chapter{One-Way Cryptographic Hash Functions}
@@ -5407,7 +5407,7 @@ \chapter{Standards Support}
54075407
\index{ltc\_asn1\_list structure}
54085408
\begin{verbatim}
54095409
typedef struct {
5410-
int type;
5410+
ltc_asn1_type type;
54115411
void *data;
54125412
unsigned long size;
54135413
int used;
@@ -5479,6 +5479,7 @@ \chapter{Standards Support}
54795479
\hline
54805480
\end{tabular}
54815481
\caption{List of ASN.1 Supported Types}
5482+
\index{ltc\_asn1\_type}
54825483
\end{small}
54835484
\end{center}
54845485
\end{figure}

helper.pl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,14 @@ sub check_source {
5555
push @{$troubles->{unwanted_strcmp}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bstrcmp\s*\(/;
5656
push @{$troubles->{unwanted_clock}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bclock\s*\(/;
5757
push @{$troubles->{unwanted_qsort}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bqsort\s*\(/;
58+
push @{$troubles->{sizeof_no_brackets}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bsizeof\s*[^\(]/;
5859
if ($file =~ m|src/.*\.c$| &&
5960
$file !~ m|src/ciphers/.*\.c$| &&
6061
$file !~ m|src/hashes/.*\.c$| &&
6162
$file !~ m|src/math/.+_desc.c$| &&
6263
$file !~ m|src/stream/sober128/sober128_stream.c$| &&
63-
$l =~ /^static\s+\S+\s+([^_][a-zA-Z0-9_]+)\s*\(/) {
64-
push @{$troubles->{staticfunc_name}}, "$lineno($1)";
64+
$l =~ /^static(\s+[a-zA-Z0-9_]+)+\s+([^_][a-zA-Z0-9_]+)\s*\(/) {
65+
push @{$troubles->{staticfunc_name}}, "$lineno($2)";
6566
}
6667
$lineno++;
6768
}
@@ -277,7 +278,7 @@ sub patch_file {
277278
sub version_from_tomcrypt_h {
278279
my $h = read_file(shift);
279280
if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)\.([0-9]+)(.*)"/s) {
280-
return "VERSION_PC=$1.$2.$3", "VERSION_LT=1:0", "VERSION=$1.$2.$3$4", "PROJECT_NUMBER=$1.$2.$3$4";
281+
return "VERSION_PC=$1.$2.$3", "VERSION_LT=1:1", "VERSION=$1.$2.$3$4", "PROJECT_NUMBER=$1.$2.$3$4";
281282
}
282283
else {
283284
die "#define SCRYPT not found in tomcrypt.h";

makefile.mingw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ EXTRALIBS = -L../libtommath -ltommath
2727
#Compilation flags
2828
LTC_CFLAGS = -Isrc/headers -Itests -DLTC_SOURCE $(CFLAGS)
2929
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
30-
VERSION=1.18.0
30+
VERSION=1.18.1
3131

3232
#Libraries to be created
3333
LIBMAIN_S =libtomcrypt.a

makefile.msvc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ EXTRALIBS = ../libtommath/tommath.lib
2222
#Compilation flags
2323
LTC_CFLAGS = /nologo /Isrc/headers/ /Itests/ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /DLTC_SOURCE /W3 $(CFLAGS)
2424
LTC_LDFLAGS = advapi32.lib $(EXTRALIBS)
25-
VERSION=1.18.0
25+
VERSION=1.18.1
2626

2727
#Libraries to be created (this makefile builds only static libraries)
2828
LIBMAIN_S =tomcrypt.lib

makefile.shared

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ $(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
6464

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

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

makefile.unix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ EXTRALIBS = ../libtommath/libtommath.a
3939
#Compilation flags
4040
LTC_CFLAGS = -Isrc/headers -Itests -DLTC_SOURCE $(CFLAGS)
4141
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
42-
VERSION=1.18.0
42+
VERSION=1.18.1
4343

4444
#Libraries to be created (this makefile builds only static libraries)
4545
LIBMAIN_S =libtomcrypt.a

makefile_include.mk

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# (GNU make only)
44

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

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

396396
.common_install: $(LIBNAME)
397-
install -d $(DESTDIR)$(INCPATH)
398-
install -d $(DESTDIR)$(LIBPATH)
399-
$(INSTALL_CMD) $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
400-
install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
397+
install -p -d $(DESTDIR)$(INCPATH)
398+
install -p -d $(DESTDIR)$(LIBPATH)
399+
$(INSTALL_CMD) -p $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
400+
install -p -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
401401

402402
$(DESTDIR)$(BINPATH):
403-
install -d $(DESTDIR)$(BINPATH)
403+
install -p -d $(DESTDIR)$(BINPATH)
404404

405405
.common_install_bins: $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH)
406-
$(INSTALL_CMD) -m 775 $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH)
406+
$(INSTALL_CMD) -p -m 775 $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH)
407407

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

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

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

0 commit comments

Comments
 (0)