Prefer SHA-256 ciphersuites if using old style PSKs
authorMatt Caswell <matt@openssl.org>
Thu, 10 May 2018 10:51:45 +0000 (11:51 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 11 May 2018 12:47:13 +0000 (13:47 +0100)
commit48a03162db6d5c1b66fd18e2d92461716178d986
tree46fc8d47752e89bbaa41c8545eb3ddc8cbd66832
parent3cb7c5cfef25463bd197b0c12ca7966f525ebf73
Prefer SHA-256 ciphersuites if using old style PSKs

If we have no certificate and we are using "old style" PSKs then we will
always default to using SHA-256 for that PSK. However we may have selected
a ciphersuite that is not based on SHA-256. Therefore if we see that there
are no certificates and we have been configured for "old style" PSKs then
we should prefer SHA-256 based ciphersuites during the selection process.

Fixes #6197

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6215)
ssl/s3_lib.c