summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-04-26Add ex_data functions for X509_STOREKazuki Yamaguchi
Add X509_STORE_{set,get}_ex_data() function and X509_STORE_get_ex_new_index() macro. X509_STORE has ex_data and the documentation also mentions them but they are not actually implemented. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-26Ensure we check i2d_X509 return valMatt Caswell
The i2d_X509() function can return a negative value on error. Therefore we should make sure we check it. Issue reported by Yuan Jochen Kang. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-04-26*.der files are binary.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-26Remove the never-functional no-sctBenjamin Kaduk
It was added as part of 2df84dd3299ff25fa078ca7ffbdeaac65b361feb but has never actually been used for anything; presumably it was a typo for one of SCTP or CT. This removes the last '??' entry from INSTALL. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-26Remove some OPENSSL_NO_SHA that snuck inBenjamin Kaduk
Commit d064e6ab52ac8e7b80b2a5d11b31bca583b769c7 removed all the OPENSSL_NO_SHA guards, but commit a50ad1daaa68c109ea1a14225a7aba8660526101 regenerated some due to the sha entries in the %md_disabler table in apps/progs.pl. Update %md_disabler to reflect that sha is not disableable, and remove OPENSSL_NO_SHA for good. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-25crypto/poly1305/asm: chase overflow bit on x86 and ARM platforms.Andy Polyakov
Even though no test could be found to trigger this, paper-n-pencil estimate suggests that x86 and ARM inner loop lazy reductions can loose a bit in H4>>*5+H0 step. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-04-25make updateViktor Dukhovni
And recycle some disused slots. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-25Added missing X509_STORE_CTX_set_error_depth() accessorViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-25Document the enhancements for DEPEND and INCLUDE and use a better exampleRichard Levitte
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-04-25Build system: add include directories and dependencies for generatorsRichard Levitte
In the case of generating a file like this: GENERATE[foo.S]=mkfoo.pl arg1 arg2 the 'mkfoo.pl' generator itself might need to include other files, such as perl modules within our source tree. We can reuse already existing syntax for it, like this: INCLUDE[mkfoo.pl]=module/path or: DEPEND[mkfoo.pl]=modules/mymodule.pm This change implements the support for such constructs, and for the DEPEND statement, for any value that indicates a perl module (.pm file), it will automatically infer an INCLUDE statement for its directory, just like it does for C header files, so you won't have do write this: DEPEND[mkfoo.pl]=modules/mymodule.pm INCLUDE[mkfoo.pl]=modules Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-04-25Fix NULL deref in apps/pkcs7Rich Salz
Thanks to Brian Carpenter for finding and reporting this. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-04-25API compat macros for renamed X509_STORE_CTX functionsViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-25s390x assembly pack: cache capability query results.Andy Polyakov
IBM argues that in certain scenarios capability query is really expensive. At the same time it's asserted that query results can be safely cached, because disabling CPACF is incompatible with reboot-free operation. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-04-25crypto/sparc_arch.h: reserve more SPARCv9 capability bits.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-25chacha/asm/chacha-ppc.pl: get misalignment corner case right on big-endian.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-23Fix EC_KEY_set_private_key() to call key->group->meth->set_private()Kazuki Yamaguchi
Fix a bug introduced by 6903e2e7e9a4 (Extended EC_METHOD customisation support., 2016-02-01). key->meth->set_private() is wrongly called where it should call key->group->meth->set_private(). PR#4517 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-04-23add test for CVE-2016-2109Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-23In d2i_test return error for malloc failure.Dr. Stephen Henson
Bad ASN.1 data should never be able to trigger a malloc failure so return an error in d2i_test if a malloc failure occurs. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-23Harden ASN.1 BIO handling of large amounts of data.Dr. Stephen Henson
If the ASN.1 BIO is presented with a large length field read it in chunks of increasing size checking for EOF on each read. This prevents small files allocating excessive amounts of data. CVE-2016-2109 Thanks to Brian Carpenter for reporting this issue. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-04-22Warn when doing an out-of-source build and finding in-source build artifactsRichard Levitte
The reason to warn is that configuration *may* pick up on configuration header files that are in the source tree, that might be for a wildly different configuration than what is expected in the current out-of-source configuration. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-22make updateViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-22Enabled DANE only when at least one TLSA RR was addedViktor Dukhovni
It is up to the caller of SSL_dane_tlsa_add() to take appropriate action when no records are added successfully or adding some records triggers an internal error (negative return value). With this change the caller can continue with PKIX if desired when none of the TLSA records are usable, or take some appropriate action if DANE is required. Also fixed the internal ssl_dane_dup() function to properly initialize the TLSA RR stack in the target SSL handle. Errors in ssl_dane_dup() are no longer ignored. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-22Don't set peer_tmp until we have finished constructing itMatt Caswell
If we fail halfway through constructing the peer_tmp EVP_PKEY but we have already stored it in s->s3->peer_tmp then if anything tries to use it then it will likely fail. This was causing s_client to core dump in the sslskewith0p test. s_client was trying to print out the connection parameters that it had negotiated so far. Arguably s_client should not do that if the connection has failed...but given it is existing functionality it's easier to fix libssl. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-04-22Extensions to d2i_test.Dr. Stephen Henson
Using ASN1_ITEM tables in d2i_test: this then uses consistent names and makes it easier to extend. Add bio, reencode and compare tests. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-04-22Fix capi engine for no-dsaMatt Caswell
The capi engine was failing to compile on Windows if the no-dsa option was selected. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-22Fix no-dsa on Windows/VMSMatt Caswell
The no-dsa option was failing on Windows because some symbols were not correctly flagged in libcrypto.num. Problem found due to the new symbol consistency test. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-22Fix the indentation of OPENSSL_NO_STDIO in pem.hMatt Caswell
Some pre-processor macros were incorrectly indented Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-22Fix no-cmac on Windows/VMSMatt Caswell
no-cmac was failing on Windows/VMS due to libcrypto.num not marking the CMAC functions properly. Found due to the new symbol consistency test. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-22Unified copyright for test recipesRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-22Add a best effort test to check shared library consistencyRichard Levitte
Our main development platforms are of the Unix family, which doesn't have the same strictness regarding a shared library being consistent with the contents of the ld script (.map file, on Linux and Solaris) as Windows is with the contents of the .def file or VMS is with the linker symb_vector option. To eliminate surprises, we therefore need to make sure to check that the contents of the .map file is matched with the shared library, at least to check that the shared library isn't missing any symbols that should be present. This test isn't absolutely perfect, as it will only check the symbols that would be present on Linux / Solaris and will therefore miss those that would only appear on Windows or VMS. On the other hand, those platform specific are few and far apart in time, so it's not likely they will pose a problem. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-21Fix CRYPTO_clear_realloc() bug.Dr. Stephen Henson
If allocation in CRYPTO_clear_realloc() fails don't free up the original buffer: this is consistent with the behaviour of realloc(3) and is expected in other places in OpenSSL. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-04-22Update the Configurations READMEsRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-04-21Fix no-ocsp on Windows (and probably VMS)Matt Caswell
The ocsp.h file did not have appropriate guards causing link failures on Windows. GH Issue 900 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-21Remove some unneccessary assignments to argcMatt Caswell
openssl.c and ts.c assign the value of opt_num_rest() to argc, but then only use the value once. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-21Remove some unused argc assignmentsMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-21Fix a missing return value check in v3_addrMatt Caswell
All other instances of extract_min_max are checked for an error return, except this one. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-21Add missing return value check in pkcs8 appMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-21Add missing return value checksMatt Caswell
Also correct the return value from the the "prime" application Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-21Fix missing break in option parsingMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-21Remove some dead codeMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-21Fix some code maintenance issuesMatt Caswell
Various instances of variables being written to, but then never read. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20BIO socket connect failure was not handled correctly.Davide Galassi
The state was always set to BIO_CONN_S_OK. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Fix missing IDEA renames (windows build)Michel
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Copyright consolidation scriptRich Salz
With Richard Levitte. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Travis: _srcdist, not _srcdirRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-20Fix no-ui on WindowsMatt Caswell
Ensure public functions have appropriate guards in header files. GH Issue 899 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Copyright consolidation; .pm and ConfigureRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Update copyright; generated files.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Remove --classic build entirelyRichard Levitte
The Unix build was the last to retain the classic build scheme. The new unified scheme has matured enough, even though some details may need polishing. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-20Fix no-sock on WindowsMatt Caswell
Link errors were occurring on Windows because the header files were not correctly guarding some functions with OPENSSL_NO_SOCK Reviewed-by: Rich Salz <rsalz@openssl.org>