summaryrefslogtreecommitdiffstats
path: root/apps/engine.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove useless codeAlessandro Ghedini2015-10-231-5/+0
| | | | | | | RT#4081 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Centralise loading default apps config fileMatt Caswell2015-10-121-3/+0
| | | | | | | | | | | | | | | | | Loading the config file after processing command line options can cause problems, e.g. where an engine provides new ciphers/digests these are not then recoginised on the command line. Move the default config file loading to before the command line option processing. Whilst we're doing this we might as well centralise this instead of doing it individually for each application. Finally if we do it before the OpenSSL_add_ssl_algorithms() call then ciphersuites provided by an engine (e.g. GOST) can be available to the apps. RT#4085 RT#4086 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Change the treatment of stdin and stdout to allow binary dataRichard Levitte2015-09-061-1/+1
| | | | | | | | | | | | | | If the output to stdout or the input from stdin is meant to be binary, it's deeply unsetting to get the occasional LF converted to CRLF or the other way around. If someone happens to forget to redirect stdin or stdout, they will get gibberish anyway, line ending conversion will not change that. Therefore, let's not have dup_bio_* decide unilaterally what mode the BIO derived from stdin and stdout, and rather let the app decide by declaring the intended format. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Restore module loadingRichard Levitte2015-05-291-0/+3
| | | | | | | The module loading feature got broken a while ago, so restore it, but have it a bit more explicit this time around. Reviewed-by: Stephen Henson <steve@openssl.org>
* free NULL cleanup -- codaRich Salz2015-05-011-2/+1
| | | | | | | | After the finale, the "real" final part. :) Do a recursive grep with "-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are an "if NULL" check that can be removed. Reviewed-by: Tim Hudson <tjh@openssl.org>
* free null cleanup finaleRich Salz2015-05-011-8/+4
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* In apps, malloc or dieRich Salz2015-04-301-7/+3
| | | | | | | | No point in proceeding if you're out of memory. So change *all* OPENSSL_malloc calls in apps to use the new routine which prints a message and exits. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Big apps cleanup (option-parsing, etc)Rich Salz2015-04-241-128/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is merges the old "rsalz-monolith" branch over to master. The biggest change is that option parsing switch from cascasding 'else if strcmp("-foo")' to a utility routine and somethin akin to getopt. Also, an error in the command line no longer prints the full summary; use -help (or --help :) for that. There have been many other changes and code-cleanup, see bullet list below. Special thanks to Matt for the long and detailed code review. TEMPORARY: For now, comment out CRYPTO_mem_leaks() at end of main Tickets closed: RT3515: Use 3DES in pkcs12 if built with no-rc2 RT1766: s_client -reconnect and -starttls broke RT2932: Catch write errors RT2604: port should be 'unsigned short' RT2983: total_bytes undeclared #ifdef RENEG RT1523: Add -nocert to fix output in x509 app RT3508: Remove unused variable introduced by b09eb24 RT3511: doc fix; req default serial is random RT1325,2973: Add more extensions to c_rehash RT2119,3407: Updated to dgst.pod RT2379: Additional typo fix RT2693: Extra include of string.h RT2880: HFS is case-insensitive filenames RT3246: req command prints version number wrong Other changes; incompatibilities marked with *: Add SCSV support Add -misalign to speed command Make dhparam, dsaparam, ecparam, x509 output C in proper style Make some internal ocsp.c functions void Only display cert usages with -help in verify Use global bio_err, remove "BIO*err" parameter from functions For filenames, - always means stdin (or stdout as appropriate) Add aliases for -des/aes "wrap" ciphers. *Remove support for IISSGC (server gated crypto) *The undocumented OCSP -header flag is now "-header name=value" *Documented the OCSP -header flag Reviewed-by: Matt Caswell <matt@openssl.org>
* free NULL cleanupRich Salz2015-03-251-2/+1
| | | | | | | This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free BIO_free BIO_free_all BIO_vfree Reviewed-by: Matt Caswell <matt@openssl.org>
* Dead code clean: #if 0 removal in appsRich Salz2015-01-301-3/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-458/+426
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3548: Remove unsupported platformsRich Salz2015-01-121-3/+0
| | | | | | | This last one for this ticket. Removes WIN16. So long, MS_CALLBACK and MS_FAR. We won't miss you. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update from 1.0.0-stableDr. Stephen Henson2009-07-271-20/+20
|
* Stop warning about use of *printf() without a format.Dr. Stephen Henson2009-02-151-2/+2
|
* Make no-engine work again.Dr. Stephen Henson2008-12-201-1/+1
|
* More type-checking.Ben Laurie2008-06-041-20/+22
|
* Add missing prototype. Extend engine utility to print public key algorithms.Dr. Stephen Henson2006-06-011-0/+10
|
* fix problems found by coverity: remove useless codeNils Larsch2006-03-151-5/+0
|
* improve command line argument checkingNils Larsch2005-05-101-0/+4
| | | | PR: 1061
* const fixesNils Larsch2005-04-081-1/+1
|
* some const fixesNils Larsch2005-04-051-1/+1
|
* Use BUF_strlcpy() instead of strcpy().Richard Levitte2003-12-271-2/+2
| | | | | | | Use BUF_strlcat() instead of strcat(). Use BIO_snprintf() instead of sprintf(). In some cases, keep better track of buffer lengths. This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
* Fix PEDANTIC stuff...Dr. Stephen Henson2003-03-131-7/+6
|
* Avoid warnings for no-engine and PEDANTICDr. Stephen Henson2003-03-121-0/+8
|
* Add the possibility to build without the ENGINE framework.Richard Levitte2003-01-301-0/+3
| | | | PR: 287
* "openssl engine" will not display ENGINE/DSO load failure errors whenGeoff Thorpe2003-01-301-4/+12
| | | | | testing availability of engines with "-t" - the old behaviour of is produced by increasing the feature's verbosity with "-tt".
* EXIT() may mean return(). That's confusing, so let's have it really meanRichard Levitte2002-12-031-1/+1
| | | | | | exit() in whatever way works for the intended platform, and define OPENSSL_EXIT() to have the old meaning (the name is of course because it's only used in the openssl program)
* Config code updates.Dr. Stephen Henson2002-02-221-0/+3
| | | | | | | | | | | | | | | | | | | CONF_modules_unload() now calls CONF_modules_finish() automatically. Default use of section openssl_conf moved to CONF_modules_load() Load config file in several openssl utilities. Most utilities now load modules from the config file, though in a few (such as version) this isn't done because it couldn't be used for anything. In the case of ca and req the config file used is the same as the utility itself: that is the -config command line option can be used to specify an alternative file.
* Change the order of events so the capabilities of loaded engines canRichard Levitte2001-11-141-6/+8
| | | | get listed as well.
* Make "openssl engine -c" list any supported digests as well as supportedGeoff Thorpe2001-10-011-4/+15
| | | | ciphers.
* Put the cipher info back into the "openssl engine" command.Geoff Thorpe2001-09-251-6/+7
|
* Make necessary tweaks to apps/ files due to recent ENGINE surgery. SeeGeoff Thorpe2001-09-251-0/+4
| | | | crypto/engine/README for details.
* Add first cut symmetric crypto support.Ben Laurie2001-08-181-1/+9
|
* Use apps_shutdown() in all applications, in case someone decides notRichard Levitte2001-06-231-0/+1
| | | | | | | to go the monolith way (does anyone do that these days?). NOTE: a few applications are missing in this commit. I've a few more changes in them that I haven't tested yet.
* Modify "openssl engine" to handle and display internal controlRichard Levitte2001-06-201-52/+69
| | | | commands appropriately.
* Fix memory leaks.Dr. Stephen Henson2001-06-191-6/+9
|
* Win32 fixes:Dr. Stephen Henson2001-04-291-2/+2
| | | | | | define LLONG properly for VC++. stop compiler complaining about signed/unsigned mismatch in apps/engine.c
* Changes to "openssl engine" to support the new control command code inGeoff Thorpe2001-04-191-26/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ENGINE. * Extra verbosity can be added with more "v"'s, eg. '-vvv' gives information about input flags and descriptions for each control command in each ENGINE. Check the output of "openssl engine -vvv" for example. * '-pre <cmd>' and '-post <cmd>' can be used to invoke control commands on the specified ENGINE (or on all of them if no engine id is specified, although that usually gets pretty ugly). '-post' commands are only attempted if '-t' is specified and the engine successfully initialises. '-pre' commands are always attempted whether or not '-t' causes an initialisation to be tried afterwards. Multiple '-pre' and/or '-post' commands can be specified and they will be called in the order they occur on the command line. Parameterised commands (the normal case, there are currently no unparameterised ones) are split into command and argument via a separating colon. Eg. "openssl engine -pre SO_PATH:/lib/libdriver.so <id>" results in the call; ENGINE_ctrl_cmd_string(e, "SO_PATH", "/lib/libdriver.so", 0); Application code should similarly allow arbitrary name-value string pairs to be passed into ENGINEs in a manner matching that in apps/engine.c, either using the same colon-separated format, or entered as two distinct strings. Eg. as stored in a registry. The last parameter of ENGINE_ctrl_cmd_string can be changed from 0 to 1 if the command should only be attempted if it's supported by the specified ENGINE (eg. for commands like "FORK_CHECK:1" that may or may not apply to the run-time ENGINE).
* Use new-style system-id macros everywhere possible. I hope I haven'tRichard Levitte2001-02-201-1/+1
| | | | | | | missed any. This compiles and runs on Linux, and external applications have no problems with it. The definite test will be to build this on VMS.
* Make all configuration macros available for application by makingRichard Levitte2001-02-191-1/+1
| | | | | | | | | | | | sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
* Various Win32 related fixed. Make no-krb5 work in mkdef.pl .Dr. Stephen Henson2001-02-091-1/+1
| | | | | | | | Fix warning in apps/engine.c Remove definitions of deleted functions. Add missing definition of X509_VAL.
* Make all engines available in the openssl application.Richard Levitte2000-11-061-5/+0
|
* Change the engine library so the application writer has to explicitelyRichard Levitte2000-11-021-0/+3
| | | | | | | | | | | | load the "external" built-in engines (those that require DSO). This makes linking with libdl or other dso libraries non-mandatory. Change 'openssl engine' accordingly. Change the engine header files so some declarations (that differed at that!) aren't duplicated, and make sure engine_int.h includes engine.h. That way, there should be no way of missing the needed info.
* 'openssl engine' can now list engine capabilities. The currentRichard Levitte2000-11-021-14/+63
| | | | | | | implementation is contained in the application, and the capability string building part should really be part of the engine library. This is therefore an experimental hack, and will be changed in the near future.
* Better error reporting in 'openssl engine'Richard Levitte2000-11-021-7/+4
|
* -t is supported, so display some help about it.Richard Levitte2000-11-021-1/+1
|
* Add application to enumerate, list and test engines with.Richard Levitte2000-11-011-0/+199