aboutsummaryrefslogtreecommitdiffstats
path: root/apps
Commit message (Collapse)AuthorAgeFilesLines
* Refactor file writing - introduce template driven file writingRichard Levitte2016-01-222-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix quoting error in SRP printfAndy Isaacson2016-01-221-1/+1
| | | | | | | | The code is trying to interpolate the value of the BASE_SECTION macro, but due to excess escaping, it instead prints the string "BASE_SECTION". Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Multiple -trusted/-untrusted/-CRLfile options in verifyViktor Dukhovni2016-01-201-22/+16
| | | | | | | | | | | | | | It is sometimes useful (especially in automated tests) to supply multiple trusted or untrusted certificates via separate files rather than have to prepare a single file containing them all. To that end, change verify(1) to accept these options zero or more times. Also automatically set -no-CAfile and -no-CApath when -trusted is specified. Improve verify(1) documentation, which could still use some work. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Refactor apps load_certs/load_crls to work incrementallyViktor Dukhovni2016-01-2010-64/+45
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove update tagsRich Salz2016-01-201-3/+1
| | | | | Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Consolidate "make update"Rich Salz2016-01-201-1/+1
| | | | | | Rename 'update' to 'generate'. Rather than recurse, just explicitly call the three generate targets directly. Reviewed-by: Richard Levitte <levitte@openssl.org>
* make EVP_PKEY opaqueDr. Stephen Henson2016-01-202-5/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Support disabling any or all TLS or DTLS versionsViktor Dukhovni2016-01-194-45/+110
| | | | | | | | | | | | | | | Some users want to disable SSL 3.0/TLS 1.0/TLS 1.1, and enable just TLS 1.2. In the future they might want to disable TLS 1.2 and enable just TLS 1.3, ... This commit makes it possible to disable any or all of the TLS or DTLS protocols. It also considerably simplifies the SSL/TLS tests, by auto-generating the min/max version tests based on the set of supported protocols (425 explicitly written out tests got replaced by two loops that generate all 425 tests if all protocols are enabled, fewer otherwise). Reviewed-by: Richard Levitte <levitte@openssl.org>
* Use POSIX functions on Cygwin, not Win32 functionCorinna Vinschen2016-01-181-9/+1
| | | | | | | Signed-off-by: Corinna Vinschen <vinschen@redhat.com> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove some old makefile targetsRich Salz2016-01-171-12/+0
| | | | | | | | Remove lint, tags, dclean, tests. This is prep for a new makedepend scheme. This is temporary pending unified makefile, and might help it. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add a no-egd option to disable EGD-related codeBenjamin Kaduk2016-01-141-0/+6
| | | | | | | | 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>
* RT4232: Extra space in help message.Rich Salz2016-01-142-14/+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>
* VMS open() doesn't take O_BINARY, but takes a context descriptionRichard Levitte2016-01-141-1/+11
| | | | | | | | Tell open() O_BINARY on VMS doesn't make sense, as it's possible to use more precise file attributes. However, if we're still going to fdopen() it in binary mode, we must set the fd in binary context. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Rename binmode into textmode and use it correctlyRichard Levitte2016-01-141-4/+4
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* To avoid possible time_t overflow use X509_time_adj_ex()Dr. Stephen Henson2016-01-142-3/+2
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix verify(1) to report failure when verification failsViktor Dukhovni2016-01-137-103/+113
| | | | | | Regenerated expired test certificates, good for the next 100 years. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* For stro[ui]max require both C99 and UINTMAX_MAX/INTMAX_MAXViktor Dukhovni2016-01-132-3/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* For stroimax need C99 inttypes.hViktor Dukhovni2016-01-132-3/+3
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Don't return from main(), use EXIT() insteadRichard Levitte2016-01-131-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* VMS will downcase all command parameters unless they're quotedRichard Levitte2016-01-131-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Maximize time_t when intmax_t is availableViktor Dukhovni2016-01-122-12/+103
| | | | | | | Well, I'm not actually changing time_t, just changing how time_t valued opt values are converted from string to time_t. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Move Makefiles to Makefile.inRich Salz2016-01-122-1108/+154
| | | | | | | | | | Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Adapt all EVP_CIPHER users for it becoming opaqueRichard Levitte2016-01-122-7/+7
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt all EVP_CIPHER_CTX users for it becoming opaqueRichard Levitte2016-01-121-21/+19
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT4227: Range-check in apps.Rich Salz2016-01-125-79/+67
| | | | | | | | Implement range-checking in all counts in apps. Turns out only a couple of cases were missing. And make the range-checking code more strict. Replace almost all opt_ulong() calls with opt_long() Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Yet another make update.Rich Salz2016-01-111-516/+647
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Use ossl_inline and DEFINE_LHASH_OFDr. Stephen Henson2016-01-112-2/+2
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_new() inliningDr. Stephen Henson2016-01-111-5/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Inline LHASH_OFDr. Stephen Henson2016-01-113-1/+4
| | | | | | | | | | | 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>
* Fix NSS format session outputMatt Caswell2016-01-111-2/+3
| | | | | | | | | | Commit 189ae368d91 (RT ticket 3352) provided the capability to output session key data in NSS format. The big apps cleanup broke that capability. This commit restores it. RT#4201 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Enable/disable crypto-mdebug just like other featuresViktor Dukhovni2016-01-111-1/+1
| | | | | | Also always abort() on leak failure. Reviewed-by: Stephen Henson <steve@openssl.org>
* Another portability fix.Rich Salz2016-01-081-1/+1
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Portability fix for apps/s_client.cRich Salz2016-01-081-13/+16
| | | | | | Make some local variables and a table of them be static. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* DANE s_client supportViktor Dukhovni2016-01-071-2/+222
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* mem functions cleanupRich Salz2016-01-071-10/+4
| | | | | | | | | | | | | | | | | Only two macros CRYPTO_MDEBUG and CRYPTO_MDEBUG_ABORT to control this. If CRYPTO_MDEBUG is not set, #ifdef out the whole debug machinery. (Thanks to Jakob Bohm for the suggestion!) Make the "change wrapper functions" be the only paradigm. Wrote documentation! Format the 'set func' functions so their paramlists are legible. Format some multi-line comments. Remove ability to get/set the "memory debug" functions at runtme. Remove MemCheck_* and CRYPTO_malloc_debug_init macros. Add CRYPTO_mem_debug(int flag) function. Add test/memleaktest. Rename CRYPTO_malloc_init to OPENSSL_malloc_init; remove needless calls. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix declarations and constification for inline stack.Dr. Stephen Henson2016-01-071-2/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove more (rest?) of FIPS build stuff.Rich Salz2016-01-064-41/+8
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Fix X509_STORE_CTX_cleanup()Viktor Dukhovni2016-01-031-26/+16
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Cleanup of verify(1) failure outputViktor Dukhovni2016-01-031-24/+27
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update to SHA256 for TSA signing digest.Rich Salz2015-12-301-1/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix faulty check in the VMS version of opt_prognameRichard Levitte2015-12-301-1/+1
| | | | Reviewed-by: Stephen Henson <steve@openssl.org>
* Fix some missing or faulty header file inclusionsRichard Levitte2015-12-301-0/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Refactor DTLS cookie generation and verificationRichard Levitte2015-12-231-66/+11
| | | | | | | | DTLS cookie generation and verification were exact copies of each other save the last few lines. This refactors them to avoid code copying. Reviewed-by: Matt Caswell <matt@openssl.org>
* Add ssl configuration support to s_server and s_clientDr. Stephen Henson2015-12-223-2/+31
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix no-dgram.Ben Laurie2015-12-161-2/+3
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Rename some BUF_xxx to OPENSSL_xxxRich Salz2015-12-1614-67/+50
| | | | | | | | | Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix s_server problem with no-ecMatt Caswell2015-12-154-28/+7
| | | | | | | | | | s_server was trying to set the ECDH curve when no-ec was defined. This also highlighted the fact that the -no_ecdhe option to s_server is broken, and doesn't make any sense any more (ECDHE is on by default and the only way it can be disabled is through the cipherstring). Therefore this commit removes the option. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Fix no-psk compile failureMatt Caswell2015-12-151-0/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* New function X509_get0_pubkeyDr. Stephen Henson2015-12-145-16/+8
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix option value parsing in crl2pkcs7 -certfileViktor Dukhovni2015-12-131-1/+1
| | | | Reviewed-by: Rich Saltz <rsalz@openssl.org>