summaryrefslogtreecommitdiffstats
path: root/apps
AgeCommit message (Collapse)Author
2016-06-18Use a STACK_OF(OPENSSL_CSTRING) for const char * stacksMatt Caswell
Better than losing the const qualifier. RT4378 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-18Replace 4 casts with 1Matt Caswell
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>
2016-06-16Spelling fixesFdaSilvaYY
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1219)
2016-06-16Revert "RT4526: Call TerminateProcess, not ExitProcess"Matt Caswell
This reverts commit 9c1a9ccf65d0ea1912675d3a622fa8e51b524b9e. TerminateProcess is asynchronous, so the code as written in the above commit is not correct. It is also probably not needed in the speed case. Reverting in order to figure out the correct solution. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-15Deal with the consequences of constifying gettersRichard Levitte
Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-06-15RT4526: Call TerminateProcess, not ExitProcessRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-15Constify X509_TRUST_add method.FdaSilvaYY
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
2016-06-14Avoid a double-free in crl2pl7Matt Caswell
The variable |crtflst| could get double freed in an error path. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-14Add missing break statementMatt Caswell
The -psk option processing was falling through to the -srp option processing in the ciphers app. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-13RT3809: basicConstraints is criticalRich Salz
This is really a security bugfix, not enhancement any more. Everyone knows critical extensions. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-06-12Don't skip leading zeroes in PSK keys.Dr. Stephen Henson
Don't use BN_hex2bn() for PSK key conversion as the conversion to BN and back removes leading zeroes, use OPENSSL_hexstr2buf() instead. RT#4554 Reviewed-by: Matt Caswell <matt@openssl.org>
2016-06-12RT2759: Don't read TTY when already at EOF.John Denker
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-06-12Avoid memory leaks if options repeated.Rich Salz
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-06-10GH1183: Fix -unix and -connect, etc., overrideRich Salz
If a user specifies -unix, -6, etc., then the program tries to use the last one specified. This is confusing code and leads to scripting errors. Instead, allow only one type. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-06-02GH1123: sort dir before rehashRich Salz
This is needed to generate stable output names/symlinks. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-02Build the 'openssl rehash' command on VMS version 8.3 and upRichard Levitte
Include a note in INSTALL that tests must be run from an unprivileged process. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-01Fix memory leak in crl2pkcs7 appMatt Caswell
The crl2pkcs7 app leaks a stack of OPENSSL_STRINGs in error paths. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Free a temporary buffer used by dsaparam applicationMatt Caswell
The dsaparam application allocates a temporary buffer but then doesn't free it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Free memory on error in cms appMatt Caswell
The make_receipt_request() function in the cms app can leak memory on an error condition. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Add final(?) set of copyrights.Rich Salz
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>
2016-06-01Fix some RAND bugsRich Salz
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>
2016-06-01Ensure an ASN1_OBJECT is freed in error pathsMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Free allocated password strings on exitMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Free a BIO_ADDR if DTLSv1_listen return <=0Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Ensure BIGNUM is freed in an error pathMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Free an X509_CRL in an error pathMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Don't leak X509_OBJECT in an error pathMatt Caswell
Swap the ordering of some code to avoid a leak in an error path. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-01Add dhparam sanity check and update DH_check documentationMatt Caswell
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>
2016-06-01req command incorrectly displays the bits for an EC keyMatt Caswell
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>
2016-05-31speed.c: fix segfault with unrecognized algorithmsCristian Stoica
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)
2016-05-29remove winrand.c entirely, nothing seems to reference itJoey Yandle
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)
2016-05-29cherry pick pr-512 changesJoey Yandle
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)
2016-05-29cherry pick pr-512 changesJoey Yandle
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)
2016-05-27Fix intermittent windows failures in TLSProxy testsMatt Caswell
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>
2016-05-27Fix s_client/s_server waiting for stdin on WindowsMatt Caswell
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>
2016-05-27Fix some s_server issues on WindowsMatt Caswell
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>
2016-05-25build.info files: add quotes around any spec that may contain spacesRichard Levitte
RT#4492 Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-05-23Make sure tsget and c_rehash are named with .pl suffix on Windows and VMSRichard Levitte
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>
2016-05-23Make sure to initialize all CA.pl variables properlyRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Support -no-CAfile -no-CApath in ctx2Dr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-05-23Support for traditional format private keys.Dr. Stephen Henson
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>
2016-05-21Indent and dead code cleanupFdaSilvaYY
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)
2016-05-20Rename lh_xxx,sk_xxx tp OPENSSL_{LH,SK}_xxxRich Salz
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>
2016-05-20Fixup READLINE caseRichard Levitte
RT#4543 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-19Use correct EOL in headers.Dr. Stephen Henson
RT#1817 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-19Check that the obtained public key is validMatt Caswell
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>
2016-05-18Make it possible to have RFC2254 escapes with ASN1_STRING_print_ex()Richard Levitte
Also adds 'esc_2254' to the possible command line name options RT#1466 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-18Fix ts app help messageFdaSilvaYY
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-18Locally declare some variablesFdaSilvaYY
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-18Few cleanups in s_client, s_server apps.FdaSilvaYY
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>