summaryrefslogtreecommitdiffstats
path: root/apps
AgeCommit message (Collapse)Author
2016-01-25Make sure apps/Makefile builds apps/CA.pl by defaultRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-22Refactor file writing - introduce template driven file writingRichard Levitte
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>
2016-01-22Fix quoting error in SRP printfAndy Isaacson
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>
2016-01-20Multiple -trusted/-untrusted/-CRLfile options in verifyViktor Dukhovni
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>
2016-01-20Refactor apps load_certs/load_crls to work incrementallyViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20Remove update tagsRich Salz
Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20Consolidate "make update"Rich Salz
Rename 'update' to 'generate'. Rather than recurse, just explicitly call the three generate targets directly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20make EVP_PKEY opaqueDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-19Support disabling any or all TLS or DTLS versionsViktor Dukhovni
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>
2016-01-18Use POSIX functions on Cygwin, not Win32 functionCorinna Vinschen
Signed-off-by: Corinna Vinschen <vinschen@redhat.com> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17Remove some old makefile targetsRich Salz
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>
2016-01-14Add a no-egd option to disable EGD-related codeBenjamin Kaduk
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>
2016-01-14RT4232: Extra space in help message.Rich Salz
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>
2016-01-14VMS open() doesn't take O_BINARY, but takes a context descriptionRichard Levitte
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>
2016-01-14Rename binmode into textmode and use it correctlyRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-14To avoid possible time_t overflow use X509_time_adj_ex()Dr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-13Fix verify(1) to report failure when verification failsViktor Dukhovni
Regenerated expired test certificates, good for the next 100 years. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-13For stro[ui]max require both C99 and UINTMAX_MAX/INTMAX_MAXViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-13For stroimax need C99 inttypes.hViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-13Don't return from main(), use EXIT() insteadRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-13VMS will downcase all command parameters unless they're quotedRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Maximize time_t when intmax_t is availableViktor Dukhovni
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>
2016-01-12Move Makefiles to Makefile.inRich Salz
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>
2016-01-12Adapt all EVP_CIPHER users for it becoming opaqueRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt all EVP_CIPHER_CTX users for it becoming opaqueRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12RT4227: Range-check in apps.Rich Salz
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>
2016-01-11Yet another make update.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-11Use ossl_inline and DEFINE_LHASH_OFDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Add lh_new() inliningDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Inline LHASH_OFDr. Stephen Henson
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>
2016-01-11Fix NSS format session outputMatt Caswell
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>
2016-01-11Enable/disable crypto-mdebug just like other featuresViktor Dukhovni
Also always abort() on leak failure. Reviewed-by: Stephen Henson <steve@openssl.org>
2016-01-08Another portability fix.Rich Salz
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-08Portability fix for apps/s_client.cRich Salz
Make some local variables and a table of them be static. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-07DANE s_client supportViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07mem functions cleanupRich Salz
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>
2016-01-07Fix declarations and constification for inline stack.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-06Remove more (rest?) of FIPS build stuff.Rich Salz
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-03Fix X509_STORE_CTX_cleanup()Viktor Dukhovni
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-03Cleanup of verify(1) failure outputViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-30Update to SHA256 for TSA signing digest.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-30Fix faulty check in the VMS version of opt_prognameRichard Levitte
Reviewed-by: Stephen Henson <steve@openssl.org>
2015-12-30Fix some missing or faulty header file inclusionsRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-23Refactor DTLS cookie generation and verificationRichard Levitte
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>
2015-12-22Add ssl configuration support to s_server and s_clientDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16Fix no-dgram.Ben Laurie
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-16Rename some BUF_xxx to OPENSSL_xxxRich Salz
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>
2015-12-15Fix s_server problem with no-ecMatt Caswell
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>
2015-12-15Fix no-psk compile failureMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-14New function X509_get0_pubkeyDr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>