summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix potential null problem.Pauli2017-09-011-2/+2
| | | | | Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4313)
* Avoid possible uninitialized variable.Rich Salz2017-09-011-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4307)
* OpenSSL::Test::__fixup_prg: don't check program existenceRichard Levitte2017-08-311-5/+0
| | | | | | | | | | The program will fail to run if it doesn't exist anyway, no need to check its existence here. Fixes #4306 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4309)
* util/mkdef.pl: handle line terminators correctlyRichard Levitte2017-08-311-2/+1
| | | | | | | | | | | | When parsing the header files, mkdef.pl didn't clear the line terminator properly. In most cases, this didn't matter, but there were moments when this caused parsing errors (such as CRLFs in certain cases). Fixes #4267 Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4304)
* Various review fixes for PSK early_data supportMatt Caswell2017-08-315-11/+17
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Test for late client side detection of ALPN inconsistentiesMatt Caswell2017-08-311-56/+111
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Client side sanity check of ALPN after server has accepted early_dataMatt Caswell2017-08-313-19/+61
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Add some fixes for Travis failuresMatt Caswell2017-08-312-3/+3
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Add PSK early_data testsMatt Caswell2017-08-311-0/+171
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Add server side sanity checks of SNI/ALPN for use with early_dataMatt Caswell2017-08-314-14/+53
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Make sure we save ALPN data in the sessionMatt Caswell2017-08-311-0/+11
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Complain if we are writing early data but SNI or ALPN is incorrectMatt Caswell2017-08-314-4/+56
| | | | | | | | SNI and ALPN must be set to be consistent with the PSK. Otherwise this is an error. Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Add functions for getting/setting SNI/ALPN info in SSL_SESSIONMatt Caswell2017-08-314-2/+78
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Show the error stack if there was an error writing early data in s_clientMatt Caswell2017-08-311-0/+1
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Update the tests for SNI changesMatt Caswell2017-08-314-8/+13
| | | | | | | | If there is no SNI in the session then s_client no longer sends the SNI extension. Update the tests to take account of that Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* If no SNI has been explicitly set use the one from the sessionMatt Caswell2017-08-311-0/+20
| | | | | | | | | If we have not decided on an SNI value yet, but we are attempting to reuse a session, and SNI is set in that, then we should use that value by default. Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Make sure we use the correct cipher when using the early_secretMatt Caswell2017-08-311-2/+18
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Add HISTORY and SEE ALSO sections for the new TLSv1.3 PSK functionsMatt Caswell2017-08-312-0/+20
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Add documentation for SSL_SESSION_set_max_early_data()Matt Caswell2017-08-312-2/+13
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Add some PSK early_data testsMatt Caswell2017-08-311-94/+149
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Add SSL_SESSION_set_max_early_data()Matt Caswell2017-08-313-0/+10
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Enable the ability to use an external PSK for sending early_dataMatt Caswell2017-08-319-39/+99
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/3926)
* Fixed address family test error for AF_UNIX in BIO_ADDR_makeZhu Qun-Ying2017-08-311-1/+1
| | | | | | | | CLA: trivial Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4298)
* Add documentation for ARIA GCM modes.Pauli2017-08-311-12/+18
| | | | | Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4300)
* Add ARIA as an alias for all ARIA based modes.Pauli2017-08-311-0/+1
| | | | | Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4300)
* Introduce SSL_CIPHER_get_protocol_idPaul Yang2017-08-304-6/+15
| | | | | | | | | | | The returned ID matches with what IANA specifies (or goes on the wire anyway, IANA notwithstanding). Doc is added. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/4107)
* Add two missing SSL_CIPHER_* functionsPaul Yang2017-08-301-1/+17
| | | | | | | | | | | This is yet another 'code health' commit to respond to this round of code health Tuesday [skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/4107)
* Fix return value of ASN1_TIME_compareTodd Short2017-08-302-1/+47
| | | | | | Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4264)
* Configure: base compiler-specific decisions on pre-defines.Andy Polyakov2017-08-301-24/+24
| | | | | | | | | The commit subject is a bit misleading in sense that decisions affect only gcc and gcc-alikes, like clang, recent icc... Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/4281)
* Revert "Allow --strict-warnings with the icc compiler as well"Andy Polyakov2017-08-301-2/+2
| | | | | | | | This reverts commit a610934c3bdf2c0aafc633d4245efe3df289d716. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/4281)
* Implement Aria GCM/CCM Modes and TLS cipher suitesJon Spillett2017-08-3020-10/+1155
| | | | | | | | | | | | | | AEAD cipher mode implementation is based on that used for AES: https://tools.ietf.org/html/rfc5116 TLS GCM cipher suites as specified in: https://tools.ietf.org/html/rfc6209 Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4287)
* Fix potential null pointer dereference in ARIA implementationJon Spillett2017-08-301-1/+2
| | | | | | Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4286)
* Move OPENSSL_CONF from e_os.h to cryptlib.hPauli2017-08-294-3/+4
| | | | | | Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4188)
* Move e_os.h to be the very first include.Pauli2017-08-2939-59/+43
| | | | | | | | cryptilib.h is the second. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4188)
* Remove the X_OK define, it is unused.Pauli2017-08-291-1/+0
| | | | | | Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4188)
* Move the REF_PRINT support from e_os.h to internal/refcount.h.Pauli2017-08-2917-35/+37
| | | | | | Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4188)
* e_os.h removal from other headers and source files.Pauli2017-08-2955-51/+90
| | | | | | | | | | | | | Removed e_os.h from all bar three headers (apps/apps.h crypto/bio/bio_lcl.h and ssl/ssl_locl.h). Added e_os.h into the files that need it now. Directly reference internal/nelem.h when required. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4188)
* Make the global DRBGs staticKurt Roeckx2017-08-282-5/+3
| | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> GH: #4268
* Don't auto-instantiate a DRBG when trying to use it and it's notKurt Roeckx2017-08-287-63/+107
| | | | | | | | | | | | | The one creating the DRBG should instantiate it, it's there that we know which parameters we should use to instantiate it. This splits the rand init in two parts to avoid a deadlock because when the global drbg is created it wands to call rand_add on the global rand method. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> GH: #4268
* Avoid out-of-bounds readRich Salz2017-08-281-4/+6
| | | | | | | Fixes CVE 2017-3735 Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/4276)
* If 'tests' is disabled, then so should 'external-tests'Richard Levitte2017-08-281-0/+1
| | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/4274)
* DRBG: Remove 'randomness' buffer from 'RAND_DRBG'Dr. Matthias St. Pierre2017-08-285-33/+24
| | | | | | | | | | | | | | | The DRBG callbacks 'get_entropy()' and 'cleanup_entropy()' are designed in such a way that the randomness buffer does not have to be allocated by the calling function. It receives the address of a dynamically allocated buffer from get_entropy() and returns this address to cleanup_entropy(), where it is freed. If these two calls are properly paired, the address can be stored in a stack local variable of the calling function, so there is no need for having a 'randomness' member (and a 'filled' member) in 'RAND_DRBG'. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4266)
* RAND: Rename the RAND_poll_ex() callback and its typedefDr. Matthias St. Pierre2017-08-288-28/+28
| | | | | | | | | | | | | | | | With the introduction of RAND_poll_ex(), the `RAND_add()` calls were replaced by meaningless cb(...). This commit changes the 'cb(...)' calls back to 'rand_add(...)' calls by changing the signature as follows: -int RAND_poll_ex(RAND_poll_fn cb, void *arg); +int RAND_poll_ex(RAND_poll_cb rand_add, void *arg); Changed the function typedef name to 'RAND_poll_cb' to emphasize the fact that the function type represents a callback function. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4266)
* DRBG: clarify difference between entropy counts and buffer lengthsDr. Matthias St. Pierre2017-08-284-89/+105
| | | | | | | | | | | | | | | | | | | | | | | | | Unlike the NIST DRBG standard, entropy counts are in bits and buffer lengths are in bytes. This has lead to some confusion and errors in the past, see my comment on PR 3789. To clarify the destinction between entropy counts and buffer lengths, a 'len' suffix has been added to all member names of RAND_DRBG which represent buffer lengths: - {min,max}_{entropy,adin,nonce,pers} + {min,max}_{entropy,adin,nonce,pers}len This change makes naming also more consistent, as can be seen in the diffs, for example: - else if (adinlen > drbg->max_adin) { + else if (adinlen > drbg->max_adinlen) { Also replaced all 'ent's by 'entropy's, following a suggestion of Paul Dale. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4266)
* MSC_VER <= 1200 isn't supported; remove dead codeRich Salz2017-08-274-16/+4
| | | | | | | VisualStudio 6 and earlier aren't supported. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4263)
* Remove NO_DIRENT; it isn't used anywhereRich Salz2017-08-261-1/+0
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4261)
* Fix guarding macro in include/internal/sockets.hRichard Levitte2017-08-251-34/+34
| | | | | | | | The guard was checked but never defined. Also, rename it to reflect that this is an internal header file, not a public one. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4254)
* Move more socket stuffRichard Levitte2017-08-252-25/+29
| | | | | | | | | | The socket stuff for DJGPP and VMS was only partially moved to include/internal/sockets.h... Remains vxWorks. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4254)
* This part fixes braces around if-else.Paul Yang2017-08-259-44/+65
| | | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4223)
* Fix coding style in crypto/rsa directoryPaul Yang2017-08-259-62/+62
| | | | | | | | this part contains only the return (x) fix. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4223)