Skip to content

Commit b12f163

Browse files
hassaanpBethGriggs
authored andcommitted
deps: upgrade openssl sources to 1.1.1g
This updates all sources in deps/openssl/openssl by: $ cd deps/openssl/ $ rm -rf openssl $ tar zxf ~/tmp/openssl-1.1.1g.tar.gz $ mv openssl-1.1.1g openssl $ git add --all openssl $ git commit openssl PR-URL: #32971 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
1 parent 323da6f commit b12f163

Some content is hidden

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

48 files changed

+1842
-636
lines changed

deps/openssl/openssl/CHANGES

+21
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@
77
https://github.com/openssl/openssl/commits/ and pick the appropriate
88
release branch.
99

10+
Changes between 1.1.1f and 1.1.1g [21 Apr 2020]
11+
12+
*) Fixed segmentation fault in SSL_check_chain()
13+
Server or client applications that call the SSL_check_chain() function
14+
during or after a TLS 1.3 handshake may crash due to a NULL pointer
15+
dereference as a result of incorrect handling of the
16+
"signature_algorithms_cert" TLS extension. The crash occurs if an invalid
17+
or unrecognised signature algorithm is received from the peer. This could
18+
be exploited by a malicious peer in a Denial of Service attack.
19+
(CVE-2020-1967)
20+
[Benjamin Kaduk]
21+
22+
*) Added AES consttime code for no-asm configurations
23+
an optional constant time support for AES was added
24+
when building openssl for no-asm.
25+
Enable with: ./config no-asm -DOPENSSL_AES_CONST_TIME
26+
Disable with: ./config no-asm -DOPENSSL_NO_AES_CONST_TIME
27+
At this time this feature is by default disabled.
28+
It will be enabled by default in 3.0.
29+
[Bernd Edlinger]
30+
1031
Changes between 1.1.1e and 1.1.1f [31 Mar 2020]
1132

1233
*) Revert the change of EOF detection while reading in libssl to avoid

deps/openssl/openssl/INSTALL

+3-3
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,9 @@
535535
conjunction with the "-DPEDANTIC" option (or the
536536
--strict-warnings option).
537537

538-
no-ui
539-
Don't build with the "UI" capability (i.e. the set of
540-
features enabling text based prompts).
538+
no-ui-console
539+
Don't build with the "UI" console method (i.e. the "UI"
540+
method that enables text based console prompts).
541541

542542
enable-unit-test
543543
Enable additional unit test APIs. This should not typically

deps/openssl/openssl/NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
This file gives a brief overview of the major changes between each OpenSSL
66
release. For more details please read the CHANGES file.
77

8+
Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020]
9+
10+
o Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967)
11+
812
Major changes between OpenSSL 1.1.1e and OpenSSL 1.1.1f [31 Mar 2020]
913

1014
o Revert the unexpected EOF reporting via SSL_ERROR_SSL

deps/openssl/openssl/README

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
OpenSSL 1.1.1f 31 Mar 2020
2+
OpenSSL 1.1.1g 21 Apr 2020
33

44
Copyright (c) 1998-2020 The OpenSSL Project
55
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson

deps/openssl/openssl/apps/build.info

