summaryrefslogtreecommitdiff
path: root/apps
Commit message (Collapse)AuthorAgeFilesLines
* GH1123: sort dir before rehashRich Salz2016-06-021-3/+25
| | | | | | This is needed to generate stable output names/symlinks. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Build the 'openssl rehash' command on VMS version 8.3 and upRichard Levitte2016-06-021-2/+6
| | | | | | | Include a note in INSTALL that tests must be run from an unprivileged process. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix memory leak in crl2pkcs7 appMatt Caswell2016-06-011-2/+1
| | | | | | The crl2pkcs7 app leaks a stack of OPENSSL_STRINGs in error paths. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Free a temporary buffer used by dsaparam applicationMatt Caswell2016-06-011-0/+1
| | | | | | | The dsaparam application allocates a temporary buffer but then doesn't free it. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Free memory on error in cms appMatt Caswell2016-06-011-1/+2
| | | | | | | The make_receipt_request() function in the cms app can leak memory on an error condition. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add final(?) set of copyrights.Rich Salz2016-06-011-4/+9
| | | | | | | | | Add copyright to missing assembler files. Add copyrights to missing test/* files. Add copyrights Various source and misc files. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix some RAND bugsRich Salz2016-06-011-6/+10
| | | | | | | | RT2630 -- segfault for int overlow RT2877 -- check return values in apps/rand Update CHANGES file for previous "windows rand" changes. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Ensure an ASN1_OBJECT is freed in error pathsMatt Caswell2016-06-011-1/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Free allocated password strings on exitMatt Caswell2016-06-011-0/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Free a BIO_ADDR if DTLSv1_listen return <=0Matt Caswell2016-06-011-0/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Ensure BIGNUM is freed in an error pathMatt Caswell2016-06-011-2/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Free an X509_CRL in an error pathMatt Caswell2016-06-011-1/+3
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Don't leak X509_OBJECT in an error pathMatt Caswell2016-06-011-3/+3
| | | | | | Swap the ordering of some code to avoid a leak in an error path. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add dhparam sanity check and update DH_check documentationMatt Caswell2016-06-011-5/+20
| | | | | | | | | | | | | The -check argument to dhparam should never identify any problems if we have just generated the parameters. Add a sanity check for this and print an error and fail if necessary. Also updates the documentation for the -check argument, and the DH_check() function. RT#4244 Reviewed-by: Richard Levitte <levitte@openssl.org>
* req command incorrectly displays the bits for an EC keyMatt Caswell2016-06-011-2/+6
| | | | | | | | | | | | | | When the "req" command is used to generate a new EC key using the -newkey option it will incorrectly display: Generating a 2048 bit EC private key This commit fixes the message to not display the bit length for EC keys because we don't currently support getting that during generation. GitHub Issue #1068 Reviewed-by: Richard Levitte <levitte@openssl.org>
* speed.c: fix segfault with unrecognized algorithmsCristian Stoica2016-05-311-1/+5
| | | | | | | | | | | | | | When an unrecognized algorithm is given on command line together with -async_jobs, speed_main will jump to clean-up and run ASYNC_cleanup_thread without calling ASYNC_init_thread first. Example: openssl speed -async_jobs 4 ras2048 Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1084)
* remove winrand.c entirely, nothing seems to reference itJoey Yandle2016-05-291-92/+0
| | | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
* cherry pick pr-512 changesJoey Yandle2016-05-291-8/+0
| | | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
* cherry pick pr-512 changesJoey Yandle2016-05-291-4/+0
| | | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
* Fix intermittent windows failures in TLSProxy testsMatt Caswell2016-05-271-0/+10
| | | | | | | | | | | | | | | | | | When closing down the socket in s_client Windows will close it immediately even if there is data in the write buffer still waiting to be sent. This was causing tests to fail in Msys/Mingw builds because TLSProxy doesn't see the final CloseNotify. I have experimented with various ways of doing this "properly" (e.g. shutting down the socket before closing, setting SO_LINGER etc). I can't seem to find the "magic" formula that will make Windows do this. Inserting a short 50ms sleep seems to do the trick...but its not very "nice" so I've inserted a TODO on this item. Perhaps someone else will have better luck in figuring this out. RT#4255 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix s_client/s_server waiting for stdin on WindowsMatt Caswell2016-05-274-23/+40
| | | | | | | | | | | | | | On Windows we were using the function _kbhit() to determine whether there was input waiting in stdin for us to read. Actually all this does is work out whether there is a keyboard press event waiting to be processed in the input buffer. This only seems to work in a standard Windows console (not Msys console) and also doesn't work if you redirect the input from some other source (as we do in TLSProxy tests). This commit changes things to work differently depending on whether we are on the Windows console or not. RT#4255 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix some s_server issues on WindowsMatt Caswell2016-05-271-1/+14
| | | | | | | | | | | | | | | | | In s_server we call BIO_sock_should_retry() to determine the state of the socket and work out whether we should retry an operation on it or not. However if you leave it too long to call this then other operations may have occurred in the meantime which affect the result. Therefore we should call it early and remember the result for when we need to use it. This fixes a test problem on Windows. Another issue with s_server on Windows is that some of output to stdout does not get displayed immediately. Apparently more liberal use of BIO_flush is required. RT#4255 Reviewed-by: Richard Levitte <levitte@openssl.org>
* build.info files: add quotes around any spec that may contain spacesRichard Levitte2016-05-251-1/+1
| | | | | | RT#4492 Reviewed-by: Tim Hudson <tjh@openssl.org>
* Make sure tsget and c_rehash are named with .pl suffix on Windows and VMSRichard Levitte2016-05-231-3/+5
| | | | | | | | Especially on Windows, the .pl suffix is associated with the perl interpreter, and therefore make those scripts usable as commands of their own. On VMS, it simply looks better. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Make sure to initialize all CA.pl variables properlyRichard Levitte2016-05-231-2/+2
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Support -no-CAfile -no-CApath in ctx2Dr. Stephen Henson2016-05-231-2/+3
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Support for traditional format private keys.Dr. Stephen Henson2016-05-232-10/+29
| | | | | | | | Add new function PEM_write_bio_PrivateKey_traditional() to enforce the use of legacy "traditional" private key format. Add -traditional option to pkcs8 and pkey utilities. Reviewed-by: Matt Caswell <matt@openssl.org>
* Indent and dead code cleanupFdaSilvaYY2016-05-212-44/+43
| | | | | | | tofree pointer is no more used... Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1103)
* Rename lh_xxx,sk_xxx tp OPENSSL_{LH,SK}_xxxRich Salz2016-05-202-3/+3
| | | | | | | | | | | | Rename sk_xxx to OPENSSL_sk_xxx and _STACK to OPENSSL_STACK Rename lh_xxx API to OPENSSL_LH_xxx and LHASH_NODE to OPENSSL_LH_NODE Make lhash stuff opaque. Use typedefs for function pointers; makes the code simpler. Remove CHECKED_xxx macros. Add documentation; remove old X509-oriented doc. Add API-compat names for entire old API Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Fixup READLINE caseRichard Levitte2016-05-201-1/+1
| | | | | | | RT#4543 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org>
* Use correct EOL in headers.Dr. Stephen Henson2016-05-192-6/+10
| | | | | | RT#1817 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Check that the obtained public key is validMatt Caswell2016-05-191-0/+4
| | | | | | | | | In the X509 app check that the obtained public key is valid before we attempt to use it. Issue reported by Yuan Jochen Kang. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Make it possible to have RFC2254 escapes with ASN1_STRING_print_ex()Richard Levitte2016-05-181-0/+1
| | | | | | | | Also adds 'esc_2254' to the possible command line name options RT#1466 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix ts app help messageFdaSilvaYY2016-05-181-2/+2
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Locally declare some variablesFdaSilvaYY2016-05-182-6/+5
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Few cleanups in s_client, s_server apps.FdaSilvaYY2016-05-183-36/+26
| | | | | | | | | Discard useless static engine_id Add a const qualifier Fix some spelling Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* X509_STORE_CTX accessors.Rich Salz2016-05-172-4/+4
| | | | | | | Add some functions that were missing when a number of X509 objects became opaque (thanks, Roumen!) Reviewed-by: Richard Levitte <levitte@openssl.org>
* Copyright consolidation 01/10Rich Salz2016-05-1758-3766/+342
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Fix typos in apps/enc.cKurt Cancemi2016-05-171-2/+2
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Use OPENSSL_hexchar2intRich Salz2016-05-161-7/+4
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Use app_malloc; two missing cases.Rich Salz2016-05-162-2/+2
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Don't load same config file twice.Dr. Stephen Henson2016-05-164-4/+4
| | | | | | RT#4215 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix signer option and support format SMIME.Dr. Stephen Henson2016-05-134-10/+13
| | | | | | | | | | | | Fix -signer option in smime utility to output signer certificates when verifying. Add support for format SMIME for -inform and -outform with cms and smime utilities. PR#4215 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix uninitialized variableRich Salz2016-05-121-1/+1
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Correctly check for trailing digest options.Dr. Stephen Henson2016-05-121-1/+11
| | | | | | | | | | Multiple digest options to the ocsp utility are allowed: e.g. to use different digests for different certificate IDs. A digest option without a following certificate is however illegal. RT#4215 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Restore support for ENGINE format keys in apps.Dr. Stephen Henson2016-05-123-9/+22
| | | | | | RT#4207 Reviewed-by: Tim Hudson <tjh@openssl.org>
* Don't leak memory if realloc fails.Dr. Stephen Henson2016-05-122-9/+12
| | | | | | RT#4403 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Update pkcs8 defaults.Dr. Stephen Henson2016-05-111-2/+4
| | | | | | | | Update pkcs8 utility to use 256 bit AES using SHA256 by default. Update documentation. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Add -signcert to CA.pl usage message.Dr. Stephen Henson2016-05-111-1/+1
| | | | | | RT#4256 Reviewed-by: Matt Caswell <matt@openssl.org>
* Add a couple of checks to prime app.Dr. Stephen Henson2016-05-101-0/+8
| | | | | | RT#4402 Reviewed-by: Richard Levitte <levitte@openssl.org>