aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-11-20Increase stack sizeMatt Caswell1-2/+4
Some assembler code puts a lot of stuff on the stack, so up the stack size. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-20Add null async implementationMatt Caswell4-11/+86
Create a "null" async implementation for platforms that lack support. This just does nothing when called and therefore performs synchronously. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-20Async port to windowsMatt Caswell10-106/+524
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-20Various windows build fixes to prepare for windows portMatt Caswell2-0/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-20Add s_server and s_client async supportMatt Caswell2-20/+62
A new -async option is added which activates SSL_MODE_ASYNC. Also SSL_WANT_ASYNC errors are handled appropriately. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-20Make libssl async awareMatt Caswell7-667/+840
The following entry points have been made async aware: SSL_accept SSL_read SSL_write Also added is a new mode - SSL_MODE_ASYNC. Calling the above functions with the async mode enabled will initiate a new async job. If an async pause is encountered whilst executing the job (such as for example if using SHA1/RSA with the Dummy Async engine), then the above functions return with SSL_WANT_ASYNC. Calling the functions again (with exactly the same args as per non-blocking IO), will resume the job where it left off. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-20Add the Dummy Async engine (dasync)Matt Caswell7-3/+579
This engine is for developers of async aware applications. It simulates asynchronous activity with external hardware. This initial version supports SHA1 and RSA. Certain operations using those algorithms have async job "pauses" in them - using the new libcrypto async capability. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-20Add async sub-library to libcryptoMatt Caswell4-1/+436
Provides support for running asynchronous jobs. Currently this is completely stand alone. Future commits will integrate this into libssl and s_server/ s_client. An asynchronous capable engine will be required to see any benefit from this capability. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-20Add pthread supportMatt Caswell1-17/+18
The forthcoming async code needs to use pthread thread local variables. This updates the various Configurations to add the necessary flags. In many cases this is an educated guess as I don't have access to most of these environments! There is likely to be some tweaking needed. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-20Fix uninitialised variableMatt Caswell1-0/+1
The al variable could be uninitialised in an error path. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-20BN_sub: document that r might be the same as a or bKurt Roeckx1-0/+1
Reviewed-by: Rich Salz <rsalz@akamai.com> RT #4100, MR #1264
2015-11-20BN_usub: Don't copy when r and a the samePascal Cuoq1-1/+1
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@akamai.com> RT #4100, MR #1264
2015-11-20make updateDr. Stephen Henson1-0/+2
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-20Ensure all EVP calls have their returns checked where appropriateMatt Caswell13-156/+271
There are lots of calls to EVP functions from within libssl There were various places where we should probably check the return value but don't. This adds these checks. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-20Use better defaults for TSA.Dr. Stephen Henson4-12/+11
Use SHA256 for TSA and setted permitted digests to a sensible value. Based on PR#4141 Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-20Add support for signer_digest option in TS.Dr. Stephen Henson9-15/+75
Based on PR#2145 Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-19Make GOST ciphersuites require TLSv1Dr. Stephen Henson1-2/+2
PR#4141 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-11-18aes/asm/vpaes-ppc.pl: eliminate overhung stores in misaligned cases.Andy Polyakov1-62/+136
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-18e_os.h: bump minimal _WIN32_WINNT.Andy Polyakov1-11/+9
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-17Rename RSA_eay_xxx to rsa_ossl_xxxRich Salz5-81/+77
Final part of flushing out SSLEay API's. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-17make updateRichard Levitte2-2/+9
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-17Check error return from sysconf in secure memory codeMatt Caswell1-2/+12
We use the sysconf function to provide details about the page size in the secure memory code. This function can return -1 on error so we should check for this before proceeding. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-17Add comment explaining why we don't check a return valueMatt Caswell1-0/+6
A call to X509_verify_cert() is used to build a chain of certs for the server to send back to the client. It isn't *actually* used for verifying the cert at all - just building the chain. Therefore the return value is ignored. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-17Remove an NULL ptr deref in an error pathMatt Caswell1-1/+2
The |passwd| variable in the code can be NULL if it goes to the err label. Therefore we cannot call strlen on it without first checking that it is non NULL. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-16bn/asm/ppc64-mont.pl: adapt for little-endian.Andy Polyakov1-86/+88
The problem remained unnoticed so far, because it's never called by default. You have to craft OPENSSL_ppccap environment variable to trigger the problem. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-16crypto/sec_mem.c: fix anonymous mmap on legacy systems.Andy Polyakov1-2/+18
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-16bn/asm/s390x.S: improve performance on z196 and z13 by up to 26%. [even z10 ↵Andy Polyakov1-37/+72
is couple percent faster]. Triggered by RT#4128, but solves the problem by real modulo-scheduling. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-16aesni-sha256-x86_64.pl: fix crash on AMD Jaguar.Andy Polyakov2-5/+13
It was also found that stich performs suboptimally on AMD Jaguar, hence execution is limited to XOP-capable and Intel processors. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-15Explicit OpenSSL_version_num() implementation prototypeViktor Dukhovni1-1/+1
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-14Document new functionsDr. Stephen Henson3-2/+65
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-14Use accessors for X509_print_ex().Dr. Stephen Henson4-149/+86
Print certificate details using accessor functions. Since X509_CERT_AUX_print is only used in one place and can't be used by applications (it uses an internal X509_CERT_AUX structure) this has been removed and replaced by a function X509_aux_print which takes an X509 pointer instead. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-14Add new X509 accessorsDr. Stephen Henson3-0/+44
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-14Update and clarify ciphers documentation.Dr. Stephen Henson1-5/+26
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-14add -psk option to ciphers commandDr. Stephen Henson1-0/+24
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-14add -tls1_2,-tls1_1 options to ciphers commandDr. Stephen Henson1-0/+10
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-14Add "TLSv1.0" cipher alias.Dr. Stephen Henson1-0/+1
This adds a TLSv1.0 cipher alias for ciphersuites requiring at least TLSv1.0: currently only PSK ciphersuites using SHA256 or SHA384 MAC (SSLv3 only supports SHA1 and MD5 MAC). Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-14Don't alow TLS v1.0 ciphersuites for SSLv3Dr. Stephen Henson5-2/+13
This disables some ciphersuites which aren't supported in SSL v3: specifically PSK ciphersuites which use SHA256 or SHA384 for the MAC. Thanks to the Open Crypto Audit Project for identifying this issue. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-14Use SSL_TLSV1 only if at least TLS v1.0 is needed.Dr. Stephen Henson2-87/+87
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-13RT2667: Add IRC support to -starttlsNathan Phillip Brink2-4/+68
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-13RT32671: wrong multiple errs TS_check_status_infoGraeme Perrow1-13/+10
Reviewed-by: Tim Hudson <tjh@openssl.org> Signed-off-by: Rich Salz <rsalz@openssl.org>
2015-11-13absent identity hint should be NULLDr. Stephen Henson1-1/+4
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-11modes/asm/ghash-armv4.pl: extend Apple fix to all clang cases.Andy Polyakov1-1/+1
Triggered by RT#3989. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-10Fix SSL_use_certificate_chain_fileMatt Caswell6-9/+50
The new function SSL_use_certificate_chain_file was always crashing in the internal function use_certificate_chain_file because it would pass a NULL value for SSL_CTX *, but use_certificate_chain_file would unconditionally try to dereference it. Reviewed-by: Stephen Henson <steve@openssl.org>
2015-11-09Remove redundant check from tls1_get_curvelistMatt Caswell1-1/+1
The function tls1_get_curvelist() has an explicit check to see if s->cert is NULL or not. However the check appears *after* calling the tls1_suiteb macro which derefs s->cert. In reality s->cert can never be NULL because it is created in SSL_new(). If the malloc fails then the SSL_new call fails and no SSL object is created. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-09Continue malloc standardisation in enginesMatt Caswell6-21/+26
Continuing from previous work standardise use of malloc in the engine code. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-09Continue standardisation of malloc handling in appsMatt Caswell16-38/+46
continue on from previous commits but in the apps directory Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell155-407/+468
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-09Standardise our style for checking malloc failuresMatt Caswell13-37/+56
if we have a malloc |x = OPENSSL_malloc(...)| sometimes we check |x| for NULL and sometimes we treat it as a boolean |if(!x) ...|. Standardise the approach in libssl. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-09Remove redundant check from SSL_shutdownMatt Caswell1-1/+1
The SSL object was being deref'd and then there was a later redundant check to see if it is NULL. We assume all SSL_foo functions pass a non NULL SSL object and do not check it. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-09Make the match for previous cflags a bit more strictRichard Levitte1-2/+2
./Configure [target] --strict-warnings -Wno-pedantic-ms-format would not add '-pedantic' because it matches '-Wno-pedantic-ms-format', which was added first. Reviewed-by: Matt Caswell <matt@openssl.org>