openssl/crypto
Matt Caswell 32ec41539b Server side version negotiation rewrite
This commit changes the way that we do server side protocol version
negotiation. Previously we had a whole set of code that had an "up front"
state machine dedicated to the negotiating the protocol version. This adds
significant complexity to the state machine. Historically the justification
for doing this was the support of SSLv2 which works quite differently to
SSLv3+. However, we have now removed support for SSLv2 so there is little
reason to maintain this complexity.

The one slight difficulty is that, although we no longer support SSLv2, we
do still support an SSLv3+ ClientHello in an SSLv2 backward compatible
ClientHello format. This is generally only used by legacy clients. This
commit adds support within the SSLv3 code for these legacy format
ClientHellos.

Server side version negotiation now works in much the same was as DTLS,
i.e. we introduce the concept of TLS_ANY_VERSION. If s->version is set to
that then when a ClientHello is received it will work out the most
appropriate version to respond with. Also, SSLv23_method and
SSLv23_server_method have been replaced with TLS_method and
TLS_server_method respectively. The old SSLv23* names still exist as
macros pointing at the new name, although they are deprecated.

Subsequent commits will look at client side version negotiation, as well of
removal of the old s23* code.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-05-16 09:19:56 +01:00
..
aes make depend 2015-05-14 17:38:31 +02:00
asn1 make depend 2015-05-14 17:38:31 +02:00
bf Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevant 2015-03-31 20:16:01 +02:00
bio make depend 2015-05-14 17:38:31 +02:00
bn make depend 2015-05-14 17:38:31 +02:00
buffer make depend 2015-05-14 17:38:31 +02:00
camellia Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevant 2015-03-31 20:16:01 +02:00
cast Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevant 2015-03-31 20:16:01 +02:00
cmac make depend 2015-05-14 17:38:31 +02:00
cms make depend 2015-05-14 17:38:31 +02:00
comp Make COMP_CTX and COMP_METHOD opaque 2015-05-12 10:24:48 -04:00
conf make depend 2015-05-14 17:38:31 +02:00
des make depend 2015-05-14 17:38:31 +02:00
dh make depend 2015-05-14 17:38:31 +02:00
dsa make depend 2015-05-14 17:38:31 +02:00
dso make depend 2015-05-14 17:38:31 +02:00
ec make depend 2015-05-14 17:38:31 +02:00
ecdh make depend 2015-05-14 17:38:31 +02:00
ecdsa Use safer sizeof variant in malloc 2015-05-04 15:00:13 -04:00
engine make depend 2015-05-14 17:38:31 +02:00
err make depend 2015-05-14 17:38:31 +02:00
evp make depend 2015-05-14 17:38:31 +02:00
hmac make depend 2015-05-14 17:38:31 +02:00
idea Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevant 2015-03-31 20:16:01 +02:00
include/internal Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
jpake memset, memcpy, sizeof consistency fixes 2015-05-05 22:18:59 -04:00
lhash make depend 2015-05-14 17:38:31 +02:00
md2 Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
md4 make depend 2015-05-14 17:38:31 +02:00
md5 make depend 2015-05-14 17:38:31 +02:00
mdc2 make depend 2015-05-14 17:38:31 +02:00
modes make depend 2015-05-14 17:38:31 +02:00
objects make depend 2015-05-14 17:38:31 +02:00
ocsp make depend 2015-05-14 17:38:31 +02:00
pem make depend 2015-05-14 17:38:31 +02:00
perlasm Add assembly support for 32-bit iOS. 2015-04-20 15:06:22 +02:00
pkcs7 make depend 2015-05-14 17:38:31 +02:00
pkcs12 make depend 2015-05-14 17:38:31 +02:00
pqueue make depend 2015-05-14 17:38:31 +02:00
rand make depend 2015-05-14 17:38:31 +02:00
rc2 Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevant 2015-03-31 20:16:01 +02:00
rc4 make depend 2015-05-14 17:38:31 +02:00
rc5 Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevant 2015-03-31 20:16:01 +02:00
ripemd make depend 2015-05-14 17:38:31 +02:00
rsa make depend 2015-05-14 17:38:31 +02:00
seed Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevant 2015-03-31 20:16:01 +02:00
sha make depend 2015-05-14 17:38:31 +02:00
srp make depend 2015-05-14 17:38:31 +02:00
stack make depend 2015-05-14 17:38:31 +02:00
store memset, memcpy, sizeof consistency fixes 2015-05-05 22:18:59 -04:00
threads Server side version negotiation rewrite 2015-05-16 09:19:56 +01:00
ts make depend 2015-05-14 17:38:31 +02:00
txt_db make depend 2015-05-14 17:38:31 +02:00
ui make depend 2015-05-14 17:38:31 +02:00
whrlpool Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevant 2015-03-31 20:16:01 +02:00
x509 make depend 2015-05-14 17:38:31 +02:00
x509v3 make depend 2015-05-14 17:38:31 +02:00
alphacpuid.pl alphacpuid.pl: fix alignment bug. 2011-08-12 12:28:52 +00:00
arm64cpuid.pl Add assembly support to ios64-cross. 2015-01-23 15:38:41 +01:00
arm_arch.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
armcap.c Add assembly support for 32-bit iOS. 2015-04-20 15:06:22 +02:00
armv4cpuid.pl Add assembly support for 32-bit iOS. 2015-04-20 15:06:22 +02:00
c64xpluscpuid.pl C64x+ assembly pack: make it work with older toolchain. 2014-05-04 16:38:32 +02:00
cpt_err.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
cryptlib.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
crypto-lib.com Remove remaining Kerberos references 2015-05-13 15:08:10 +01:00
cversion.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
ebcdic.c Appease clang -Wempty-translation-unit 2015-04-04 17:05:49 +02:00
ex_data.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
fips_err.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
fips_ers.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
ia64cpuid.S IA-64 assembler pack: fix typos and make it work on HP-UX. 2011-05-07 20:36:05 +00:00
install-crypto.com Remove remaining Kerberos references 2015-05-13 15:08:10 +01:00
lock.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
LPdir_nyi.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
LPdir_unix.c memset, memcpy, sizeof consistency fixes 2015-05-05 22:18:59 -04:00
LPdir_vms.c memset, memcpy, sizeof consistency fixes 2015-05-05 22:18:59 -04:00
LPdir_win32.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
LPdir_win.c memset, memcpy, sizeof consistency fixes 2015-05-05 22:18:59 -04:00
LPdir_wince.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
Makefile make depend 2015-05-14 17:38:31 +02:00
mem_clr.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
mem_dbg.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
mem.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
o_dir_test.c Identify and move OpenSSL internal header files 2015-05-14 15:13:49 +02:00
o_dir.c Identify and move OpenSSL internal header files 2015-05-14 15:13:49 +02:00
o_fips.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
o_init.c Dead code cleanup: crypto/*.c, x509v3, demos 2015-02-02 11:08:16 -05:00
o_str.c Identify and move OpenSSL internal header files 2015-05-14 15:13:49 +02:00
o_time.c Re-align some comments after running the reformat script. 2015-01-22 09:20:10 +00:00
opensslconf.h.in RT3548: Remove unsupported platforms 2014-12-28 01:17:52 -05:00
pariscid.pl PA-RISC assembler pack: switch to bve in 64-bit builds. 2013-06-18 10:37:00 +02:00
ppc_arch.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
ppccap.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
ppccpuid.pl aesp8-ppc.pl: fix typos. 2014-06-04 08:34:18 +02:00
s390xcap.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
s390xcpuid.S Multiple assembler packs: add experimental memory bus instrumentation. 2011-04-17 12:46:00 +00:00
sparc_arch.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
sparccpuid.S sparccpuid.S: work around emulator bug on T1. 2013-02-11 10:39:50 +01:00
sparcv9cap.c Dead code cleanup: crypto/*.c, x509v3, demos 2015-02-02 11:08:16 -05:00
thr_id.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
uid.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
vms_rms.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
x86_64cpuid.pl x86[_64]cpuid.pl: add low-level RDSEED. 2014-02-14 17:24:12 +01:00
x86cpuid.pl Undo a90081576c 2014-08-09 08:02:20 -04:00