+51-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{- our @apps_openssl_src =
22
qw(openssl.c
3-
asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c
4-
dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c
5-
genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c
6-
pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c
3+
asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c
4+
enc.c errstr.c
5+
genpkey.c nseq.c passwd.c pkcs7.c pkcs8.c
6+
pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c
77
s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c
8-
srp.c ts.c verify.c version.c x509.c rehash.c storeutl.c);
8+
verify.c version.c x509.c rehash.c storeutl.c);
99
our @apps_lib_src =
1010
( qw(apps.c opt.c s_cb.c s_socket.c app_rand.c bf_prefix.c),
1111
split(/\s+/, $target{apps_aux_src}) );
1212
our @apps_init_src = split(/\s+/, $target{apps_init_src});
1313
"" -}
14+
1415
IF[{- !$disabled{apps} -}]
1516
LIBS_NO_INST=libapps.a
1617
SOURCE[libapps.a]={- join(" ", @apps_lib_src) -}
@@ -21,11 +22,51 @@ IF[{- !$disabled{apps} -}]
2122
SOURCE[openssl]={- join(" ", @apps_openssl_src) -}
2223
INCLUDE[openssl]=.. ../include
2324
DEPEND[openssl]=libapps.a ../libssl
24-
25-
IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}]
26-
GENERATE[openssl.rc]=../util/mkrc.pl openssl
27-
SOURCE[openssl]=openssl.rc
28-
ENDIF
25+
IF[{- !$disabled{'des'} -}]
26+
SOURCE[openssl]=pkcs12.c
27+
DEPEND[pkcs12.o]=progs.h
28+
ENDIF
29+
IF[{- !$disabled{'ec'} -}]
30+
SOURCE[openssl]=ec.c ecparam.c
31+
DEPEND[ec.o]=progs.h
32+
DEPEND[ecparam.o]=progs.h
33+
ENDIF
34+
IF[{- !$disabled{'ocsp'} -}]
35+
SOURCE[openssl]=ocsp.c
36+
DEPEND[ocsp.o]=progs.h
37+
ENDIF
38+
IF[{- !$disabled{'srp'} -}]
39+
SOURCE[openssl]=srp.c
40+
DEPEND[srp.o]=progs.h
41+
ENDIF
42+
IF[{- !$disabled{'ts'} -}]
43+
SOURCE[openssl]=ts.c
44+
DEPEND[ts.o]=progs.h
45+
ENDIF
46+
IF[{- !$disabled{'dh'} -}]
47+
SOURCE[openssl]=dhparam.c
48+
DEPEND[dhparam.o]=progs.h
49+
ENDIF
50+
IF[{- !$disabled{'dsa'} -}]
51+
SOURCE[openssl]=dsa.c dsaparam.c gendsa.c
52+
DEPEND[dsa.o]=progs.h
53+
DEPEND[dsaparam.o]=progs.h
54+
DEPEND[gendsa.o]=progs.h
55+
ENDIF
56+
IF[{- !$disabled{'engine'} -}]
57+
SOURCE[openssl]=engine.c
58+
DEPEND[engine.o]=progs.h
59+
ENDIF
60+
IF[{- !$disabled{'rsa'} -}]
61+
SOURCE[openssl]=rsa.c rsautl.c genrsa.c
62+
DEPEND[rsa.o]=progs.h
63+
DEPEND[rsautl.o]=progs.h
64+
DEPEND[genrsa.o]=progs.h
65+
ENDIF
66+
IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}]
67+
GENERATE[openssl.rc]=../util/mkrc.pl openssl
68+
SOURCE[openssl]=openssl.rc
69+
ENDIF
2970

3071
{- join("\n ", map { (my $x = $_) =~ s|\.c$|.o|; "DEPEND[$x]=progs.h" }
3172
@apps_openssl_src) -}

deps/openssl/openssl/apps/dhparam.c

+29-34
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
2+
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
33
*
44
* Licensed under the OpenSSL license (the "License"). You may not use
55
* this file except in compliance with the License. You can obtain a copy
@@ -8,28 +8,24 @@
88
*/
99

1010
#include <openssl/opensslconf.h>
11-
#ifdef OPENSSL_NO_DH
12-
NON_EMPTY_TRANSLATION_UNIT
13-
#else
14-
15-
# include <stdio.h>
16-
# include <stdlib.h>
17-
# include <time.h>
18-
# include <string.h>
19-
# include "apps.h"
20-
# include "progs.h"
21-
# include <openssl/bio.h>
22-
# include <openssl/err.h>
23-
# include <openssl/bn.h>
24-
# include <openssl/dh.h>
25-
# include <openssl/x509.h>
26-
# include <openssl/pem.h>
27-
28-
# ifndef OPENSSL_NO_DSA
29-
# include <openssl/dsa.h>
30-
# endif
31-
32-
# define DEFBITS 2048
11+
#include <stdio.h>
12+
#include <stdlib.h>
13+
#include <time.h>
14+
#include <string.h>
15+
#include "apps.h"
16+
#include "progs.h"
17+
#include <openssl/bio.h>
18+
#include <openssl/err.h>
19+
#include <openssl/bn.h>
20+
#include <openssl/dh.h>
21+
#include <openssl/x509.h>
22+
#include <openssl/pem.h>
23+
24+
#ifndef OPENSSL_NO_DSA
25+
# include <openssl/dsa.h>
26+
#endif
27+
28+
#define DEFBITS 2048
3329

