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 2f431f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -3927,8 +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,
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 2f431f4

Please sign in to comment.