@@ -48,6 +48,7 @@ static psa_status_t ipc_connect(uint32_t sid, psa_handle_t *handle)
48
48
static inline void ipc_close (psa_handle_t * handle )
49
49
{
50
50
psa_close (* handle );
51
+ * handle = PSA_NULL_HANDLE ;
51
52
}
52
53
53
54
static psa_status_t ipc_call (psa_handle_t * handle , psa_invec * in_vec , size_t in_vec_size ,
@@ -99,7 +100,6 @@ psa_status_t psa_mac_abort(psa_mac_operation_t *operation)
99
100
};
100
101
101
102
psa_status_t status = ipc_call (& operation -> handle , in_vec , 1 , NULL , 0 , true);
102
- operation -> handle = PSA_NULL_HANDLE ;
103
103
return (status );
104
104
}
105
105
@@ -167,7 +167,6 @@ psa_status_t psa_mac_sign_finish(psa_mac_operation_t *operation,
167
167
};
168
168
169
169
psa_status_t status = ipc_call (& operation -> handle , in_vec , 2 , out_vec , 2 , true);
170
- operation -> handle = PSA_NULL_HANDLE ;
171
170
return (status );
172
171
}
173
172
@@ -183,7 +182,6 @@ psa_status_t psa_mac_verify_finish(psa_mac_operation_t *operation,
183
182
};
184
183
185
184
psa_status_t status = ipc_call (& operation -> handle , in_vec , 3 , NULL , 0 , true);
186
- operation -> handle = PSA_NULL_HANDLE ;
187
185
return (status );
188
186
}
189
187
@@ -203,7 +201,6 @@ psa_status_t psa_hash_abort(psa_hash_operation_t *operation)
203
201
};
204
202
205
203
psa_status_t status = ipc_call (& operation -> handle , in_vec , 1 , NULL , 0 , true);
206
- operation -> handle = PSA_NULL_HANDLE ;
207
204
return (status );
208
205
}
209
206
@@ -254,7 +251,6 @@ psa_status_t psa_hash_finish(psa_hash_operation_t *operation,
254
251
};
255
252
256
253
status = ipc_call (& operation -> handle , in_vec , 2 , out_vec , 2 , true);
257
- operation -> handle = PSA_NULL_HANDLE ;
258
254
return (status );
259
255
}
260
256
@@ -270,7 +266,6 @@ psa_status_t psa_hash_verify(psa_hash_operation_t *operation,
270
266
};
271
267
272
268
psa_status_t status = ipc_call (& operation -> handle , in_vec , 3 , NULL , 0 , true);
273
- operation -> handle = PSA_NULL_HANDLE ;
274
269
return (status );
275
270
}
276
271
@@ -310,7 +305,6 @@ psa_status_t psa_hash_clone(const psa_hash_operation_t *source_operation,
310
305
exit :
311
306
if (status != PSA_SUCCESS ) {
312
307
ipc_close (& target_operation -> handle );
313
- target_operation -> handle = PSA_NULL_HANDLE ;
314
308
}
315
309
return (status );
316
310
}
@@ -1025,7 +1019,6 @@ psa_status_t psa_generator_abort(psa_crypto_generator_t *generator)
1025
1019
1026
1020
if (generator -> handle != PSA_NULL_HANDLE ) {
1027
1021
status = ipc_call (& generator -> handle , in_vec , 1 , NULL , 0 , true);
1028
- generator -> handle = PSA_NULL_HANDLE ;
1029
1022
}
1030
1023
return (status );
1031
1024
}
@@ -1155,7 +1148,6 @@ psa_status_t psa_cipher_finish(psa_cipher_operation_t *operation,
1155
1148
};
1156
1149
1157
1150
psa_status_t status = ipc_call (& operation -> handle , in_vec , 1 , out_vec , 2 , true);
1158
- operation -> handle = PSA_NULL_HANDLE ;
1159
1151
return (status );
1160
1152
}
1161
1153
@@ -1173,7 +1165,6 @@ psa_status_t psa_cipher_abort(psa_cipher_operation_t *operation)
1173
1165
};
1174
1166
1175
1167
psa_status_t status = ipc_call (& operation -> handle , in_vec , 1 , NULL , 0 , true);
1176
- operation -> handle = PSA_NULL_HANDLE ;
1177
1168
return (status );
1178
1169
}
1179
1170
0 commit comments