3430
static int dh_cb(int p, int n, BN_GENCB *cb);
3531

@@ -56,13 +52,13 @@ const OPTIONS dhparam_options[] = {
5652
{"C", OPT_C, '-', "Print C code"},
5753
{"2", OPT_2, '-', "Generate parameters using 2 as the generator value"},
5854
{"5", OPT_5, '-', "Generate parameters using 5 as the generator value"},
59-
# ifndef OPENSSL_NO_DSA
55+
#ifndef OPENSSL_NO_DSA
6056
{"dsaparam", OPT_DSAPARAM, '-',
6157
"Read or generate DSA parameters, convert to DH"},
62-
# endif
63-
# ifndef OPENSSL_NO_ENGINE
58+
#endif
59+
#ifndef OPENSSL_NO_ENGINE
6460
{"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"},
65-
# endif
61+
#endif
6662
{NULL}
6763
};
6864

@@ -146,13 +142,13 @@ int dhparam_main(int argc, char **argv)
146142
if (g && !num)
147143
num = DEFBITS;
148144

149-
# ifndef OPENSSL_NO_DSA
145+
#ifndef OPENSSL_NO_DSA
150146
if (dsaparam && g) {
151147
BIO_printf(bio_err,
152148
"generator may not be chosen for DSA parameters\n");
153149
goto end;
154150
}
155-
# endif
151+
#endif
156152

157153
out = bio_open_default(outfile, 'w', outformat);
158154
if (out == NULL)
@@ -173,7 +169,7 @@ int dhparam_main(int argc, char **argv)
173169

174170
BN_GENCB_set(cb, dh_cb, bio_err);
175171

