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 authored and Jakuje committed Oct 22, 2024
1 parent 766c3a2 commit 913e46d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -3927,8 +3927,9 @@ 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,
CK_UNAVAILABLE_INFORMATION);
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 913e46d

Please sign in to comment.