Skip to content

Commit f50a083

Browse files
committed
PR comments
1 parent e764854 commit f50a083

4 files changed

Lines changed: 22 additions & 17 deletions

File tree

ScosslCommon/src/scossl_ecc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ PCSYMCRYPT_ECURVE scossl_ecc_group_to_symcrypt_curve(const EC_GROUP *group)
116116
return scossl_ecc_nid_to_symcrypt_curve(EC_GROUP_get_curve_name(group));
117117
}
118118

119+
PCSYMCRYPT_ECURVE scossl_ecc_get_x25519_curve()
120+
{
121+
return _hidden_curve_X25519;
122+
}
123+
119124
_Use_decl_annotations_
120125
EC_GROUP *scossl_ecc_symcrypt_curve_to_ecc_group(PCSYMCRYPT_ECURVE pCurve)
121126
{

SymCryptProvider/src/encoder/p_scossl_encode_mlkem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static SCOSSL_STATUS p_scossl_mlkem_to_text(ossl_unused SCOSSL_ENCODE_CTX *ctx,
376376
pbKey = NULL;
377377
cbKey = 0;
378378

379-
if (p_scossl_mlkem_keymgmt_get_encoded_key(keyCtx, OSSL_KEYMGMT_SELECT_PUBLIC_KEY, &pbKey, &cbKey) != SCOSSL_SUCCESS)
379+
if (p_scossl_mlkem_keymgmt_get_encoded_key(keyCtx, SYMCRYPT_MLKEMKEY_FORMAT_ENCAPSULATION_KEY, &pbKey, &cbKey) != SCOSSL_SUCCESS)
380380
{
381381
goto cleanup;
382382
}

SymCryptProvider/src/p_scossl_base.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -750,15 +750,6 @@ SCOSSL_STATUS OSSL_provider_init(_In_ const OSSL_CORE_HANDLE *handle,
750750
p_ctx->handle = handle;
751751
p_ctx->libctx = OSSL_LIB_CTX_new_child(handle, in);
752752

753-
p_scossl_setup_logging(handle);
754-
755-
p_scossl_set_core_bio(in);
756-
if ((p_ctx->coreBioMeth = p_scossl_bio_init()) == NULL)
757-
{
758-
ERR_raise(ERR_LIB_PROV, ERR_R_INIT_FAIL);
759-
goto cleanup;
760-
}
761-
762753
for (; in->function_id != 0; in++)
763754
{
764755
switch(in->function_id)
@@ -769,6 +760,15 @@ SCOSSL_STATUS OSSL_provider_init(_In_ const OSSL_CORE_HANDLE *handle,
769760
}
770761
}
771762

763+
p_scossl_setup_logging(handle);
764+
765+
p_scossl_set_core_bio(in);
766+
if ((p_ctx->coreBioMeth = p_scossl_bio_init()) == NULL)
767+
{
768+
ERR_raise(ERR_LIB_PROV, ERR_R_INIT_FAIL);
769+
goto cleanup;
770+
}
771+
772772
if (!scossl_prov_initialized)
773773
{
774774
SymCryptModuleInit(P_SCOSSL_SYMCRYPT_MINIMUM_MAJOR, P_SCOSSL_SYMCRYPT_MINIMUM_MINOR);

SymCryptProvider/src/p_scossl_bio.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
extern "C" {
99
#endif
1010

11-
OSSL_FUNC_BIO_read_ex_fn *core_bio_read_ex = NULL;
12-
OSSL_FUNC_BIO_write_ex_fn *core_bio_write_ex = NULL;
13-
OSSL_FUNC_BIO_up_ref_fn *core_bio_up_ref = NULL;
14-
OSSL_FUNC_BIO_free_fn *core_bio_free = NULL;
15-
OSSL_FUNC_BIO_gets_fn *core_bio_gets = NULL;
16-
OSSL_FUNC_BIO_puts_fn *core_bio_puts = NULL;
17-
OSSL_FUNC_BIO_ctrl_fn *core_bio_ctrl = NULL;
11+
static OSSL_FUNC_BIO_read_ex_fn *core_bio_read_ex = NULL;
12+
static OSSL_FUNC_BIO_write_ex_fn *core_bio_write_ex = NULL;
13+
static OSSL_FUNC_BIO_up_ref_fn *core_bio_up_ref = NULL;
14+
static OSSL_FUNC_BIO_free_fn *core_bio_free = NULL;
15+
static OSSL_FUNC_BIO_gets_fn *core_bio_gets = NULL;
16+
static OSSL_FUNC_BIO_puts_fn *core_bio_puts = NULL;
17+
static OSSL_FUNC_BIO_ctrl_fn *core_bio_ctrl = NULL;
1818

1919
static SCOSSL_STATUS p_scossl_bio_core_read_ex(BIO *bio, char *data, size_t data_len,
2020
size_t *bytes_read)

0 commit comments

Comments
 (0)