File tree Expand file tree Collapse file tree
port/stmicro/stm32h5-tz-wolfhsm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -451,7 +451,7 @@ the comments at the top to see exactly what the client side has to do:
451451
4524521. Allocate a static ` whTransportNscClientContext` .
4534532. Fill in ` whCommClientConfig` with the NSC transport callbacks
454- (` whTransportNscClient_Cb ` from
454+ (` WH_TRANSPORT_NSC_CLIENT_CB ` from
455455 ` lib/wolfHSM/port/armv8m-tz/wh_transport_nsc.h` ).
4564563. Wrap that in a ` whClientConfig` .
4574574. Call ` whTest_ClientConfig(& clientCfg)` (from wolfHSM' s test
Original file line number Diff line number Diff line change @@ -83,13 +83,14 @@ static int wolfhsm_demo_run(void)
8383 whCommClientConfig comm ;
8484 whClientConfig cfg ;
8585 int rc ;
86+ static const whTransportClientCb nsc_cb = WH_TRANSPORT_NSC_CLIENT_CB ;
8687
8788 memset (& s_nsc_ctx , 0 , sizeof (s_nsc_ctx ));
8889 memset (& s_nsc_cfg , 0 , sizeof (s_nsc_cfg ));
8990 memset (& comm , 0 , sizeof (comm ));
9091 memset (& cfg , 0 , sizeof (cfg ));
9192
92- comm .transport_cb = & whTransportNscClient_Cb ;
93+ comm .transport_cb = & nsc_cb ;
9394 comm .transport_context = & s_nsc_ctx ;
9495 comm .transport_config = & s_nsc_cfg ;
9596 comm .client_id = WOLFHSM_DEMO_CLIENT_ID ;
Original file line number Diff line number Diff line change @@ -72,9 +72,10 @@ static whNvmConfig g_nvm_cfg = {
7272static whServerCryptoContext g_crypto_ctx ;
7373static whTransportNscServerContext g_srv_tx_ctx ;
7474static whTransportNscServerConfig g_srv_tx_cfg = { 0 };
75+ static const whTransportServerCb g_srv_tx_cb = WH_TRANSPORT_NSC_SERVER_CB ;
7576static whCommServerConfig g_comm_cfg = {
7677 .transport_context = & g_srv_tx_ctx ,
77- .transport_cb = & whTransportNscServer_Cb ,
78+ .transport_cb = & g_srv_tx_cb ,
7879 .transport_config = & g_srv_tx_cfg ,
7980 .server_id = WCS_WOLFHSM_SERVER_ID ,
8081};
Original file line number Diff line number Diff line change @@ -35,14 +35,15 @@ extern whTransportNscClientContext g_wolfhsm_nsc_client_ctx;
3535int cmd_wolfhsm_test (const char * args )
3636{
3737 static const whTransportNscClientConfig nsc_cfg = { 0 };
38+ static const whTransportClientCb nsc_cb = WH_TRANSPORT_NSC_CLIENT_CB ;
3839 whCommClientConfig comm_cfg ;
3940 whClientConfig cfg ;
4041 int rc ;
4142
4243 (void )args ;
4344
4445 memset (& comm_cfg , 0 , sizeof (comm_cfg ));
45- comm_cfg .transport_cb = & whTransportNscClient_Cb ;
46+ comm_cfg .transport_cb = & nsc_cb ;
4647 comm_cfg .transport_context = & g_wolfhsm_nsc_client_ctx ;
4748 comm_cfg .transport_config = & nsc_cfg ;
4849 comm_cfg .client_id = WCS_WOLFHSM_CLIENT_ID ;
You can’t perform that action at this time.
0 commit comments