openssl/0141-print-pq-group.patch
Dmitry Belyavskiy 9a7c320d2c Print key exchange group for hybrid PQC
Resolves: RHEL-66163
2025-01-24 17:36:21 +01:00

20 lines
618 B
Diff

diff --git a/apps/lib/s_cb.c b/apps/lib/s_cb.c
index 3b3c0dd0b38f5..026315406e298 100644
--- a/apps/lib/s_cb.c
+++ b/apps/lib/s_cb.c
@@ -418,8 +418,13 @@ int ssl_print_tmp_key(BIO *out, SSL *s)
{
EVP_PKEY *key;
- if (!SSL_get_peer_tmp_key(s, &key))
+ if (!SSL_get_peer_tmp_key(s, &key)) {
+ if (SSL_version(s) == TLS1_3_VERSION)
+ BIO_printf(out, "Negotiated TLS1.3 group: %s\n",
+ SSL_group_to_name(s, SSL_get_negotiated_group(s)));
return 1;
+ }
+
BIO_puts(out, "Server Temp Key: ");
switch (EVP_PKEY_get_id(key)) {
case EVP_PKEY_RSA: