Protocol version selection and negotiation rewrite
authorViktor Dukhovni <openssl-users@dukhovni.org>
Tue, 29 Dec 2015 08:24:17 +0000 (03:24 -0500)
committerViktor Dukhovni <openssl-users@dukhovni.org>
Sat, 2 Jan 2016 15:49:06 +0000 (10:49 -0500)
commit4fa52141b08fca89250805afcf2f112a2e0d3500
treeab8988a8267c6032f6a8b48846d12fb907930b3b
parent57ce7b617c602ae8513c22daa2bda31f179edb0f
Protocol version selection and negotiation rewrite

The protocol selection code is now consolidated in a few consecutive
short functions in a single file and is table driven.  Protocol-specific
constraints that influence negotiation are moved into the flags
field of the method structure.  The same protocol version constraints
are now applied in all code paths.  It is now much easier to add
new protocol versions without reworking the protocol selection
logic.

In the presence of "holes" in the list of enabled client protocols
we no longer select client protocols below the hole based on a
subset of the constraints and then fail shortly after when it is
found that these don't meet the remaining constraints (suiteb, FIPS,
security level, ...).  Ideally, with the new min/max controls users
will be less likely to create "holes" in the first place.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
16 files changed:
CHANGES
include/openssl/ssl.h
ssl/d1_lib.c
ssl/methods.c
ssl/s3_lib.c
ssl/ssl_cert.c
ssl/ssl_ciph.c
ssl/ssl_conf.c
ssl/ssl_err.c
ssl/ssl_lib.c
ssl/ssl_locl.h
ssl/statem/statem.c
ssl/statem/statem_clnt.c
ssl/statem/statem_lib.c
ssl/statem/statem_srvr.c
ssl/t1_lib.c