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:48:16 +0000 (13:48 +0000)
commit6711493457410d1663e29876b678e9a883939826
treea41b95ba376f19c240525fe43718b288010f1c7e
parent9933d4a06bd0a0b5b757f072944e8cd54d4bddd3
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)

(cherry picked from commit 861e45624fe5f16adb11e041a7ac7a1b3229d756)
apps/s_cb.c