File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,6 @@ static int ENGINE_CTX_ctrl_load_cert(ENGINE_CTX *ctx, void *p)
315315 const char * s_slot_cert_id ;
316316 X509 * cert ;
317317 } * parms = p ;
318- X509 * cert ;
319318
320319 if (!parms ) {
321320 ENGerr (ENG_F_CTX_CTRL_LOAD_CERT , ERR_R_PASSED_NULL_PARAMETER );
@@ -327,21 +326,23 @@ static int ENGINE_CTX_ctrl_load_cert(ENGINE_CTX *ctx, void *p)
327326 }
328327
329328 pthread_mutex_lock (& ctx -> lock );
329+
330330 /* Delayed libp11 initialization */
331331 if (!UTIL_CTX_init_libp11 (ctx -> util_ctx )) {
332332 ENGerr (ENG_F_CTX_LOAD_OBJECT , ENG_R_INVALID_PARAMETER );
333333 pthread_mutex_unlock (& ctx -> lock );
334334 return 0 ;
335335 }
336- cert = UTIL_CTX_get_cert_from_uri (ctx -> util_ctx , parms -> s_slot_cert_id );
336+
337+ parms -> cert = UTIL_CTX_get_cert_from_uri (ctx -> util_ctx , parms -> s_slot_cert_id );
338+
337339 pthread_mutex_unlock (& ctx -> lock );
338340
339- if (!cert ) {
341+ if (!parms -> cert ) {
340342 if (!ERR_peek_last_error ())
341343 ENGerr (ENG_F_CTX_CTRL_LOAD_CERT , ENG_R_OBJECT_NOT_FOUND );
342344 return 0 ;
343345 }
344- parms -> cert = cert ;
345346 return 1 ;
346347}
347348
You can’t perform that action at this time.
0 commit comments