aboutsummaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Templatize util/domdRich Salz2016-01-293-35/+26
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Merge error, wrong domd submitted.Rich Salz2016-01-291-1/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove clean-dependRich Salz2016-01-292-100/+14
| | | | | | | Remove depend hacks from demos/engines. Remove clean-depend; just call makedepend (or $CC -M) and use that. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove extraneous output from util/mk scriptsRich Salz2016-01-282-13/+9
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add CRYPTO_secure_zallocRich Salz2016-01-271-0/+1
| | | | | | Also turn B<foo> into foo() in the pod page. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Add SSL_up_ref() and SSL_CTX_up_ref()Matt Caswell2016-01-261-0/+2
| | | | | | | | The SSL and SSL_CTX structures are reference counted. However since libssl was made opaque there is no way for users of the library to manipulate the reference counts. This adds functions to enable that. Reviewed-by: Stephen Henson <steve@openssl.org>
* Remove dirs from mkfiles.plMatt Caswell2016-01-261-2/+0
| | | | | | | Recent changes have removed some directories which is causing mkfiles.pl to fail. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Generate warning textRichard Levitte2016-01-251-0/+16
| | | | | | | | | | | | | | Now that we're using templates, we should warn people not to edit the resulting file. We do it through util/dofile.pl, which is enhanced with an option to tell what file it was called from. We also change the calls so the template files are on the command line instead of being redirected through standard input. That way, we can display something like this (example taken from include/openssl/opensslconf.h): /* WARNING: do not edit! */ /* Generated by Configure from include/openssl/opensslconf.h.in */ Reviewed-by: Rich Salz <rsalz@openssl.org>
* Refactor file writing - Remake Makefile.org into a templateRichard Levitte2016-01-251-0/+1
| | | | | | | | | | | | | It is time for Makefile.org to fold into the new regime and have a run through util/dofile.pl. This forces some information out of there and into Configure, which isn't a bad thing, it makes Configure increasingly the center of build information, which is as it should be. A few extra defaults were needed in the BASE template to get rid of warnings about missing values. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Now that Configure doesn't produce tools/c_rehash, mk1mf has to do itRichard Levitte2016-01-254-7/+25
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Move pqueue into sslRich Salz2016-01-242-13/+12
| | | | | | | | | | | This is an internal facility, never documented, not for public consumption. Move it into ssl (where it's only used for DTLS). I also made the typedef's for pqueue and pitem follow our style: they name structures, not pointers. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove extra unused variable in util/dofile.plRichard Levitte2016-01-231-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Refactor file writing - Adapt util/mkdef.pl to use configdata.pmRichard Levitte2016-01-221-16/+5
| | | | | | | | | For this adaptation, the variables $options and $version needed to move to %config in Configure, and why not move all other variables holding diverse version numbers at the same time? Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Refactor file writing - adapt util/dofile.pl to use with_fallbackRichard Levitte2016-01-221-1/+7
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Refactor file writing - arrange for use of bundled Perl modules as fallbackRichard Levitte2016-01-221-0/+19
| | | | | | | | | | | | | | | | | For our own convenience, we need a mechanism to be able to fall back on bundled Perl modules. It's a minimal package that's called like this: use with_fallback qw(Module1 Module2 ...); For each module, it will try to require them from the system installation, and failing that, it will temporarly add external/perl and try to require transfer::{ModuleName}. It requires that each bundled Perl modules is accompanied by a small transfer module (external/perl/transfer/ModuleName.pm in our example) that knows exactly what to load. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Refactor file writing - introduce template driven file writingRichard Levitte2016-01-221-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apps/CA.pl and tools/c_rehash are built from template files. So far, this was done by Configure, which created its own problems as it forced everyone to reconfigure just because one of the template files had changed. Instead, have those files created as part of the normal build in apps/ and in tools/. Furthermore, this prepares for a future where Configure may produce entirely other build files than Makefile, and the latter can't be guaranteed to be the holder of all information for other scripts. Instead, configdata.pm (described below) becomes the center of configuration information. This introduces a few new things: %config a hash table to hold all kinds of configuration data that can be used by any other script. configdata.pm a perl module that Configure writes. It currently holds the hash tables %config and %target. util/dofile.pl a script that takes a template on STDIN and outputs the result after applying configuration data on it. It's supposed to be called like this: perl -I$(TOP) -Mconfigdata < template > result or perl -I$(TOP) -Mconfigdata templ1 templ2 ... > result Note: util/dofile.pl requires Text::Template. As part of this changed, remove a number of variables that are really just copies of entries in %target, and use %target directly. The exceptions are $target{cflags} and $target{lflags}, they do get copied to $cflags and $lflags. The reason for this is that those variable potentially go through a lot of changes and would rather deserve a place in %config. That, however, is for another commit. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Refresh the thinking of --prefix and --openssldirRichard Levitte2016-01-221-1/+1
| | | | | | | | | | | | | | | --prefix is now exclusively used for software and manual installation. --openssldir is not exclusively used as a default location for certs, keys and the default openssl.cnf. This change is made to bring clarity, to have the two less intertwined, and to be more compatible with the usual ways of software installation. Please change your habits and scripts to use --prefix rather than --openssldir for installation location now. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Remove the GOST engineMatt Caswell2016-01-192-2/+1
| | | | | | | | | | The GOST engine is now out of date and is removed by this commit. An up to date GOST engine is now being maintained in an external repository. See: https://wiki.openssl.org/index.php/Binaries Reviewed-by: Richard Levitte <levitte@openssl.org>
* prf redirection build fixesDr. Stephen Henson2016-01-191-0/+1
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Don't use "grep -q", "-q" is not POSIX, and fails on Solaris.Kristian Amlie2016-01-181-2/+2
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Accessor update; fix API, document one.Rich Salz2016-01-171-4/+4
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Add some accessors.Rich Salz2016-01-171-0/+5
| | | | | | | | | | | | | | | | | Author: Remi Gacogne <rgacogne-github@coredump.fr> GH334: Add an OCSP_SINGLERESP_get0_id() accessor to the OCSP_CERTID of a OCSP_SINGLERESP. It is possible to do it the other way around using OCSP_resp_find(), but this is more efficient when you have a tree indexed by OCSP_CERTID, like haproxy does. (This is also RT4251) Author: Marek Klein <kleinmrk@gmail.com> GH556: OCSP_resp_get_produced_at() accessor to the producedAt of a OCSP_BASICRESP GH555: TS_STATUS_INFO_get_status(), TS_STATUS_INFO_get_text() and TS_STATUS_INFO_get_failure_info() accessors for a TS_STATUS_INFO Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* fix no-engine buildDr. Stephen Henson2016-01-161-2/+2
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Avoid the r modifier for s/// (perl)Richard Levitte2016-01-141-1/+1
| | | | | | | | It seems that the r modifier for s/// is fairly new. It's reported not to exist in perl 5.10.1, so it's better to avoid it when possible. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Add a no-egd option to disable EGD-related codeBenjamin Kaduk2016-01-143-3/+7
| | | | | | | | The entropy-gathering daemon is used only on a small number of machines. Provide a configure knob so that EGD support can be disabled by default but re-enabled on those systems that do need it. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Make SSL_set_debug deprecated in 1.1Rich Salz2016-01-141-1/+1
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* RT4232: Extra space in help message.Rich Salz2016-01-141-1/+1
| | | | | | | | | It turns out that -pause calls the undocumented function SSL_set_debug. That just sets flag inside the SSL structure. That flag, despite the command is never used. So remove the flag, the field, and the function. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix verify(1) to report failure when verification failsViktor Dukhovni2016-01-131-10/+10
| | | | | | Regenerated expired test certificates, good for the next 100 years. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Reorder the ordinals in libeay.numRichard Levitte2016-01-131-7/+7
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Quick fix of debugging option for mk1mf.pl.Richard Levitte2016-01-131-2/+1
| | | | | | | | | util/mk1mf.pl was relying on the platform having the 'debug-' prefix for doing a debug build. Since the setup of targets has changed, this is no longer true. However, it can look for '--debug' in the command line options. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add CRYPTO_EX_DATA; remove EC_EXTRA_DATARich Salz2016-01-131-5/+9
| | | | | | | | | | | | Add CRYPTO_EX_DATA add EndC_KEY_[gs]et_method, From Roumen Petrov. Had to add various exdata calls to init/copy/free the exdata. Had to remove const from some EC functions because exdata isn't const-correct. :( Also remove EC_EXTRA_DATA and use a union to hold the possible pre-computed values and an enum to tell which value is in the union. (Rich Salz) Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* recognise no-crypto-mdebugDr. Stephen Henson2016-01-131-0/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* make updateRichard Levitte2016-01-121-3/+31
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Make sure to have both upper and mixed case symbols in SYMBOL_VECTORRichard Levitte2016-01-121-3/+8
| | | | | | | | | | | | | | It was assumed that the syntax FOO/Foo=PROCEDURE would create both an upper case and mixed case symbol in the GST. Not so, it requires having both FOO/Foo=PROCEDURE (to create the upper case alias) and Foo=PROCEDURE (to create the mixed case slot). We make sure that any symbol always occupies two slots (even those that don't exist) by filling up with SPARE when necessary. That will assure that any changes will still have the same symbols in the same slots no matter what (save a complete rewrite of the ordinals files). Reviewed-by: Rich Salz <rsalz@openssl.org>
* Use SPARE instead of PRIVATE_PROCEDURE to reserve unused SYMBOL_VECTOR slotsRichard Levitte2016-01-121-1/+1
| | | | | | | | It was assumed that a dummy with the type PRIVATE_PROCEDURE would simply occupy a slot but otherwise ignore the symbol. Not so, but there is SPARE for that purpose. Reviewed-by: Rich Salz <rsalz@openssl.org>
* The limit per SYMBOL_VECTOR isn't the amount of symbols, it's the line lengthRichard Levitte2016-01-121-14/+19
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* VMS INDENTIFICATION should only have the version numberRichard Levitte2016-01-121-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Have mkdef.pl use case sensitive symbols for shareable symbol vectorRichard Levitte2016-01-111-0/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* update ordinalsDr. Stephen Henson2016-01-111-0/+3
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove mkstack.pl: it is no longer needed.Dr. Stephen Henson2016-01-111-299/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_doall_arg inliningDr. Stephen Henson2016-01-111-2/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_doall inliningDr. Stephen Henson2016-01-111-1/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_new() inliningDr. Stephen Henson2016-01-111-1/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Inline LHASH_OFDr. Stephen Henson2016-01-111-13/+0
| | | | | | | | | | | Make LHASH_OF use static inline functions. Add new lh_get_down_load and lh_set_down_load functions and their typesafe inline equivalents. Make lh_error a function instead of a macro. Reviewed-by: Rich Salz <rsalz@openssl.org>
* GH540: add casts to safestack.hAlessandro Ghedini2016-01-111-4/+4
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Make SSL{_CTX,}_{get,set,clear}_options functionsViktor Dukhovni2016-01-111-0/+6
| | | | | | | These now take and return unsigned long, and get is constified. Updated related documentation and util/ssleay.num Reviewed-by: Matt Caswell <matt@openssl.org>
* Enable/disable crypto-mdebug just like other featuresViktor Dukhovni2016-01-113-3/+2
| | | | | | Also always abort() on leak failure. Reviewed-by: Stephen Henson <steve@openssl.org>
* Disable some algorithms by defaultDr. Stephen Henson2016-01-111-0/+3
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Future-proof deprecated declartion parsingViktor Dukhovni2016-01-091-1/+2
| | | | | | | Support two-digest major/minor/micro numbers and die when the input fails to parse Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* RT41897: Add an CRYPTO_secure_actual_sizeRich Salz2016-01-091-0/+1
| | | | | | This is already documented, I just forgot to include the code :) Reviewed-by: Viktor Dukhovni <viktor@openssl.org>