176-
# ifndef OPENSSL_NO_DSA
172+
#ifndef OPENSSL_NO_DSA
177173
if (dsaparam) {
178174
DSA *dsa = DSA_new();
179175

@@ -196,7 +192,7 @@ int dhparam_main(int argc, char **argv)
196192
goto end;
197193
}
198194
} else
199-
# endif
195+
#endif
200196
{
201197
dh = DH_new();
202198
BIO_printf(bio_err,
@@ -217,7 +213,7 @@ int dhparam_main(int argc, char **argv)
217213
if (in == NULL)
218214
goto end;
219215

220-
# ifndef OPENSSL_NO_DSA
216+
#ifndef OPENSSL_NO_DSA
221217
if (dsaparam) {
222218
DSA *dsa;
223219

@@ -239,7 +235,7 @@ int dhparam_main(int argc, char **argv)
239235
goto end;
240236
}
241237
} else
242-
# endif
238+
#endif
243239
{
244240
if (informat == FORMAT_ASN1) {
245241
/*
@@ -376,4 +372,3 @@ static int dh_cb(int p, int n, BN_GENCB *cb)
376372
(void)BIO_flush(BN_GENCB_get_arg(cb));
377373
return 1;
378374
}
379-
#endif

deps/openssl/openssl/apps/dsa.c

+25-30
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
2+
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
33
*
44
* Licensed under the OpenSSL license (the "License"). You may not use
55
* this file except in compliance with the License. You can obtain a copy
@@ -8,23 +8,19 @@
88
*/
99

1010
#include <openssl/opensslconf.h>
11-
#ifdef OPENSSL_NO_DSA
12-
NON_EMPTY_TRANSLATION_UNIT
13-
#else
14-
15-
# include <stdio.h>
16-
# include <stdlib.h>
17-
# include <string.h>
18-
# include <time.h>
19-
# include "apps.h"
20-
# include "progs.h"
21-
# include <openssl/bio.h>
22-
# include <openssl/err.h>
23-
# include <openssl/dsa.h>
24-
# include <openssl/evp.h>
25-
# include <openssl/x509.h>
26-
# include <openssl/pem.h>
27-
# include <openssl/bn.h>
11+
#include <stdio.h>
12+
#include <stdlib.h>
13+
#include <string.h>
14+
#include <time.h>
15+
#include "apps.h"
16+
#include "progs.h"
17+
#include <openssl/bio.h>
18+
#include <openssl/err.h>
19+
#include <openssl/dsa.h>
20+
#include <openssl/evp.h>
21+
#include <openssl/x509.h>
22+
#include <openssl/pem.h>
23+
#include <openssl/bn.h>
2824

2925
typedef enum OPTION_choice {
3026
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
@@ -49,14 +45,14 @@ const OPTIONS dsa_options[] = {
4945
{"passin", OPT_PASSIN, 's', "Input file pass phrase source"},
5046
{"passout", OPT_PASSOUT, 's', "Output file pass phrase source"},
5147
{"", OPT_CIPHER, '-', "Any supported cipher"},
52-
# ifndef OPENSSL_NO_RC4
48+
#ifndef OPENSSL_NO_RC4
5349
{"pvk-strong", OPT_PVK_STRONG, '-', "Enable 'Strong' PVK encoding level (default)"},
5450
{"pvk-weak", OPT_PVK_WEAK, '-', "Enable 'Weak' PVK encoding level"},
5551
{"pvk-none", OPT_PVK_NONE, '-', "Don't enforce PVK encoding"},
56-
# endif
57-
# ifndef OPENSSL_NO_ENGINE
52+
#endif
53+
#ifndef OPENSSL_NO_ENGINE
5854
{"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"},
59-
# endif
55+
#endif
6056
{NULL}
6157
};
6258

@@ -71,9 +67,9 @@ int dsa_main(int argc, char **argv)
7167
OPTION_CHOICE o;
7268
int informat = FORMAT_PEM, outformat = FORMAT_PEM, text = 0, noout = 0;
7369
int i, modulus = 0, pubin = 0, pubout = 0, ret = 1;
74-
# ifndef OPENSSL_NO_RC4
70+
#ifndef OPENSSL_NO_RC4
7571
int pvk_encr = 2;
76-
# endif
72+
#endif
7773
int private = 0;
7874

7975
prog = opt_init(argc, argv, dsa_options);
@@ -214,7 +210,7 @@ int dsa_main(int argc, char **argv)
214210
i = PEM_write_bio_DSAPrivateKey(out, dsa, enc,
215211
NULL, 0, NULL, passout);
216212
}
217-
# ifndef OPENSSL_NO_RSA
213+
#ifndef OPENSSL_NO_RSA
218214
} else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
219215
EVP_PKEY *pk;
220216
pk = EVP_PKEY_new();
@@ -229,21 +225,21 @@ int dsa_main(int argc, char **argv)
229225
goto end;
230226
}
231227
assert(private);
232-
# ifdef OPENSSL_NO_RC4
228+
# ifdef OPENSSL_NO_RC4
233229
BIO_printf(bio_err, "PVK format not supported\n");
234230
EVP_PKEY_free(pk);
235231
goto end;
236-
# else
232+
# else
237233
i = i2b_PVK_bio(out, pk, pvk_encr, 0, passout);
238-
# endif
234+
# endif
239235
} else if (pubin || pubout) {
240236
i = i2b_PublicKey_bio(out, pk);
241237
} else {
242238
assert(private);
243239
i = i2b_PrivateKey_bio(out, pk);
244240
}
245241
EVP_PKEY_free(pk);
246-
# endif
242+
#endif
247243
} else {
248244
BIO_printf(bio_err, "bad output format specified for outfile\n");
249245
goto end;
@@ -262,4 +258,3 @@ int dsa_main(int argc, char **argv)
262258
OPENSSL_free(passout);
263259
return ret;
264260
}
265-
#endif

0 commit comments

Comments
 (0)