aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-05-24Clean up RAND_bytes() callsTodd Short1-7/+2
When RAND_pseudo_bytes() was replaced with RAND_bytes(), this case was not reduced to a simple RAND_bytes() call. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1117)
2016-05-24Fix a mem leak on an error path in OBJ_NAME_add()Matt Caswell1-3/+4
If lh_OBJ_NAME_insert() fails then the allocated |onp| value is leaked. RT#2238 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-23Fix error return value in SRP functionsMatt Caswell1-8/+13
The functions SRP_Calc_client_key() and SRP_Calc_server_key() were incorrectly returning a valid pointer in the event of error. Issue reported by Yuan Jochen Kang Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-23Add error return for OPENSSL_INIT_set_config_filename()Matt Caswell3-10/+22
The OPENSSL_INIT_set_config_filename() function can fail so ensure that it provides a suitable error code. GitHub Issue #920 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Use strerror_r()/strerror_s() instead of strerror() where possibleMatt Caswell4-7/+37
The function strerror() is not thread safe. We should use strerror_r() where possible, or strerror_s() on Windows. RT#2267 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-23#4342: few missing malloc return checks and free in error pathsJ Mohan Rao Arisankala3-16/+41
ossl_hmac_cleanup, pkey_hmac_cleanup: - allow to invoke with NULL data - using EVP_PKEY_CTX_[get|set]_data EVP_DigestInit_ex: - remove additional check for ‘type’ and doing clear free instead of free Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Windows notes: add a few lines on gaining admin privs for installingRichard Levitte1-0/+6
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23VMS: show the ossl_dataroot logical as well when doing "mms debug_logicals"Richard Levitte1-3/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Install the scripts the same way on Windows and VMS as on UnixRichard Levitte2-6/+16
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Make sure tsget.pl and c_rehash.pl get installed on VMS and Windows.Richard Levitte3-4/+8
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Make sure tsget and c_rehash are named with .pl suffix on Windows and VMSRichard Levitte2-5/+10
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 Levitte1-2/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Add buf-freelists to deprecated optionsTodd Short1-0/+1
The buf-freelists option was removed in master. There may be some things that try to disable it, so don't error out. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Remove unused error/function codes.Rich Salz64-1268/+235
Add script to find unused err/reason codes Remove unused reason codes. Remove entries for unused functions Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Support -no-CAfile -no-CApath in ctx2Dr. Stephen Henson1-2/+3
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-05-23remove encrypt then mac ifdefsDr. Stephen Henson2-16/+0
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23VMS: remove last VAX vestigesRichard Levitte3-6474/+0
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23make updateDr. Stephen Henson1-0/+1
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Support for traditional format private keys.Dr. Stephen Henson7-52/+125
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-23Slight cleanup of the collection of READMEs, INSTALLs and NOTESRichard Levitte5-10/+14
README is a fairly independent document, and so is INSTALL. NOTES are merely addendums to INSTALL. Therefore , INSTALL.DJGPP and README.PERL get renamed to NOTES.DJGPP and NOTES.PERL. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Remove INSTALL.WCE and refs to it.Rich Salz4-99/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-23Add text/x509aux to gitignoreTodd Short1-0/+1
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Add checks on CRYPTO_set_ex_data return valueFdaSilvaYY3-10/+12
Fix possible leak in danetest.c Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Fix some malloc failure crashes on X509_STORE_CTX_set_ex_dataFdaSilvaYY1-1/+3
from BoringSSL 306ece31bcaaed49e0240a2e5555f8901ebb2d45 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Fix and simplify error handling in (RSA/EC_kmeth)_new_method()FdaSilvaYY2-42/+31
Inspired from PR #873. Nearly same as 2bbf0ba. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Remove useless NULL checksFdaSilvaYY3-6/+3
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Windows: shut DEL upRichard Levitte1-2/+2
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Complete the rename of LHASH functions and typesRichard Levitte1-1/+1
LHASH_NODE was used internally, which doesn't work when configured 'no-deprecated' Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23util/process_docs.pl: Add more debugging outputRichard Levitte1-1/+9
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Improve the checking of pod sectionsRichard Levitte1-2/+4
(i.e. remove some bugs) Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23HTML docs on Unix: Add a HTML titleRichard Levitte1-1/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23process_docs.pl: When starting to read a new head1 section, remove previous textRichard Levitte1-1/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Add a missing comma in OPENSSL_malloc.podRichard Levitte1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-23Add the missing NAME header in the OCSP docsRichard Levitte5-0/+10
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-22Avoid creating an illegal pointerKurt Roeckx1-2/+4
Found by tis-interpreter Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1106
2016-05-22Avoid creating an illegal pointerKurt Roeckx1-1/+5
Found by tis-interpreter Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1106
2016-05-22Have doc-nit-check look for mandatory manual sectionsRichard Levitte1-8/+32
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-21Constify stack and lhash macros.Dr. Stephen Henson4-15/+17
RT#4471 Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-05-21Indent and dead code cleanupFdaSilvaYY2-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)
2016-05-21Add OpenSSL copyright to .pl filesRich Salz134-137/+1070
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-20Doc nits cleanup, round 2Rich Salz430-1226/+231
Fix some code examples, trailing whitespace Fix TBA sections in verify, remove others. Remove empty sections Use Mixed Case not ALL CAPS in head2 Enhance doc-nits script. Remove extra =cut line Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-20Fix Windows 64 bit crashesMatt Caswell2-29/+5
The function InitOnceExceuteOnce is the best way to support the implementation of CRYPTO_THREAD_run_once() on Windows. Unfortunately WinXP doesn't have it. To get around that we had two different implementations: one for WinXP and one for later versions. Which one was used was based on the value of _WIN32_WINNT. This approach was starting to cause problems though because other parts of OpenSSL assume _WIN32_WINNT is going to be 0x0501 and crashes were occurring dependant on include file ordering. In addition a conditional based on _WIN32_WINNT had made its way into a public header file through commit 5c4328f. This is problematic because the value of this macro can vary between OpenSSL build time and application build time. The simplest solution to this mess is just to always use the WinXP version of CRYPTO_THREAD_run_once(). Its perhaps slightly sub-optimal but probably not noticably. GitHub Issue #1086 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-20Rename lh_xxx,sk_xxx tp OPENSSL_{LH,SK}_xxxRich Salz22-639/+623
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-20Clean up the VMS hacks in crypto/rand/randfile.cRichard Levitte1-16/+6
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-20VMS: setbuf() only takes 32-bit pointersRichard Levitte1-4/+40
Giving setbuf() a 64-bit pointer isn't faulty, as the argument is passed by a 64-bit register anyway, so you only get a warning (MAYLOSEDATA2) pointing out that only the least significant 32 bits will be used. However, we know that a FILE* returned by fopen() and such really is a 32-bit pointer (a study of the system header files make that clear), so we temporarly turn off that warning when calling setbuf(). Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-20Add an async io testMatt Caswell3-1/+407
This adds an async IO test. There are two test runs. The first one does a normal handshake with lots of async IO events. The second one does the same but this time breaks up all the written records into multiple records of one byte in length. We do this all the way up until the CCS. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-20Ensure async IO works with new state machineMatt Caswell1-1/+4
In the new state machine if using nbio and we get the header of a handshake message is one record with the body in the next, with an nbio event in the middle, then the connection was failing. This is because s->init_num was getting reset. We should only reset it after we have read the whole message. RT#4394 Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-20Tighten up logic around ChangeCipherSpec.David Benjamin1-0/+10
ChangeCipherSpec messages have a defined value. They also may not occur in the middle of a handshake message. The current logic will accept a ChangeCipherSpec with value 2. It also would accept up to three bytes of handshake data before the ChangeCipherSpec which it would discard (because s->init_num gets reset). Instead, require that s->init_num is 0 when a ChangeCipherSpec comes in. RT#4391 Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-20Simplify SSL BIO buffering logicMatt Caswell5-41/+23
The write BIO for handshake messages is bufferred so that we only write out to the network when we have a complete flight. There was some complexity in the buffering logic so that we switched buffering on and off at various points through out the handshake. The only real reason to do this was historically it complicated the state machine when you wanted to flush because you had to traverse through the "flush" state (in order to cope with NBIO). Where we knew up front that there was only going to be one message in the flight we switched off buffering to avoid that. In the new state machine there is no longer a need for a flush state so it is simpler just to have buffering on for the whole handshake. This also gives us the added benefit that we can simply call flush after every flight even if it only has one message in it. This means that BIO authors can implement their own buffering strategies and not have to be aware of the state of the SSL object (previously they would have to switch off their own buffering during the handshake because they could not rely on a flush being received when they really needed to write data out). This last point addresses GitHub Issue #322. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-20Fixup READLINE caseRichard Levitte1-1/+1
RT#4543 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org>