aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* perlasm/x86*.pl: add endbranch instruction.Andy Polyakov2016-06-142-0/+9
| | | | | | | For further information see "Control-flow Enforcement Technology Preview" by Intel. Reviewed-by: Rich Salz <rsalz@openssl.org>
* modes/asm/ghashp8-ppc.pl: improve performance by 2.7x.Andy Polyakov2016-06-142-20/+458
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* aes/asm/aesp8-ppc.pl: implement "tweak chaining".Andy Polyakov2016-06-141-54/+126
| | | | | | | This is useful in Linux kernel context, in cases data happens to be fragmented and processing can take multiple calls. Reviewed-by: Rich Salz <rsalz@openssl.org>
* test/evptests.txt: add more XTS tests.Andy Polyakov2016-06-141-0/+85
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* evp/e_aes.c: wire hardware-assisted XTS subroutines.Andy Polyakov2016-06-141-0/+14
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* aes/asm/aesp8-ppc.pl: add XTS subroutines.Andy Polyakov2016-06-141-0/+1784
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* (Temporarily) don't download clang packageRich Salz2016-06-141-4/+2
| | | | Reviewed-by: Emilia Käsper <emilia@openssl.org>
* perlasm/x86_64-xlate.pl: add commentary.Andy Polyakov2016-06-141-1/+7
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* perlasm/x86_64-xlate.pl: refactor argument parsing loop.Andy Polyakov2016-06-141-11/+12
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Make x86_64-xlate.pl 'use strict' clean.David Benjamin2016-06-141-114/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use strict would have caught a number of historical bugs in the perlasm code, some in the repository and some found during review. It even found a fresh masm-only bug (see below). This required some tweaks. The "single instance is enough" globals got switched to proper blessed objects rather than relying on symbolic refs. A few types need $opcode passed in as a result. The $$line thing is a little bit of a nuisance. There may be a clearer pattern to use instead. This even a bug in the masm code. 9b634c9b37afc482a8dc8868e367bdd1b650e507 added logic to make labels global or function-global based on whether something starts with a $, seemingly intended to capture the $decor setting of '$L$'. However, it references $ret which is not defined in label::out. label::out is always called after label::re, so $ret was always the label itself, so the line always ran. I've removed the regular expression so as not to change the behavior of the script. A number of the assembly files now routinely jump across functions, so this seems to be the desired behavior now. GH#1165 Signed-off-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* VMS: use BLDDIR rather than BUILDDIR in descrip.mms.tmplRichard Levitte2016-06-141-3/+3
| | | | | | Just like in the other build file templates Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add a developer target 'build_generated' to rebuild mandatory headersRichard Levitte2016-06-143-18/+24
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Build file templates: make sure to depend on generated header filesRichard Levitte2016-06-143-21/+75
| | | | | | As well as properly generating those that are made from .in files. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Move the Configure generated header files to the top build.infoRichard Levitte2016-06-142-17/+12
| | | | | | This turns these headers into build file generated ones. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Configure: Make it possible to generate mandatory header filesRichard Levitte2016-06-142-5/+8
| | | | | | | | | | 'DEPEND[]=file.h' becomes a special way to say that 'file.h' must be generated before anything else is built. It's likely that a number of source files depend on these header files, this provides a simple way to make sure they are always generated even it the dependency data hasn't been added to the build file yet. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix omitted selector handling.Dr. Stephen Henson2016-06-141-1/+1
| | | | | | | | The selector field could be omitted because it has a DEFAULT value. In this case *sfld == NULL (sfld can never be NULL). This was not noticed because this was never used in existing ASN.1 modules. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Update fuzz corporaKurt Roeckx2016-06-143352-356/+1937
| | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> MR: #2949
* Initialize the session_idKurt Roeckx2016-06-141-0/+2
| | | | | | | | | | | | | ssl_session_hash() always looks at the first 4 bytes, regardless of the length. A client can send a session id that's shorter, and the callback could also generate one that's shorter. So we make sure that the rest of the buffer is initliazed to 0 so that we always calculate the same hash. Found by tis-interpreter, also previously reported as RT #2871 Reviewed-by: Rich Salz <rsalz@openssl.org> MR: #2911
* Remove an unused variable assignmentMatt Caswell2016-06-141-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT4562: Fix misleading doc on OPENSSL_configRich Salz2016-06-148-34/+35
| | | | | | Also changed the code to use "appname" not "filename" Reviewed-by: Matt Caswell <matt@openssl.org>
* Free memory on an error pathMatt Caswell2016-06-141-0/+3
| | | | | | | The function a2i_ASN1_STRING can encounter an error after already allocating a buffer. It wasn't always freeing that buffer on error. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Avoid a double-free in crl2pl7Matt Caswell2016-06-141-3/+1
| | | | | | The variable |crtflst| could get double freed in an error path. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add missing break statementMatt Caswell2016-06-141-0/+1
| | | | | | | The -psk option processing was falling through to the -srp option processing in the ciphers app. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix commentMatt Caswell2016-06-141-2/+1
| | | | | | | | Fix a comment following commit c2c49969e23605. RT2388 Reviewed-by: Rich Salz <rsalz@openssl.org>
* make updateMatt Caswell2016-06-141-0/+2
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Shorten some symbol namesRichard Levitte2016-06-141-17/+17
| | | | | | | | | | VMS C doesn't allow symbols longer than 31 characters. We do the automatic shortening with the library files, but not otherwise (to make sure to work the VMS C magic). For consistency, I shortened other similar symbols in the same manner. Reviewed-by: Rich Salz <rsalz@openssl.org>
* GH1141: Different fix, preferred by Richard.Rich Salz2016-06-131-2/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3454: Re-enable nistp-64_gcc_128 on windowsPeter Mosmans2016-06-131-2/+0
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* Missed some copyright mergeRich Salz2016-06-132-102/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Ensure that NULL r and s parameters cannot be set on DSA_SIG/ECDSA_SIGs.TJ Saunders2016-06-132-0/+4
| | | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1193)
* Forgot to update the setter argument ordering in the public headers.TJ Saunders2016-06-132-2/+2
| | | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1193)
* Reorder the setter arguments to more consistently match that of other APIs,TJ Saunders2016-06-134-4/+4
| | | | | | | | per review comments. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1193)
* Implement DSA_SIG_set0() and ECDSA_SIG_set0(), for setting signature values.TJ Saunders2016-06-136-0/+44
| | | | | | | | | | | | | | | SSH2 implementations which use DSA_do_verify() and ECDSA_do_verify() are given the R and S values, and the data to be signed, by the client. Thus in order to validate these signatures, SSH2 implementations will digest and sign the data -- and then pass in properly provisioned DSA_SIG and ECDSA_SIG objects. Unfortunately, the existing OpenSSL-1.1.0 APIs do not allow for directly setting those R and S values in these objects, which makes using OpenSSL for such SSH2 implementations much more difficult. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1193)
* Add some missing return value checksMatt Caswell2016-06-135-11/+19
| | | | | | Some misc return value checks Reviewed-by: Rich Salz <rsalz@openssl.org>
* Update sslapitest to use the test frameworkMatt Caswell2016-06-132-23/+11
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Update the SSL_set_session() documentationMatt Caswell2016-06-131-1/+5
| | | | | | | Update the SSL_set_session() documentation to reflect the fact that old bad sessions are removed from the cache if necessary. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add some session API testsMatt Caswell2016-06-137-184/+411
| | | | | | | | | | This commit adds some session API tests, and in particular tests the modified behaviour of SSL_set_session() introduced in the last commit. To do this I have factored out some common code from the asynciotest into a new ssltestlib.c file. I've also renamed getsettest to sslapitest as this more closely matches what it now is! Reviewed-by: Rich Salz <rsalz@openssl.org>
* Ensure SSL_set_session clears the old session from cache if it is badMatt Caswell2016-06-131-19/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | SSL_clear() and SSL_free() will remove a session from the cache if it is considered "bad". However SSL_set_session() does not do this for the session it is replacing. SSL_clear() clears an SSL object ready for reuse. It does not clear the session though. This means that: SSL_clear(s) SSL_set_session(s, sess); and SSL_set_session(s, sess); SSL_clear(s); do not do the same thing, although logically you would expect that they would. The failure of SSL_set_session() to remove bad sessions from the cache should be considered a bug, so this commit fixes it. RT#597 Reviewed-by: Rich Salz <rsalz@openssl.org>
* SSL test: only write out server2 when testing SNIEmilia Kasper2016-06-1311-4831/+25
| | | | | | | | | | The SNI tests introduced a redundant "server2" section into every test configuration. Copy this automatically from "server" unless testing SNI, to reduce noise in the generated confs. Also remove duplicate SSL_TEST_CTX_create (merge conflict error). Reviewed-by: Rich Salz <rsalz@openssl.org>
* Handle inability to create AFALG socketMatt Caswell2016-06-132-2/+16
| | | | | | | | | | | | | Some Linux platforms have a suitably recent kernel to support AFALG, but apparently you still can't actually create an afalg socket. This extends the afalg_chk_platform() function to additionally check whether we can create an AFALG socket. We also amend the afalgtest to not report a failure to load the engine as a test failure. A failure to load is almost certainly due to platform environmental issues, and not an OpenSSL problem. RT 4434 Reviewed-by: Andy Polyakov <appro@openssl.org>
* Port DTLS version negotiation testsEmilia Kasper2016-06-1312-171/+2756
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Clean up following new SNI testsEmilia Kasper2016-06-137-63/+69
| | | | | | | | | | | - Only send SNI in SNI tests. This allows us to test handshakes without the SNI extension as well. - Move all handshake-specific machinery to handshake_helper.c - Use enum types to represent the enum everywhere (Resorting to plain ints can end in sign mismatch when the enum is represented by an unsigned type.) Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT3809: basicConstraints is criticalRich Salz2016-06-135-14/+6
| | | | | | | This is really a security bugfix, not enhancement any more. Everyone knows critical extensions. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* bn/bn_add.c: favour counted loops over ifs and breaks.Andy Polyakov2016-06-131-72/+38
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* doc/crypto/OPENSSL_ia32cap.pod update.Andy Polyakov2016-06-131-15/+46
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Don't skip leading zeroes in PSK keys.Dr. Stephen Henson2016-06-122-36/+28
| | | | | | | | | Don't use BN_hex2bn() for PSK key conversion as the conversion to BN and back removes leading zeroes, use OPENSSL_hexstr2buf() instead. RT#4554 Reviewed-by: Matt Caswell <matt@openssl.org>
* RT2759: Don't read TTY when already at EOF.John Denker2016-06-121-1/+10
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* Avoid memory leaks if options repeated.Rich Salz2016-06-121-5/+14
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* RT3053: Check for NULL before dereferencingPhillip Hellewell2016-06-121-0/+4
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Ensure that the EVP_MD_meth_new docs properly match the declared functions;TJ Saunders2016-06-111-2/+2
| | | | | | | it looks like these names have shifted a little over time. Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1203)