Reorganized signature-scheme detection in 'apps/s_cb.c:security_callback_debug' callb...
authorLorinczy Zsigmond <zsigmond.lorinczy@idomsoft.hu>
Fri, 8 Mar 2019 19:22:05 +0000 (20:22 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 20 Mar 2019 13:44:02 +0000 (13:44 +0000)
commit861e45624fe5f16adb11e041a7ac7a1b3229d756
tree2bb0b32934f90f00131667b26dad516f1a9e5660
parent905c9a72a708701597891527b422c7f374125c52
Reorganized signature-scheme detection in 'apps/s_cb.c:security_callback_debug' callback-function.

So far, it only handled hash-and-algorithm pairs from TLS1.2,
now it also handles 'schemes' defined in TLS1.3 like 0x0807=ed25519 or
0x0809=rsa_pss_pss_sha256

Now it prints information in one of these formats:

... Algorithm scheme=ecdsa_secp256r1_sha256, security bits=128 ... TLS1.3
... Algorithm digest=SHA384, algorithm=DSA, security bits=192  ... TLS1.2
... Algorithm scheme=unknown(0x0e01), security bits=128        ... unhandled case

To implement this added three new lookup-tables: signature_tls13_scheme_list,
signature_tls12_alg_list, signature_tls12_hash_list.

Also minor changes in 'security_callback_debug', eg adding variable 'show_nm'
to indicate if we should show 'nm'.

Also coding-styles fixes from matcaswell

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8445)
apps/s_cb.c