Go to file
Matt Caswell c3114a7732 Set the ossl_shim to auto retry if not running asynchronously
In certain circumstances in the DTLS code we have to drop a record (e.g. if
it is a stale retransmit). We then have to move on to try and read the next
record. Some applications using blocking sockets (e.g. s_server/s_client
will hang if there isn't actually any data to be read from the socket yet).
Others can tolerate this. Therefore SSL_read()/SSL_write() can sometimes
return SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE even when using blocking
sockets. Applications can use the mode SSL_MODE_AUTO_RETRY, to switch this
behaviour off so that we never return unless we have read the data we
wanted to.

Commit ad96225285 fixed a DTLS problem where we always retried even if
SSL_MODE_AUTO_RETRY was not set. However that fix caused the Boring
ossl_shim to fail in some tests because it was relying on the previous
(buggy) behaviour. The ossl_shim should be set into SSL_MODE_AUTO_RETRY if
it is not operating asynchronously to avoid this problem.

[extended tests]

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6216)
2018-05-11 10:29:04 +01:00
.github
apps Fix s_client and s_server so that they correctly handle the DTLS timer 2018-05-08 09:40:17 +01:00
boringssl@2070f8ad91
Configurations windows-makefile.tmpl: rearrange cleanup commands to avoid ... 2018-05-07 17:16:09 +02:00
crypto PPC assembly pack: add POWER9 results. 2018-05-10 11:44:21 +02:00
demos
doc Fix typos in x509 documentation 2018-05-09 17:15:58 +02:00
engines Update copyright year 2018-05-01 13:34:30 +01:00
external/perl
fuzz Update copyright year 2018-04-03 13:57:12 +01:00
include Make X509_VERIFY_PARAM_get_hostflags() take a const arg 2018-05-02 23:43:52 +01:00
krb5@b9ad6c4950
ms Update copyright year 2018-05-01 13:34:30 +01:00
os-dep
pyca-cryptography@c1f8e46033
ssl Keep the DTLS timer running after the end of the handshake if appropriate 2018-05-08 09:40:17 +01:00
test Set the ossl_shim to auto retry if not running asynchronously 2018-05-11 10:29:04 +01:00
tools
util Add getter for X509_VERIFY_PARAM_get_hostflags 2018-05-01 15:06:16 +01:00
VMS
.gitattributes
.gitignore Add test/versions to gitignore 2018-04-04 17:04:00 +01:00
.gitmodules
.travis-apt-pin.preferences
.travis-create-release.sh
.travis.yml .travis.yml: add pair of linux-ppc64le targets. 2018-05-10 11:35:01 +02:00
ACKNOWLEDGEMENTS
appveyor.yml appveyor.yml: exercise build_all_generated. 2018-04-11 20:52:14 +02:00
AUTHORS
build.info
CHANGES Add CHANGES entry for PR#6009 2018-05-09 13:30:46 +02:00
config Configure: move --noexecstack probe to Configure. 2018-05-05 20:44:56 +02:00
config.com
Configure Configure: fix Mac OS X builds that still require makedepend 2018-05-05 20:58:21 +02:00
CONTRIBUTING Updated to CONTRIBUTING to reflect GitHub, etc. 2018-04-07 13:09:15 -04:00
e_os.h
FAQ
INSTALL Add support for getrandom() or equivalent system calls and use them by default 2018-04-22 20:16:02 +02:00
LICENSE
NEWS
NOTES.ANDROID
NOTES.DJGPP
NOTES.PERL
NOTES.UNIX
NOTES.VMS
NOTES.WIN
README Prepare for 1.1.1-pre7-dev 2018-05-01 13:55:46 +01:00
README.ENGINE
README.FIPS

 OpenSSL 1.1.1-pre7-dev

 Copyright (c) 1998-2018 The OpenSSL Project
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 All rights reserved.

 DESCRIPTION
 -----------

 The OpenSSL Project is a collaborative effort to develop a robust,
 commercial-grade, fully featured, and Open Source toolkit implementing the
 Transport Layer Security (TLS) protocols (including SSLv3) as well as a
 full-strength general purpose cryptographic library.

 OpenSSL is descended from the SSLeay library developed by Eric A. Young
 and Tim J. Hudson.  The OpenSSL toolkit is licensed under a dual-license (the
 OpenSSL license plus the SSLeay license), which means that you are free to
 get and use it for commercial and non-commercial purposes as long as you
 fulfill the conditions of both licenses.

 OVERVIEW
 --------

 The OpenSSL toolkit includes:

 libssl (with platform specific naming):
     Provides the client and server-side implementations for SSLv3 and TLS.

 libcrypto (with platform specific naming):
     Provides general cryptographic and X.509 support needed by SSL/TLS but
     not logically part of it.

 openssl:
     A command line tool that can be used for:
        Creation of key parameters
        Creation of X.509 certificates, CSRs and CRLs
        Calculation of message digests
        Encryption and decryption
        SSL/TLS client and server tests
        Handling of S/MIME signed or encrypted mail
        And more...

 INSTALLATION
 ------------

 See the appropriate file:
        INSTALL         Linux, Unix, Windows, OpenVMS, ...
        NOTES.*         INSTALL addendums for different platforms

 SUPPORT
 -------

 See the OpenSSL website www.openssl.org for details on how to obtain
 commercial technical support. Free community support is available through the
 openssl-users email list (see
 https://www.openssl.org/community/mailinglists.html for further details).

 If you have any problems with OpenSSL then please take the following steps
 first:

    - Download the latest version from the repository
      to see if the problem has already been addressed
    - Configure with no-asm
    - Remove compiler optimization flags

 If you wish to report a bug then please include the following information
 and create an issue on GitHub:

    - OpenSSL version: output of 'openssl version -a'
    - Configuration data: output of 'perl configdata.pm --dump'
    - OS Name, Version, Hardware platform
    - Compiler Details (name, version)
    - Application Details (name, version)
    - Problem Description (steps that will reproduce the problem, if known)
    - Stack Traceback (if the application dumps core)

 Just because something doesn't work the way you expect does not mean it
 is necessarily a bug in OpenSSL. Use the openssl-users email list for this type
 of query.

 HOW TO CONTRIBUTE TO OpenSSL
 ----------------------------

 See CONTRIBUTING

 LEGALITIES
 ----------

 A number of nations restrict the use or export of cryptography. If you
 are potentially subject to such restrictions you should seek competent
 professional legal advice before attempting to develop or distribute
 cryptographic code.