summaryrefslogtreecommitdiffstats
path: root/apps/smime.c
AgeCommit message (Collapse)Author
2016-02-22Remove unused parameters from internal functionsRich Salz
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>
2015-10-12Centralise loading default apps config fileMatt Caswell
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>
2015-09-25Add support for -no-CApath and -no-CAfile optionsMatt Caswell
For those command line options that take the verification options -CApath and -CAfile, if those options are absent then the default path or file is used instead. It is not currently possible to specify *no* path or file at all. This change adds the options -no-CApath and -no-CAfile to specify that the default locations should not be used to all relevant applications. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-09-06Change the way apps open their input and output filesRichard Levitte
The different apps had the liberty to decide whether they would open their input and output files in binary mode or not, which could be confusing if two different apps were handling the same type of file in different ways. The solution is to centralise the decision of low level file organisation, and that the apps would use a selection of formats to state the intent of the file. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-06Make the handling of output and input formats consistentRichard Levitte
Most of all, we needed to sort out which ones are binary and which ones are text, and make sure they are treated accordingly and consistently so Reviewed-by: Tim Hudson <tjh@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-05-01free NULL cleanup -- codaRich Salz
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>
2015-05-01free null cleanup finaleRich Salz
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@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-30Dead code clean: #if 0 removal in appsRich Salz
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@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-06-02Allow reordering of certificates when signing.Dr. Stephen Henson
Add certificates if -nocerts and -certfile specified when signing in smime application. This can be used this to specify the order certificates appear in the PKCS#7 structure: some broken applications require a certain ordering. PR#3316
2014-05-21Change default cipher in smime app to des3.Dr. Stephen Henson
PR#3357
2009-10-18Use new X509_STORE_set_verify_cb function instead of old macro.Dr. Stephen Henson
2009-07-27Update from 1.0.0-stableDr. Stephen Henson
2008-11-05Update obsolete email address...Dr. Stephen Henson
2008-06-04More type-checking.Ben Laurie
2007-05-10Improve error detection when streaming S/MIME.Dr. Stephen Henson
Only use streaming when appropriate for detached data in smime utility.
2007-04-23Add SEED encryption algorithm.Bodo Möller
PR: 1503 Submitted by: KISA Reviewed by: Bodo Moeller
2007-04-13Update smime utility to support streaming for -encrypt and -sign -nodetachDr. Stephen Henson
options. Add new streaming i2d (though strictly speaking it is BER format when streaming) and PEM functions. These all process content on the fly without storing it all in memory.
2006-07-13There is should be no need to rewind the input stream any more.Dr. Stephen Henson
For S/MIME multipart/signed type the signature is calculated on the fly. For other detached data forms the stream isn't used after the single pass to calculate signatures. For non-detached the data is stored in a memory BIO.
2006-06-09Camellia cipher, contributed by NTTBodo Möller
Submitted by: Masashi Fujita Reviewed by: Bodo Moeller
2006-05-25Allow any supported cipher to be used with smime -encrypt.Dr. Stephen Henson
2006-05-22Fix smime -pk7out.Dr. Stephen Henson
2006-05-18Add -resign and -md options to smime command to support resigning anDr. Stephen Henson
existing structure and using alternative digest for signing.
2006-05-18Multiple signer support in smime application.Dr. Stephen Henson
2006-05-18Reformat smime.c utility.Dr. Stephen Henson
2005-08-04Allow PKCS7_decrypt() to work if no cert supplied.Dr. Stephen Henson
2005-04-05some const fixesNils Larsch
2004-09-07Reformat smime utility.Dr. Stephen Henson
Add support for policy checking in verify utility.
2004-09-07Don't use 'explicit' for variable name.Dr. Stephen Henson
2004-09-07Reformat smime.cDr. Stephen Henson
2004-09-06New X509_VERIFY_PARAM structure and associated functionality.Dr. Stephen Henson
This tidies up verify parameters and adds support for integrated policy checking. Add support for policy related command line options. Currently only in smime application. WARNING: experimental code subject to change.
2003-06-01Various S/MIME bug and compatibility fixes.Dr. Stephen Henson
2003-02-25Fix indefinite length encoding so EOC correctly updatesDr. Stephen Henson
the buffer pointer. Rename PKCS7_PARTSIGN to PKCS7_STREAM. Guess what that's for :-)
2003-02-15Single pass processing to cleartext S/MIME signing.Dr. Stephen Henson
2003-01-30Add the possibility to build without the ENGINE framework.Richard Levitte
PR: 287
2002-08-01Make it possible to load keys from stdin, and restore thatRichard Levitte
functionality in the programs that had that before. Part fo PR 164
2002-07-18Reverse the change with the following log, it needs further investigation:Richard Levitte
Make S/MIME output conform with the mail and MIME standards. PR: 151
2002-07-18Make S/MIME output conform with the mail and MIME standards.Richard Levitte
PR: 151
2002-05-08Generate an error if rewinding wasn't possible.Richard Levitte
Notified by Ken Hirsch <kenhirsch@myself.com>. PR: 23
2002-05-01Add apps_startup and bio_err init code to smime.cDr. Stephen Henson
2002-04-09harmonize capitalizationBodo Möller