summaryrefslogtreecommitdiffstats
path: root/apps/verify.c
AgeCommit message (Collapse)Author
2015-08-02Fix refactoring breakage.Ben Laurie
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-02don't reset return value to 0Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-08-02Add -Wconditional-uninitialized to clang strict warnings.Ben Laurie
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-07-14Can't use -trusted with -CA{path,file}Rich Salz
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-07-07Extend -show_chain option to verify to show more infoMatt Caswell
The -show_chain flag to the verify command line app shows information about the chain that has been built. This commit adds the text "untrusted" against those certificates that have been used from the untrusted list. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-07-07Add help text for some verify optionsMatt Caswell
Fills in the help text for a number of options to verify that were blank. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-02Standardize handling of #ifdef'd options.Rich Salz
Here are the "rules" for handling flags that depend on #ifdef: - Do not ifdef the enum. Only ifdef the OPTIONS table. All ifdef'd entries appear at the end; by convention "engine" is last. This ensures that at run-time, the flag will never be recognized/allowed. The next two bullets entries are for silencing compiler warnings: - In the while/switch parsing statement, use #ifdef for the body to disable it; leave the "case OPT_xxx:" and "break" statements outside the ifdef/ifndef. See ciphers.c for example. - If there are multiple options controlled by a single guard, OPT_FOO, OPT_BAR, etc., put a an #ifdef around the set, and then do "#else" and a series of case labels and a break. See OPENSSL_NO_AES in cms.c for example. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-29Restore module loadingRichard Levitte
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>
2015-05-11Use p==NULL not !p (in if statements, mainly)Rich Salz
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-04-30free NULL cleanup 5aRich Salz
Don't check for NULL before calling a free routine. This gets X509_.*free: x509_name_ex_free X509_policy_tree_free X509_VERIFY_PARAM_free X509_STORE_free X509_STORE_CTX_free X509_PKEY_free X509_OBJECT_free_contents X509_LOOKUP_free X509_INFO_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-29Remove needless bio_err argumentRich Salz
Many functions had a BIO* parameter, and it was always called with bio_err. Remove the param and just use bio_err. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-04-25fewer NO_ENGINE #ifdef'sRich Salz
Make setup_engine be a dummy if NO_ENGINE is enabled. The option is not enabled if NO_ENGINE is enabled, so the one "wasted" variable just sits there. Removes some variables and code. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-24Big apps cleanup (option-parsing, etc)Rich Salz
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>
2015-02-25Add -no_alt_chains option to apps to implement the newMatt Caswell
X509_V_FLAG_NO_ALT_CHAINS flag. Using this option means that when building certificate chains, the first chain found will be the one used. Without this flag, if the first chain found is not trusted then we will keep looking to see if we can build an alternative chain instead. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-12RT3548: Remove unsupported platformsRich Salz
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>
2014-06-19Document -trusted_first option in man pages and help.Hubert Kario
Add -trusted_first description to help messages and man pages of tools that deal with certificate verification.
2014-02-25Add -show_chain option to print out verified chain.Dr. Stephen Henson
2012-12-11Make openssl verify return errors.Ben Laurie
2012-12-06Add code to download CRLs based on CRLDP extension.Dr. Stephen Henson
Just a sample, real world applications would have to be cleverer.
2012-06-03Version skew reduction: trivia (I hope).Ben Laurie
2011-12-13Back out redundant verification time change.Ben Laurie
2011-12-13Make it possible to set a time for verification.Ben Laurie
2010-02-27oops, revert verify.c changeDr. Stephen Henson
2010-02-27Add Kerberos fix which was in 0.9.8-stable but never committed to HEAD andDr. Stephen Henson
1.0.0. Original fix was on 2007-Mar-09 and had the log message: "Fix kerberos ciphersuite bugs introduced with PR:1336."
2010-02-25allow setting of verify names in command line utilities and print out verify ↵Dr. Stephen Henson
names in verify utility
2009-10-31Add missing functions to allow access to newer X509_STORE_CTX statusDr. Stephen Henson
information. Add more informative message to verify callback to indicate when CRL path validation is taking place.
2009-10-31Add option to allow in-band CRL loading in verify utility. Add functionDr. Stephen Henson
load_crls and tidy up load_certs. Remove useless purpose variable from verify utility: now done with args_verify.
2009-10-18Use new X509_STORE_set_verify_cb function instead of old macro.Dr. Stephen Henson
2009-09-02Tidy up and fix verify callbacks to avoid structure dereference, use ofDr. Stephen Henson
obsolete functions and enhance to handle new conditions such as policy printing.
2009-01-07Updatde from stable branch.Dr. Stephen Henson
2004-11-29Make an explicit check during certificate validation to see that theRichard Levitte
CA setting in each certificate on the chain is correct. As a side- effect always do the following basic checks on extensions, not just when there's an associated purpose to the check: - if there is an unhandled critical extension (unless the user has chosen to ignore this fault) - if the path length has been exceeded (if one is set at all) - that certain extensions fit the associated purpose (if one has been given)
2004-09-07Reformat smime utility.Dr. Stephen Henson
Add support for policy checking in verify utility.
2003-01-30Add the possibility to build without the ENGINE framework.Richard Levitte
PR: 287
2002-12-03EXIT() may mean return(). That's confusing, so let's have it really meanRichard Levitte
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)
2002-11-13Security fixes brought forward from 0.9.7.Ben Laurie
2002-02-22Config code updates.Dr. Stephen Henson
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.
2001-10-21Reject certificates with unhandled critical extensions.Dr. Stephen Henson
2001-09-12Reduce the header dependencies on engine.h in apps/.Geoff Thorpe
2001-09-01Make the necessary changes to work with the recent "ex_data" overhaul.Geoff Thorpe
See the commit log message for that for more information. NB: X509_STORE_CTX's use of "ex_data" support was actually misimplemented (initialisation by "memset" won't/can't/doesn't work). This fixes that but requires that X509_STORE_CTX_init() be able to handle errors - so its prototype has been changed to return 'int' rather than 'void'. All uses of that function throughout the source code have been tracked down and adjusted.
2001-06-25Make better use of load_cert, load_certs and load_key.Richard Levitte
2001-06-18Provide an application-common setup function for engines and use itRichard Levitte
everywhere.
2001-05-09Allow various X509_STORE_CTX properties to beDr. Stephen Henson
inherited from X509_STORE. Add CRL checking options to other applications.
2001-05-07Initial CRL based revocation checking.Dr. Stephen Henson
2000-10-26Merge the engine branch into the main trunk. All conflicts resolved.Richard Levitte
At the same time, add VMS support for Rijndael.
2000-09-08Update verify docs.Dr. Stephen Henson
New option to verify program to print out diagnostics.
2000-09-05*BIG* verify code reorganisation.Dr. Stephen Henson
The old code was painfully primitive and couldn't handle distinct certificates using the same subject name. The new code performs several tests on a candidate issuer certificate based on certificate extensions. It also adds several callbacks to X509_VERIFY_CTX so its behaviour can be customised. Unfortunately some hackery was needed to persuade X509_STORE to tolerate this. This should go away when X509_STORE is replaced, sometime... This must have broken something though :-(
2000-07-15Document -purpose option in usage string.Bodo Möller
2000-02-26More get0 et al. changes. Also provide fgrep targets in CHANGESBodo Möller
where the new functions are mentioned.
2000-02-26Rename functions for new convention.Dr. Stephen Henson