aboutsummaryrefslogtreecommitdiffstats
path: root/apps/asn1pars.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace 4 casts with 1Matt Caswell2016-06-181-6/+7
| | | | | | | | | Changing the type of the |str| variable in asn1pars enables us to remove 4 casts with just 1. This silences an OpenBSD warning along the way. RT4378 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Copyright consolidation 01/10Rich Salz2016-05-171-54/+6
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* GH932: Add more help messages to some apps options.FdaSilvaYY2016-05-041-1/+1
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Deprecate OBJ_cleanup() and make it a no-opMatt Caswell2016-04-131-1/+0
| | | | | | | | OBJ_cleanup() should not be called expicitly - we should leave auto-deinit to clean this up instead. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* argv was set but unusedKurt Roeckx2016-02-201-1/+2
| | | | | | | | Also gives an error message when you gave it a parameter it didn't expect. Reviewed-by: Rich Salz <rsalz@openssl.org> MR: #2009
* commands help cleanupA J Mohan Rao2016-02-061-1/+1
| | | | | | | | opt_valtype 0 is same as '-' while printing cmd usage asn1parse/ca/ciphers help cleanup Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@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>
* Don't try and parse boolean type.Dr. Stephen Henson2015-10-061-2/+2
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Change the way apps open their input and output filesRichard Levitte2015-09-061-3/+3
| | | | | | | | | | | | 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>
* Make the handling of output and input formats consistentRichard Levitte2015-09-061-1/+1
| | | | | | | | 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>
* fix asn1parse -informDr. Stephen Henson2015-05-291-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Restore module loadingRichard Levitte2015-05-291-1/+4
| | | | | | | 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>
* RT3876: Only load config when neededRich Salz2015-05-281-14/+2
| | | | | | | | Create app_load_config(), a routine to load config file. Remove the "always load config" from the main app. Change the places that used to load config to call the new common routine. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix uninitialized variable.Hanno Böck2015-05-021-1/+1
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* free NULL cleanup -- codaRich Salz2015-05-011-4/+2
| | | | | | | | 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-5/+3
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free NULL cleanup 8Rich Salz2015-04-301-2/+1
| | | | | | | | | | Do not check for NULL before calling a free routine. This addresses: ASN1_BIT_STRING_free ASN1_GENERALIZEDTIME_free ASN1_INTEGER_free ASN1_OBJECT_free ASN1_OCTET_STRING_free ASN1_PCTX_free ASN1_SCTX_free ASN1_STRING_clear_free ASN1_STRING_free ASN1_TYPE_free ASN1_UTCTIME_free M_ASN1_free_of Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove needless bio_err argumentRich Salz2015-04-291-6/+6
| | | | | | | 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>
* Big apps cleanup (option-parsing, etc)Rich Salz2015-04-241-163/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+3
| | | | | | | 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>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-379/+362
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* mark all block comments that need format preserving so thatTim Hudson2014-12-301-1/+2
| | | | | | | indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Changed -strictpem to use PEM_read_bioMatt Caswell2014-05-261-55/+38
|
* Added -strictpem parameter to enable processing of PEM files with data prior ↵Matt Caswell2014-05-261-2/+44
| | | | to the BEGIN marker
* PR: 2527Dr. Stephen Henson2011-05-251-0/+1
| | | | | | | Submitted by: Marcus Meissner <meissner@suse.de> Reviewed by: steve Set cnf to NULL to avoid possible double free.
* Update from 1.0.0-stableDr. Stephen Henson2009-07-271-8/+8
|
* Update obsolete email address...Dr. Stephen Henson2008-11-051-1/+1
|
* More type-checking.Ben Laurie2008-06-041-8/+8
|
* asn1parse doesn't support any TXT format, so let's stop pretendingRichard Levitte2005-06-281-1/+1
| | | | it does.
* Don't try to parse non string types.Dr. Stephen Henson2004-07-011-0/+10
|
* Constify d2i, s2i, c2i and r2i functions and other associatedRichard Levitte2004-03-151-1/+3
| | | | | | | | functions and macros. This change has associated tags: LEVITTE_before_const and LEVITTE_after_const. Those will be removed when this change has been properly reviewed.
* minor signed/unsigned warning fixesGeoff Thorpe2004-02-101-1/+1
|
* Fix handling of -offset and -length in asn1parse tool.Dr. Stephen Henson2004-02-081-1/+9
| | | | | | | | If -offset exceeds -length of data available exit with an error. Don't read past end of total data available when -offset supplied. If -length exceeds total available truncate it.
* 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)
* Initial ASN1 generation code. This can constructDr. Stephen Henson2002-11-121-14/+101
| | | | | | arbitrary encodings from strings and config files. Documentation to follow...
* Remove the duplicate description of -out.Richard Levitte2002-05-301-2/+1
| | | | PR: 28
* 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.
* 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.
* 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.
* On VMS, stdout may very well lead to a file that is written to in aRichard Levitte2000-09-201-1/+7
| | | | | | | | | | | | | | | | | record-oriented fashion. That means that every write() will write a separate record, which will be read separately by the programs trying to read from it. This can be very confusing. The solution is to put a BIO filter in the way that will buffer text until a linefeed is reached, and then write everything a line at a time, so every record written will be an actual line, not chunks of lines and not (usually doesn't happen, but I've seen it once) several lines in one record. Voila, BIO_f_linebuffer() is born. Since we're so close to release time, I'm making this VMS-only for now, just to make sure no code is needlessly broken by this. After the release, this BIO method will be enabled on all other platforms as well.
* Add the possibility to get hexdumps of unprintable data when usingRichard Levitte2000-07-271-2/+15
| | | | | 'openssl asn1parse'. As a side effect, the functions ASN1_parse_dump and BIO_dump_indent are added.
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-1/+1
| | | | | | | | | like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
* Make gcc 2.95.2 happy again, even under ``-Wall -Wshadow -Wpointer-arith ↵Ralf S. Engelschall2000-02-111-0/+2
| | | | | | -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline''.
* ispell (and minor modifications)Ulf Möller2000-02-031-2/+2
|
* Fix for bug in pkcs12 program and typo in ASN1_tag2str().Dr. Stephen Henson1999-10-051-2/+6
|
* Various Win32 fixes. Change args in do_ms.bat to put platform last. FixDr. Stephen Henson1999-05-151-1/+1
| | | | | unsigned/signed cmp error in asn1parse. Change various pem_all.c args to use pem_password_cb.
* Add new -out option to asn1parse to allow the parsed data to be output.Dr. Stephen Henson1999-05-121-3/+29
| | | | | | Fixed -strparse option: it didn't work if used more than once (this was due to the d2i_ASN1_TYPE call parsing a freed buffer). On Win32 the file wincrypt.h #define's X509_NAME and PKCS7_SIGNER_INFO causing clashes so these are #undef'ed
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-231-4/+4
| | | | | | Submitted by: Reviewed by: PR:
* Change functions to ANSI C.Ulf Möller1999-04-191-3/+1
|
* Allow the -certfile argument to be used multiple times in crl2pkcs7.Dr. Stephen Henson1999-01-291-1/+1
| | | | Also fix typos in the usage messages: "inout" instead of "input".