Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
- tag: "OpenSSL_1_1_1i"

- tag: "openssl-3.3.1"

- tag: "openssl-3.5.5"
env:
BEE2_BRANCH: master
local: ${{github.workspace}}/build/local
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5...4.0)
project(BEE2EVP
VERSION 1.2.0
VERSION 1.2.2
LANGUAGES C
)

Expand Down
27 changes: 23 additions & 4 deletions btls/btls.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,22 @@ ssl/statem/statem_clnt.c (см. обработку флага SSL_kBDHEPSK).
*******************************************************************************
*/

static int btls_shared_group(SSL_CONNECTION *s)
{
int i = 0;
int num = tls1_shared_group(s, -1);
while (i < num)
{
int group_id = tls1_shared_group(s, i);
if (group_id == BIGN_CURVE256V1_ID ||
group_id == BIGN_CURVE384V1_ID ||
group_id == BIGN_CURVE512V1_ID)
return group_id;
i++;
}
return 0;
}

int btls_construct_ske_psk_bign_dhe(SSL_CONNECTION *s, WPACKET *pkt)
{
int ret = 0;
Expand All @@ -249,12 +265,15 @@ int btls_construct_ske_psk_bign_dhe(SSL_CONNECTION *s, WPACKET *pkt)
// загружен сертификат сервера?
if (s->s3.tmp.pkey != NULL)
goto err;
// клиент не высылал расширение supported_groups?
// сервер не сформировал расширение supported_groups?
if (!s->ext.supportedgroups)
// ...используем первую кривую bign
curve_id = BIGN_CURVE256V1_ID;
// ...используем первую кривую bign
curve_id = BIGN_CURVE256V1_ID;
// клиент не высылал расширение supported_groups?
else if (!s->ext.peer_supportedgroups)
curve_id = BIGN_CURVE256V1_ID;
// ... определяем подходящую кривую по стандартной схеме
else if (!(curve_id = tls1_shared_group(s, -2)))
else if (!(curve_id = btls_shared_group(s)))
goto err;
// определить oid(curve)
SSL_CTX *CTX=s->session_ctx;
Expand Down
Loading
Loading