mirror of https://github.com/openssl/openssl.git
Add a test for supported_groups in the EE message
Check we send supported_groups in EE if there is a group we prefer instead of the one sent in the key_share. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3395)
This commit is contained in:
parent
6af8754637
commit
de65f7b93a
|
|
@ -123,6 +123,8 @@ $ENV{CTLOG_FILE} = srctop_file("test", "ct", "log_list.conf");
|
||||||
checkhandshake::SERVER_NAME_SRV_EXTENSION],
|
checkhandshake::SERVER_NAME_SRV_EXTENSION],
|
||||||
[TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS, TLSProxy::Message::EXT_ALPN,
|
[TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS, TLSProxy::Message::EXT_ALPN,
|
||||||
checkhandshake::ALPN_SRV_EXTENSION],
|
checkhandshake::ALPN_SRV_EXTENSION],
|
||||||
|
[TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS, TLSProxy::Message::EXT_SUPPORTED_GROUPS,
|
||||||
|
checkhandshake::SUPPORTED_GROUPS_SRV_EXTENSION],
|
||||||
|
|
||||||
[TLSProxy::Message::MT_CERTIFICATE, TLSProxy::Message::EXT_STATUS_REQUEST,
|
[TLSProxy::Message::MT_CERTIFICATE, TLSProxy::Message::EXT_STATUS_REQUEST,
|
||||||
checkhandshake::STATUS_REQUEST_SRV_EXTENSION],
|
checkhandshake::STATUS_REQUEST_SRV_EXTENSION],
|
||||||
|
|
@ -145,7 +147,7 @@ $proxy->serverconnects(2);
|
||||||
$proxy->clientflags("-sess_out ".$session);
|
$proxy->clientflags("-sess_out ".$session);
|
||||||
$proxy->sessionfile($session);
|
$proxy->sessionfile($session);
|
||||||
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
|
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
|
||||||
plan tests => 15;
|
plan tests => 16;
|
||||||
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
|
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
|
||||||
checkhandshake::DEFAULT_EXTENSIONS,
|
checkhandshake::DEFAULT_EXTENSIONS,
|
||||||
"Default handshake test");
|
"Default handshake test");
|
||||||
|
|
@ -303,4 +305,14 @@ checkhandshake($proxy, checkhandshake::HRR_RESUME_HANDSHAKE,
|
||||||
| checkhandshake::PSK_CLI_EXTENSION
|
| checkhandshake::PSK_CLI_EXTENSION
|
||||||
| checkhandshake::PSK_SRV_EXTENSION,
|
| checkhandshake::PSK_SRV_EXTENSION,
|
||||||
"Resumption handshake with HRR test");
|
"Resumption handshake with HRR test");
|
||||||
|
|
||||||
|
#Test 16: Acceptable but non preferred key_share
|
||||||
|
$proxy->clear();
|
||||||
|
$proxy->clientflags("-curves P-256");
|
||||||
|
$proxy->start();
|
||||||
|
checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
|
||||||
|
checkhandshake::DEFAULT_EXTENSIONS
|
||||||
|
| checkhandshake::SUPPORTED_GROUPS_SRV_EXTENSION,
|
||||||
|
"Default handshake test");
|
||||||
|
|
||||||
unlink $session;
|
unlink $session;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,8 @@ use constant {
|
||||||
PSK_SRV_EXTENSION => 0x00010000,
|
PSK_SRV_EXTENSION => 0x00010000,
|
||||||
KEY_SHARE_SRV_EXTENSION => 0x00020000,
|
KEY_SHARE_SRV_EXTENSION => 0x00020000,
|
||||||
PSK_KEX_MODES_EXTENSION => 0x00040000,
|
PSK_KEX_MODES_EXTENSION => 0x00040000,
|
||||||
KEY_SHARE_HRR_EXTENSION => 0x00080000
|
KEY_SHARE_HRR_EXTENSION => 0x00080000,
|
||||||
|
SUPPORTED_GROUPS_SRV_EXTENSION => 0x00100000
|
||||||
};
|
};
|
||||||
|
|
||||||
our @handmessages = ();
|
our @handmessages = ();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue