Skip to content

Commit

Permalink
Passing CK_P11PROV_IMPORTED_HANDLE while creating mock public key
Browse files Browse the repository at this point in the history
This commit adds CK_P11PROV_IMPORTED_HANDLE argument while creating mock
public key session object.

Before this patch, when we run TLS1.3 connection, below issue was reported
by openssl:-
tls_parse_ctos_key_share:unable to find ecdh
parameters:ssl/statem/extensions_srvr.c:684

It is because of returning CK_INVALID_HANDLE instead of obj->handle.

Signed-off-by: Kshitiz Varshney <[email protected]>
  • Loading branch information
kshitizvars committed Oct 11, 2024
1 parent d6510d6 commit 3660cdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -3927,7 +3927,8 @@ P11PROV_OBJ *mock_pub_ec_key(P11PROV_CTX *ctx, CK_ATTRIBUTE_TYPE type,
P11PROV_OBJ *key;
CK_RV ret;

key = p11prov_obj_new(ctx, CK_UNAVAILABLE_INFORMATION, CK_INVALID_HANDLE,
key = p11prov_obj_new(ctx, CK_UNAVAILABLE_INFORMATION,
CK_P11PROV_IMPORTED_HANDLE,
CK_UNAVAILABLE_INFORMATION);
if (!key) {
return NULL;
Expand Down

0 comments on commit 3660cdf

Please sign in to comment.