aboutsummaryrefslogtreecommitdiffstats
path: root/apps
Commit message (Collapse)AuthorAgeFilesLines
* free NULL cleanup -- codaRich Salz2015-05-0118-115/+61
| | | | | | | | 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 11Rich Salz2015-05-012-4/+2
| | | | | | | | | | | | | | | | | | | Don't check for NULL before calling free functions. This gets: ERR_STATE_free ENGINE_free DSO_free CMAC_CTX_free COMP_CTX_free CONF_free NCONF_free NCONF_free_data _CONF_free_data A sk_free use within OBJ_sigid_free TS_TST_INFO_free (rest of TS_ API was okay) Doc update for UI_free (all uses were fine) X509V3_conf_free X509V3_section_free X509V3_string_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free null cleanup finaleRich Salz2015-05-0131-175/+81
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix some typo's, silence warnings.Rich Salz2015-05-011-1/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Rewrite CA.pl.inRich Salz2015-04-301-178/+169
| | | | | | | | | Reformat CA.pl.in to follow coding style. Also add "use strict" and "use warnings" Also modify it to exit properly and report only when succeeded. And some perl tweaks via Richard. Reviewed-by: Richard Levitte <levitte@openssl.org>
* free NULL cleanup 7Rich Salz2015-04-307-33/+18
| | | | | | | | | | | This gets BN_.*free: BN_BLINDING_free BN_CTX_free BN_FLG_FREE BN_GENCB_free BN_MONT_CTX_free BN_RECP_CTX_free BN_clear_free BN_free BUF_MEM_free Also fix a call to DSA_SIG_free to ccgost engine and remove some #ifdef'd dead code in engines/e_ubsec. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Sanity check EVP_CTRL_AEAD_TLS_AADMatt Caswell2015-04-301-2/+3
| | | | | | | | | | The various implementations of EVP_CTRL_AEAD_TLS_AAD expect a buffer of at least 13 bytes long. Add sanity checks to ensure that the length is at least that. Also add a new constant (EVP_AEAD_TLS1_AAD_LEN) to evp.h to represent this length. Thanks to Kevin Wojtysiak (Int3 Solutions) and Paramjot Oberoi (Int3 Solutions) for reporting this issue. Reviewed-by: Andy Polyakov <appro@openssl.org>
* free cleanup 12Rich Salz2015-04-302-8/+4
| | | | | | | | | Don't check for NULL before calling free function. This gets: NAME_CONSTRAINTS_free GENERAL_SUBTREE_free ECDSA_METHOD_free JPAKE_CTX_free OCSP_REQ_CTX_free SCT_free SRP_VBASE_free SRP_gN_free SRP_user_pwd_free TXT_DB_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* make updateMatt Caswell2015-04-301-105/+101
| | | | | | Run make update following previous header file changes. Reviewed-by: Rich Salz <rsalz@openssl.org>
* free cleanup almost the finaleRich Salz2015-04-304-26/+7
| | | | | | | | | | Add OPENSSL_clear_free which merges cleanse and free. (Names was picked to be similar to BN_clear_free, etc.) Removed OPENSSL_freeFunc macro. Fixed the small simple ones that are left: CRYPTO_free CRYPTO_free_locked OPENSSL_free_locked Reviewed-by: Richard Levitte <levitte@openssl.org>
* In apps, malloc or dieRich Salz2015-04-3024-310/+126
| | | | | | | | 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>
* free NULL cleanup 5aRich Salz2015-04-3010-81/+42
| | | | | | | | | 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>
* free NULL cleanup 8Rich Salz2015-04-303-15/+10
| | | | | | | | | | 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>
* Fix bug, "what mode" test was wrong.Rich Salz2015-04-301-1/+2
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix windows buildMatt Caswell2015-04-302-7/+7
| | | | | | | The big apps cleanup broke the windows build. This commit fixes some miscellaneous issues so that it builds again. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Add HTTP GET support to OCSP serverRich Salz2015-04-291-3/+48
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* Rewrite parse_nameRich Salz2015-04-292-109/+59
| | | | | | | Remove need for multiple arrays, parse the X509 name one RDN at a time. Thanks to Andy for careful review. Reviewed-by: Andy Polyakov <appro@openssl.org>
* use isxdigit and apps_tohexRich Salz2015-04-294-14/+46
| | | | | | Replace ad-hoc ascii->hex with isxdigit and new app_tohex. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Remove needless bio_err argumentRich Salz2015-04-2913-137/+136
| | | | | | | 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>
* remove malloc castsRich Salz2015-04-2814-34/+26
| | | | | | | Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
* CRYPTO_mem_leaks should ignore it's BIO argument.Rich Salz2015-04-271-2/+1
| | | | | | | CRYPTO_mem_leaks takes a BIO* argument. It's not a leak if that argument hasn't been free'd. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix Wmaybe-uninitialized: initialize variableEmilia Kasper2015-04-271-1/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add readline (etc) supportRich Salz2015-04-261-2/+30
| | | | | | Compile with -DREADLINE and the appropriate library. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Simplify parse_yesno; remove local variableRich Salz2015-04-261-9/+3
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix typo in help & comment formattingRich Salz2015-04-261-4/+4
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix error messageRich Salz2015-04-261-1/+1
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix main build breakage.Rich Salz2015-04-262-4/+6
| | | | | | | | | A variable declaration got dropped during a merge. And if a compiler inlines strcmp() and you put a strcmp in an assert message, the resultant stringification exceeds ANSI string limits. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Remove the special list-xxxx commandsRich Salz2015-04-261-77/+45
| | | | | | | | There's a new "list" command, which takes a flag to say what to list. Removing the old hacky commands. Re-ordered some functions to remove some needless declarations. Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT2962: add -keytab and -krb5svc flags.Rich Salz2015-04-251-1/+12
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Free malloc data on encoding errors.Rich Salz2015-04-251-5/+7
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Quote HTML entities in s_server outputRich Salz2015-04-251-1/+16
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT2206: Add -issuer flag to ocsp commandRich Salz2015-04-251-1/+17
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove EFENCE support.Rich Salz2015-04-252-24/+0
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT2451: Add telnet to s_client -starttlsRich Salz2015-04-251-5/+45
| | | | | | Also add -xmpphost and -smtphost flags. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add -nocommands to s_client.Rich Salz2015-04-251-5/+9
| | | | | | Add flag to disable the 'command letters' from s_client. Reviewed-by: Richard Levitte <levitte@openssl.org>
* fewer NO_ENGINE #ifdef'sRich Salz2015-04-2531-218/+88
| | | | | | | | 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>
* Add missing BIO_flush() callsRich Salz2015-04-251-0/+3
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Big apps cleanup (option-parsing, etc)Rich Salz2015-04-2461-13136/+10747
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove SET oid config file and SET certsRich Salz2015-04-207-134/+0
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* Code style: space after 'if'Viktor Dukhovni2015-04-1610-36/+36
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* free NULL cleanup 9Rich Salz2015-04-114-11/+5
| | | | | | | | | | | | Ongoing work to skip NULL check before calling free routine. This gets: ecp_nistz256_pre_comp_free nistp224_pre_comp_free nistp256_pre_comp_free nistp521_pre_comp_free PKCS7_free PKCS7_RECIP_INFO_free PKCS7_SIGNER_INFO_free sk_PKCS7_pop_free PKCS8_PRIV_KEY_INFO_free PKCS12_free PKCS12_SAFEBAG_free PKCS12_free sk_PKCS12_SAFEBAG_pop_free SSL_CONF_CTX_free SSL_CTX_free SSL_SESSION_free SSL_free ssl_cert_free ssl_sess_cert_free Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* free NULL cleanup 10Rich Salz2015-04-115-22/+11
| | | | | | | | | | Avoid checking for NULL before calling free functions. This gets ssl.*free: ssl_sess_cert_free ssl_free ssl_excert_free ssl_cert_free SSL_free SSL_SRP_CTX_free SSL_SESSION_free SSL_CTX_free SSL_CTX_SRP_CTX_free SSL_CONF_CTX_free Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Drop CA.sh for CA.plRich Salz2015-04-082-199/+1
| | | | | | Remove CA.sh script and use CA.pl for testing, etc. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevantRichard Levitte2015-03-311-6/+2
| | | | | | | | | | | | With no more symlinks, there's no need for those variables, or the links target. This also goes for all install: and uninstall: targets that do nothing but copy $(EXHEADER) files, since that's now taken care of by the top Makefile. Also, removed METHTEST from test/Makefile. It looks like an old test that's forgotten... Reviewed-by: Rich Salz <rsalz@openssl.org>
* free NULL cleanupRich Salz2015-03-288-29/+15
| | | | | | | | | EVP_.*free; this gets: EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* free NULL cleanup.Rich Salz2015-03-253-10/+5
| | | | | | | This gets EC_GROUP_clear_free EC_GROUP_free, EC_KEY_free, EC_POINT_clear_free, EC_POINT_free Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* free NULL cleanupRich Salz2015-03-2529-124/+62
| | | | | | | 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>
* make X509_NAME opaqueDr. Stephen Henson2015-03-251-1/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix bug in s_client. Previously default verify locations would only be loadedMatt Caswell2015-03-251-6/+5
| | | | | | if CAfile or CApath were also supplied and successfully loaded first. Reviewed-by: Richard Levitte <levitte@openssl.org>
* RAND_bytes updatesMatt Caswell2015-03-255-7/+8
| | | | | | | Ensure RAND_bytes return value is checked correctly, and that we no longer use RAND_pseudo_bytes. Reviewed-by: Richard Levitte <levitte@openssl.org>