aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-03-08Configure et al: get rid of last traces of plib_lflags / PLIB_LDFLAGSRichard Levitte3-11/+7
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
2018-03-08config: Pass diverse flags to Configure via the environmentRichard Levitte2-25/+87
Passing flags "discovered" by 'config' on the command line to 'Configure' mixes them up with flags given by the user. That is contrary to their intention, so they need to be passed in a different manner. Enter the environment variables __CNF_CPPDEFINES, __CNF_CPPINCLUDES, __CNF_CPPFLAGS, __CNF_CFLAGS, __CNF_CXXFLAGS, __CNF_LDFLAGS, and __CNF_LDLIBS, initialised by 'config', and then used by Configure to initialise these %config values: defines, includes, cppflags, cflags, cxxflags, lflags, and ex_libs. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
2018-03-08Configurations/10-main.conf: Duplicate cflags to cxxflagsRichard Levitte1-2/+19
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
2018-03-08Add space to asoutflag value where appropriateRichard Levitte1-3/+3
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
2018-03-08Make "make variables" config attributes for overridable flagsRichard Levitte15-459/+787
With the support of "make variables" comes the possibility for the user to override them. However, we need to make a difference between defaults that we use (and that should be overridable by the user) and flags that are crucial for building OpenSSL (should not be overridable). Typically, overridable flags are those setting optimization levels, warnings levels, that kind of thing, while non-overridable flags are, for example, macros that indicate aspects of how the config target should be treated, such as L_ENDIAN and B_ENDIAN. We do that differentiation by allowing upper case attributes in the config targets, named exactly like the "make variables" we support, and reserving the lower case attributes for non-overridable project flags. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
2018-03-08Configure et al: rename all dso_* to module_* in shared-info.plRichard Levitte2-12/+12
Because there are already attributes with the dso_ prefix that are used instead of the corresponding lib_ attributes rather than in addition to them, it gets confusing to have similar or exactly the same attributes working with different semantics on Unix. So we rename those by changing the prefix dso_ to module_, and having those work just like the shared_ attributes, but for DSOs. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
2018-03-08Duplicate entries ssl_handshake_tbl trace entries...FdaSilvaYY3-15/+21
... and add some missing known values. Sort ssl/tls extension array list Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5304)
2018-03-08Fix issues in ia32 RDRAND asm leading to reduced entropyBryan Donlan6-49/+166
This patch fixes two issues in the ia32 RDRAND assembly code that result in a (possibly significant) loss of entropy. The first, less significant, issue is that, by returning success as 0 from OPENSSL_ia32_rdrand() and OPENSSL_ia32_rdseed(), a subtle bias was introduced. Specifically, because the assembly routine copied the remaining number of retries over the result when RDRAND/RDSEED returned 'successful but zero', a bias towards values 1-8 (primarily 8) was introduced. The second, more worrying issue was that, due to a mixup in registers, when a buffer that was not size 0 or 1 mod 8 was passed to OPENSSL_ia32_rdrand_bytes or OPENSSL_ia32_rdseed_bytes, the last (n mod 8) bytes were all the same value. This issue impacts only the 64-bit variant of the assembly. This change fixes both issues by first eliminating the only use of OPENSSL_ia32_rdrand, replacing it with OPENSSL_ia32_rdrand_bytes, and fixes the register mixup in OPENSSL_ia32_rdrand_bytes. It also adds a sanity test for OPENSSL_ia32_rdrand_bytes and OPENSSL_ia32_rdseed_bytes to help catch problems of this nature in the future. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5342)
2018-03-08Fixed several readability issues in DH_generate_parameters.podAlex Gaynor1-4/+4
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/5553)
2018-03-07Corrected two typos in a man pageAlex Gaynor1-2/+2
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5542)
2018-03-07Add GOST OIDs for Edwards parameter setsSergey Zhuravlev5-5/+43
Add OIDs for parameter sets of Edwards elliptic curves. CLA: trivial Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5380)
2018-03-07Remove OPENSSL_USE_NODELETE guards in shlibloadtestMatt Caswell1-6/+0
PR #3399 converted shlibloadtest to the new test framework. It also seemed to add some `OPENSSL_USE_NODELETE` guards to the library unloading part of the test. This part was added in a commit with this description: Review feedback; use single main, #ifdef ADD_TEST Suppose OPENSSL_USE_NODELETE (via Nick Reilly) Strangely though there doesn't seem to be any relevant review feedback in that PR that could justify the addition of those guards. The guards do not appear in 1.1.0. Having the guards changes the nature of the test, so that we only test library unloading on platforms where OPENSSL_USE_NODELETE is set (Linux and Windows). I can't think of any good reason for this and as it doesn't seem to be necessary in 1.1.0 so I think we should remove them. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5530)
2018-03-07Implement multi-process OCSP responder.Viktor Dukhovni4-47/+344
With "-multi" the OCSP responder forks multiple child processes, and respawns them as needed. This can be used as a long-running service, not just a demo program. Therefore the index file is automatically re-read when changed. The responder also now optionally times out client requests. Reviewed-by: Matt Caswell <matt@openssl.org>
2018-03-07Prepare to detect index changes in OCSP responder.Viktor Dukhovni5-15/+50
Retain open file handle and previous stat data for the CA index file, enabling detection and index reload (upcoming commit). Check requirements before entering accept loop. Reviewed-by: Matt Caswell <matt@openssl.org>
2018-03-07Configurations/unix-Makefile.tmpl: remove assignment of AS and ASFLAGSRichard Levitte1-3/+2
We have never used these variables with the Unix Makefile, and there's no reason for us to change this, so to avoid confusion, we remove them. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5545)
2018-03-07BIO_s_mem.pod: fix indirection for out parameter **ppDr. Matthias St. Pierre1-2/+2
BIO_get_mem_data() and BIO_get_mem_ptr() assign to *pp, not pp Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5544)
2018-03-06crypto/armcap.c: mask SHA512 hardware detection on iOS.Andy Polyakov1-1/+1
When running iOS application from command line it's impossible to get past the failing capability detection. This is because it's executed under debugger and iOS debugger is impossible to deal with. [If Apple implements SHA512 in silicon, it would have to be detected with sysctlbyname.] Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-03-06Configurations/10-main.conf: add -fno-common back to darwin-ppc-cc.Andy Polyakov1-0/+1
-fno-common was removed for all Darwin targets in 0c8734198d4282f6997965a03cd2e0ceaf207549 with rationale "it's either 'ranlib -c' or '-fno-common'." However, it's still absolutely required in 32-bit darwin-ppc-cc. And when trying things out I didn't quite see why it was formulated as one-or-another choice, as 'ranlib -c' shouldn't [and doesn't] have problems with object modules without commons. [Well, to be frank, I didn't manage to reproduce the problem the modification was meaning to resolve either...] Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-03-06util/dofile.pl: only quote stuff that actually needs quotingRichard Levitte1-2/+2
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5533)
2018-03-06opensslconf.h.in: Use all the "openssl_api_defines"Richard Levitte1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5533)
2018-03-06Configure: fix small spelling errorRichard Levitte1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5533)
2018-03-06Avoid unconditional store in CRYPTO_malloc.knekritz1-2/+8
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5372)
2018-03-06Fix a typo in the s_client man pageAlex Gaynor1-2/+2
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5525)
2018-03-06Fix a bunch of gcc warnings in packettest.cBernd Edlinger1-8/+8
Had been observed with recent gcc-8 snapshot and $ ./config --strict-warnings enable-asan Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5519)
2018-03-06Check the parent DRBG's strengthKurt Roeckx5-1/+28
We currently don't support the algorithm from NIST SP 800-90C 10.1.2 to use a weaker DRBG as source Reviewed-by: Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> GH: #5506
2018-03-06bnrand_range: Always call bnrand() with the correct flagKurt Roeckx1-6/+4
It was calling the BN_rand() when it should have call BN_priv_rand() Reviewed-by: Tim Hudson <tjh@openssl.org> GH: #5514
2018-03-05Add support for .include directive in config filesTomas Mraz15-15/+512
Either files or directories of *.cnf or *.conf files can be included. Recursive inclusion of directories is not supported. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5351)
2018-03-05If not sending key_share (no TLSv1.3), return appropriately.Todd Short1-2/+3
This fixes an issue raised in PR #4964 by kaduk. Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5491)
2018-03-05Fix status_request and SCT extensionsMatt Caswell2-2/+14
They are valid for use in a CertificateRequest message, but we did not allow it. If a server sent such a message using either of those two extensions then the handshake would abort. This corrects that error, but does not add support for actually processing the extensions. They are simply ignored, and a TODO is inserted to add support at a later time. This was found during interoperability testing with btls: https://gitlab.com/ilari_l/btls Prompted by these errors I reviewed the complete list of extensions and compared them with the latest table in draft-24 to confirm there were no other errors of a similar type. I did not find any. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/5490)
2018-03-05Update CHANGES for X448/Ed448 support in libsslMatt Caswell1-2/+2
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/5470)
2018-03-05Update tests for TLS Ed448Matt Caswell14-402/+828
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/5470)
2018-03-05Add X448/Ed448 support to libsslMatt Caswell6-3/+25
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/5470)
2018-03-04Fixed a typo in a man pageAlex Gaynor1-1/+1
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5508)
2018-03-04Fix credit for SRP codeRich Salz1-2/+5
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5504)
2018-03-03Windows makefile: Don't quote generator argumentsRichard Levitte1-1/+2
Rely on the build.info constructor to do the right thing. Fixes #5500 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5501)
2018-03-03test/ctype_internal_test.c: portability fixup.Andy Polyakov1-3/+5
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/5493)
2018-03-03mem_sec.c: portability fixup.Andy Polyakov1-0/+3
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/5493)
2018-03-03ec/curve448/f_generic.c: fix VC-WIN32 debug build failure.Andy Polyakov2-4/+4
Debugging asserts had implicit casts that triggered the warnings. However, instead of making the casts explicit it's more appropriate to perform checks that ensure that implicit casts were safe. ec/curve448/scalar.c: size_t-fy scalar_decode_short. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5494)
2018-03-03ec/curve448/curve448.c: fix undefined behaviour sanitizer failure.Andy Polyakov1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5494)
2018-03-03Fix a possible memory leak in engine_table_registerBernd Edlinger1-0/+5
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5489)
2018-03-03Fixed a typo in a man pageAlex Gaynor1-1/+1
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5498)
2018-03-02Update CHANGES for X448 and Ed448Matt Caswell1-0/+4
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/5481)
2018-03-02Add test vectors for X448 and Ed448Matt Caswell1-0/+251
This adds the Ed448 test vectors from RFC8032 and the X448 test vectors from RFC7748. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/5481)
2018-03-02Update some documentation for X448/Ed448Matt Caswell5-21/+33
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/5481)
2018-03-02Integrate X448 and Ed448 into libcryptoMatt Caswell12-104/+353
This adds all of the relevant EVP plumbing required to make X448 and Ed448 work. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/5481)
2018-03-02Add pkey types for curve448Matt Caswell1-0/+2
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/5481)
2018-03-01Fix typo in ASN1_STRING_length docIvan Filenko1-2/+2
CLA: trivial Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/5458)
2018-03-01Test the result of CMS_RecipientInfo_ktri_get0_algs() before using its ↵Brad Spencer1-1/+2
output in rsa_cms_encrypt(). CLA: trivial Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/4966)
2018-03-01ec/asm/x25519-x86_64.pl: remove redundant carry chain.Andy Polyakov1-15/+6
Why is it redundant? We're looking at carry from addition of small, 11-bit number to 256-bit one. And carry would mean only one thing, resulting first limb being small number and remaing ones - zeros. Hence adding 38 to first limb can't carry. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5476)
2018-02-28Do not set a nonzero default max_early_dataBenjamin Kaduk5-8/+36
When early data support was first added, this seemed like a good idea, as it would allow applications to just add SSL_read_early_data() calls as needed and have things "Just Work". However, for applications that do not use TLS 1.3 early data, there is a negative side effect. Having a nonzero max_early_data in a SSL_CTX (and thus, SSL objects derived from it) means that when generating a session ticket, tls_construct_stoc_early_data() will indicate to the client that the server supports early data. This is true, in that the implementation of TLS 1.3 (i.e., OpenSSL) does support early data, but does not necessarily indicate that the server application supports early data, when the default value is nonzero. In this case a well-intentioned client would send early data along with its resumption attempt, which would then be ignored by the server application, a waste of network bandwidth. Since, in order to successfully use TLS 1.3 early data, the application must introduce calls to SSL_read_early_data(), it is not much additional burden to require that the application also calls SSL_{CTX_,}set_max_early_data() in order to enable the feature; doing so closes this scenario where early data packets would be sent on the wire but ignored. Update SSL_read_early_data.pod accordingly, and make s_server and our test programs into applications that are compliant with the new requirements on applications that use early data. Fixes #4725 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5483)