Skip to content
This repository was archived by the owner on Aug 24, 2025. It is now read-only.

Commit d7435a9

Browse files
committed
Merge commit 'b2758a2292aceda93e9f44c219b94fe21bb9a650'
2 parents c50dea9 + b2758a2 commit d7435a9

File tree

305 files changed

+8296
-1842
lines changed

Some content is hidden

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

305 files changed

+8296
-1842
lines changed

.gitignore

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Makefile
2727

2828
# Auto generated headers
2929
/crypto/buildinf.h
30+
/apps/progs.h
3031
/crypto/include/internal/*_conf.h
3132
/openssl/include/opensslconf.h
3233
/util/domd
@@ -52,12 +53,7 @@ Makefile
5253
/test/v3ext
5354

5455
# Certain files that get created by tests on the fly
55-
/test/*.ss
56-
/test/*.srl
57-
/test/.rnd
58-
/test/test*.pem
59-
/test/newkey.pem
60-
/test/*.log
56+
/test/test-runs
6157
/test/buildtest_*
6258

6359
# Fuzz stuff.

.travis-apt-pin.preferences

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Package: clang-3.9
2+
Pin: release o=Ubuntu
3+
Pin-Priority: -1
4+
5+
Package: libclang-common-3.9-dev
6+
Pin: release o=Ubuntu
7+
Pin-Priority: -1
8+
9+
Package: libclang1-3.9
10+
Pin: release o=Ubuntu
11+
Pin-Priority: -1
12+
13+
Package: libllvm3.9v4
14+
Pin: release o=Ubuntu
15+
Pin-Priority: -1

.travis.yml

Lines changed: 37 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -28,70 +28,29 @@ env:
2828
- CONFIG_OPTS="no-engine no-shared --strict-warnings" BUILDONLY="yes"
2929
- CONFIG_OPTS="no-stdio --strict-warnings" BUILDONLY="yes"
3030
- CONFIG_OPTS="no-ec" BUILDONLY="yes"
31+
- CONFIG_OPTS="no-asm --strict-warnings" BUILDONLY="yes" CHECKDOCS="yes"
3132

3233
matrix:
3334
include:
3435
- os: linux
35-
addons:
36-
apt:
37-
packages:
38-
- clang-3.9
39-
sources:
40-
- llvm-toolchain-trusty-3.9
41-
- ubuntu-toolchain-r-test
4236
compiler: clang-3.9
4337
env: CONFIG_OPTS="--strict-warnings no-deprecated" BUILDONLY="yes"
4438
- os: linux
4539
compiler: gcc
4640
env: CONFIG_OPTS="--debug --coverage no-asm enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers" COVERALLS="yes"
4741
- os: linux
48-
addons:
49-
apt:
50-
packages:
51-
- clang-3.9
52-
sources:
53-
- llvm-toolchain-trusty-3.9
54-
- ubuntu-toolchain-r-test
5542
compiler: clang-3.9
5643
env: CONFIG_OPTS="enable-asan"
5744
- os: linux
58-
addons:
59-
apt:
60-
packages:
61-
- clang-3.9
62-
sources:
63-
- llvm-toolchain-trusty-3.9
64-
- ubuntu-toolchain-r-test
6545
compiler: clang-3.9
6646
env: CONFIG_OPTS="enable-msan"
6747
- os: linux
68-
addons:
69-
apt:
70-
packages:
71-
- clang-3.9
72-
sources:
73-
- llvm-toolchain-trusty-3.9
74-
- ubuntu-toolchain-r-test
7548
compiler: clang-3.9
7649
env: CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method -fno-sanitize=alignment"
7750
- os: linux
78-
addons:
79-
apt:
80-
packages:
81-
- clang-3.9
82-
sources:
83-
- llvm-toolchain-trusty-3.9
84-
- ubuntu-toolchain-r-test
8551
compiler: clang-3.9
8652
env: CONFIG_OPTS="no-asm enable-asan enable-rc5 enable-md2"
8753
- os: linux
88-
addons:
89-
apt:
90-
packages:
91-
- clang-3.9
92-
sources:
93-
- llvm-toolchain-trusty-3.9
94-
- ubuntu-toolchain-r-test
9554
compiler: clang-3.9
9655
env: CONFIG_OPTS="no-stdio"
9756
- os: linux
@@ -160,7 +119,14 @@ before_script:
160119
export CROSS_COMPILE=${CC%%gcc}; unset CC;
161120
$srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
162121
else
163-
if which ccache >/dev/null && [ "$CC" != clang-3.9 ]; then
122+
if [ "$CC" == clang-3.9 ]; then
123+
sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang;
124+
curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
125+
echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null;
126+
sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
127+
sudo -E apt-get -yq update;
128+
sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9;
129+
elif which ccache >/dev/null; then
164130
CC="ccache $CC";
165131
fi;
166132
$srcdir/config -v $CONFIG_OPTS;
@@ -187,20 +153,44 @@ script:
187153
else
188154
top=.;
189155
fi
190-
- $make update
191-
- $make
156+
- if $make update; then
157+
echo -e '+\057 MAKE UPDATE OK';
158+
else
159+
echo -e '+\057 MAKE UPDATE FAILED'; false;
160+
fi;
161+
git diff --quiet
162+
- if [ -n "$CHECKDOCS" ]; then
163+
if $make doc-nits; then
164+
echo -e '+\057\057 MAKE DOC-NITS OK';
165+
else
166+
echo -e '+\057\057 MAKE DOC-NITS FAILED'; false;
167+
fi;
168+
fi
169+
- if $make ; then
170+
echo -e '+\057\057\057 MAKE OK';
171+
else
172+
echo -e '+\057\057\057 MAKE FAILED'; false;
173+
fi;
192174
- if [ -z "$BUILDONLY" ]; then
193175
if [ -n "$CROSS_COMPILE" ]; then
194176
sudo apt-get -yq install wine;
195177
export EXE_SHELL="wine" WINEPREFIX=`pwd`;
196178
fi;
197179
HARNESS_VERBOSE=yes make test;
198180
else
199-
$make build_tests;
181+
if $make build_tests; then
182+
echo -e '+\057\057\075 MAKE BUILD_TESTS OK';
183+
else
184+
echo -e '+\057\057\075 MAKE BUILD_TESTS FAILEd'; false;
185+
fi;
200186
fi
201187
- if [ -n "$DESTDIR" ]; then
202188
mkdir "../$DESTDIR";
203-
$make install install_docs DESTDIR="../$DESTDIR";
189+
if $make install install_docs DESTDIR="../$DESTDIR"; then
190+
echo -e '+\057\057\057\057\057 MAKE INSTALL_DOCS OK';
191+
else
192+
echo -e '+\057\057\057\057\057 MAKE INSTALL_DOCS FAILED'; false;
193+
fi;
204194
fi
205195
- cd $top
206196

CHANGES

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
22
OpenSSL CHANGES
33
_______________
44

5+
This is a high-level summary of the most important changes.
6+
For a full list of changes, see the git commit log; for example,
7+
https://github.com/openssl/openssl/commits/ and pick the appropriate
8+
release branch.
9+
10+
Changes between 1.1.0f and 1.1.0g [2 Nov 2017]
11+
12+
*) bn_sqrx8x_internal carry bug on x86_64
13+
14+
There is a carry propagating bug in the x86_64 Montgomery squaring
15+
procedure. No EC algorithms are affected. Analysis suggests that attacks
16+
against RSA and DSA as a result of this defect would be very difficult to
17+
perform and are not believed likely. Attacks against DH are considered just
18+
feasible (although very difficult) because most of the work necessary to
19+
deduce information about a private key may be performed offline. The amount
20+
of resources required for such an attack would be very significant and
21+
likely only accessible to a limited number of attackers. An attacker would
22+
additionally need online access to an unpatched system using the target
23+
private key in a scenario with persistent DH parameters and a private
24+
key that is shared between multiple clients.
25+
26+
This only affects processors that support the BMI1, BMI2 and ADX extensions
27+
like Intel Broadwell (5th generation) and later or AMD Ryzen.
28+
29+
This issue was reported to OpenSSL by the OSS-Fuzz project.
30+
(CVE-2017-3736)
31+
[Andy Polyakov]
32+
33+
*) Malformed X.509 IPAddressFamily could cause OOB read
34+
35+
If an X.509 certificate has a malformed IPAddressFamily extension,
36+
OpenSSL could do a one-byte buffer overread. The most likely result
37+
would be an erroneous display of the certificate in text format.
38+
39+
This issue was reported to OpenSSL by the OSS-Fuzz project.
40+
(CVE-2017-3735)
41+
[Rich Salz]
42+
43+
*) Ignore the '-named_curve auto' value for compatibility of applications
44+
with OpenSSL 1.0.2.
45+
[Tomas Mraz <tmraz@fedoraproject.org>]
46+
47+
*) Support for SSL_OP_NO_ENCRYPT_THEN_MAC in SSL_CONF_cmd.
48+
[Emilia Käsper]
49+
550
Changes between 1.1.0e and 1.1.0f [25 May 2017]
651

752
*) Have 'config' recognise 64-bit mingw and choose 'mingw64' as the target

Configurations/descrip.mms.tmpl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
sub dependmagic {
9090
my $target = shift;
9191

92-
return "$target : build_generated\n\t\pipe \$(MMS) depend && \$(MMS) _$target\n_$target";
92+
return "$target : build_generated\n\t\pipe \$(MMS) \$(MMSQUALIFIERS) depend && \$(MMS) \$(MMSQUALIFIERS) _$target\n_$target";
9393
}
9494
#use Data::Dumper;
9595
#print STDERR "DEBUG: before:\n", Dumper($unified_info{before});
@@ -144,6 +144,9 @@ BIN_SCRIPTS=[.tools]c_rehash.pl
144144
MISC_SCRIPTS=[.apps]CA.pl, [.apps]tsget.pl
145145
{- output_on() if $disabled{apps}; "" -}
146146

147+
APPS_OPENSSL={- use File::Spec::Functions;
148+
catfile("apps","openssl") -}
149+
147150
# DESTDIR is for package builders so that they can configure for, say,
148151
# SYS$COMMON:[OPENSSL] and yet have everything installed in STAGING:[USER].
149152
# In that case, configure with --prefix=SYS$COMMON:[OPENSSL] and then run
@@ -265,8 +268,10 @@ test : tests
265268
{- dependmagic('tests'); -} : build_programs_nodep, build_engines_nodep
266269
@ ! {- output_off() if $disabled{tests}; "" -}
267270
SET DEFAULT [.test]{- move("test") -}
271+
CREATE/DIR [.test-runs]
268272
DEFINE SRCTOP {- sourcedir() -}
269273
DEFINE BLDTOP {- builddir() -}
274+
DEFINE RESULT_D {- builddir(qw(test test-runs)) -}
270275
DEFINE OPENSSL_ENGINES {- builddir("engines") -}
271276
DEFINE OPENSSL_DEBUG_MEMORY "on"
272277
IF "$(VERBOSE)" .NES. "" THEN DEFINE VERBOSE "$(VERBOSE)"

Configurations/unix-Makefile.tmpl

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
113113
MISC_SCRIPTS=$(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget
114114
{- output_on() if $disabled{apps}; "" -}
115115

116+
APPS_OPENSSL={- use File::Spec::Functions;
117+
catfile("apps","openssl") -}
118+
116119
# DESTDIR is for package builders so that they can configure for, say,
117120
# /usr/ and yet have everything installed to /tmp/somedir/usr/.
118121
# Normally it is left empty.
@@ -241,11 +244,13 @@ test: tests
241244
{- dependmagic('tests'); -}: build_programs_nodep build_engines_nodep link-utils
242245
@ : {- output_off() if $disabled{tests}; "" -}
243246
( cd test; \
247+
mkdir -p test-runs; \
244248
SRCTOP=../$(SRCDIR) \
245249
BLDTOP=../$(BLDDIR) \
250+
RESULT_D=test-runs \
246251
PERL="$(PERL)" \
247252
EXE_EXT={- $exeext -} \
248-
OPENSSL_ENGINES=../$(BLDDIR)/engines \
253+
OPENSSL_ENGINES=`cd ../$(BLDDIR)/engines; pwd` \
249254
OPENSSL_DEBUG_MEMORY=on \
250255
$(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) )
251256
@ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
@@ -592,19 +597,9 @@ doc-nits:
592597
lint:
593598
lint -DLINT $(INCLUDES) $(SRCS)
594599

595-
{- # because the program apps/openssl has object files as sources, and
596-
# they then have the corresponding C files as source, we need to chain
597-
# the lookups in %unified_info
598-
my $apps_openssl = catfile("apps","openssl");
599-
our @openssl_source = map { @{$unified_info{sources}->{$_}} }
600-
@{$unified_info{sources}->{$apps_openssl}};
601-
""; -}
602600
generate_apps:
603601
( cd $(SRCDIR); $(PERL) VMS/VMSify-conf.pl \
604602
< apps/openssl.cnf > apps/openssl-vms.cnf )
605-
( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b apps/progs.pl \
606-
{- join(" ", @openssl_source) -} \
607-
> apps/progs.h )
608603

609604
generate_crypto_bn:
610605
( cd $(SRCDIR); $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
@@ -656,9 +651,12 @@ tags TAGS: FORCE
656651

657652
# Release targets (note: only available on Unix) #####################
658653

654+
# If your tar command doesn't support --owner and --group, make sure to
655+
# use one that does, for example GNU tar
659656
TAR_COMMAND=$(TAR) $(TARFLAGS) --owner 0 --group 0 -cvf -
660657
PREPARE_CMD=:
661658
tar:
659+
set -e; \
662660
TMPDIR=/var/tmp/openssl-copy.$$$$; \
663661
DISTDIR=$(NAME); \
664662
mkdir -p $$TMPDIR/$$DISTDIR; \
@@ -669,12 +667,12 @@ tar:
669667
mkdir -p $$TMPDIR/$$DISTDIR/`dirname $$F`; \
670668
cp $$F $$TMPDIR/$$DISTDIR/$$F; \
671669
done); \
672-
(cd $$TMPDIR; \
670+
(cd $$TMPDIR/$$DISTDIR; \
673671
$(PREPARE_CMD); \
674-
find $$TMPDIR/$$DISTDIR -type d -print | xargs chmod 755; \
675-
find $$TMPDIR/$$DISTDIR -type f -print | xargs chmod a+r; \
676-
find $$TMPDIR/$$DISTDIR -type f -perm -0100 -print | xargs chmod a+x; \
677-
$(TAR_COMMAND) $$DISTDIR) \
672+
find . -type d -print | xargs chmod 755; \
673+
find . -type f -print | xargs chmod a+r; \
674+
find . -type f -perm -0100 -print | xargs chmod a+x); \
675+
(cd $$TMPDIR; $(TAR_COMMAND) $$DISTDIR) \
678676
| (cd $(SRCDIR); gzip --best > $(TARFILE).gz); \
679677
rm -rf $$TMPDIR
680678
cd $(SRCDIR); ls -l $(TARFILE).gz
@@ -900,6 +898,7 @@ EOF
900898
my $shlib_target = $target{shared_target};
901899
my $ordinalsfile = defined($args{ordinals}) ? $args{ordinals}->[1] : "";
902900
my $target = shlib_simple($lib);
901+
my $target_full = shlib($lib);
903902
return <<"EOF"
904903
# With a build on a Windows POSIX layer (Cygwin or Mingw), we know for a fact
905904
# that two files get produced, {shlibname}.dll and {libname}.dll.a.
@@ -914,11 +913,11 @@ $target: $lib$libext $deps $ordinalsfile
914913
PERL="\$(PERL)" SRCDIR='\$(SRCDIR)' DSTDIR="$libd" \\
915914
INSTALLTOP='\$(INSTALLTOP)' LIBDIR='\$(LIBDIR)' \\
916915
LIBDEPS='\$(PLIB_LDFLAGS) '"$linklibs"' \$(EX_LIBS)' \\
917-
LIBNAME=$libname LIBVERSION=\$(SHLIB_MAJOR).\$(SHLIB_MINOR) \\
918-
LIBCOMPATVERSIONS=';\$(SHLIB_VERSION_HISTORY)' \\
916+
LIBNAME=$libname SHLIBVERSION=\$(SHLIB_MAJOR).\$(SHLIB_MINOR) \\
917+
STLIBNAME=$lib$libext \\
918+
SHLIBNAME=$target SHLIBNAME_FULL=$target_full \\
919919
CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(LIB_CFLAGS)' \\
920-
LDFLAGS='\$(LDFLAGS)' \\
921-
SHARED_LDFLAGS='\$(LIB_LDFLAGS)' SHLIB_EXT=$shlibext \\
920+
LDFLAGS='\$(LDFLAGS)' SHARED_LDFLAGS='\$(LIB_LDFLAGS)' \\
922921
RC='\$(RC)' SHARED_RCFLAGS='\$(RCFLAGS)' \\
923922
link_shlib.$shlib_target
924923
EOF
@@ -931,28 +930,26 @@ EOF
931930
}
932931
sub obj2dso {
933932
my %args = @_;
934-
my $lib = $args{lib};
935-
my $libd = dirname($lib);
936-
my $libn = basename($lib);
937-
(my $libname = $libn) =~ s/^lib//;
933+
my $dso = $args{lib};
934+
my $dsod = dirname($dso);
935+
my $dson = basename($dso);
938936
my $shlibdeps = join("", map { my $d = dirname($_);
939937
my $f = basename($_);
940938
(my $l = $f) =~ s/^lib//;
941939
" -L$d -l$l" } @{$args{deps}});
942940
my $deps = join(" ",compute_lib_depends(@{$args{deps}}));
943941
my $shlib_target = $target{shared_target};
944942
my $objs = join(" ", map { $_.$objext } @{$args{objs}});
945-
my $target = dso($lib);
943+
my $target = dso($dso);
946944
return <<"EOF";
947945
$target: $objs $deps
948946
\$(MAKE) -f \$(SRCDIR)/Makefile.shared -e \\
949947
PLATFORM=\$(PLATFORM) \\
950-
PERL="\$(PERL)" SRCDIR='\$(SRCDIR)' DSTDIR="$libd" \\
948+
PERL="\$(PERL)" SRCDIR='\$(SRCDIR)' DSTDIR="$dsod" \\
951949
LIBDEPS='\$(PLIB_LDFLAGS) '"$shlibdeps"' \$(EX_LIBS)' \\
952-
LIBNAME=$libname LDFLAGS='\$(LDFLAGS)' \\
950+
SHLIBNAME_FULL=$target LDFLAGS='\$(LDFLAGS)' \\
953951
CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(DSO_CFLAGS)' \\
954952
SHARED_LDFLAGS='\$(DSO_LDFLAGS)' \\
955-
SHLIB_EXT=$dsoext \\
956953
LIBEXTRAS="$objs" \\
957954
link_dso.$shlib_target
958955
EOF

0 commit comments

Comments
 (0)