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 <kshitiz.varshney@nxp.com>
  • Loading branch information
kshitizvars committed Oct 10, 2024
1 parent d6510d6 commit 63fce94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -3927,7 +3927,7 @@ 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 63fce94

Please sign in to comment.