mirror of
https://github.com/curl/curl.git
synced 2026-07-26 11:47:22 +03:00
openssl+sectrust: move session verified set into result check
Pointed out by Codex Security Closes #22248
This commit is contained in:
parent
c7f67be010
commit
6ab52f7c89
1 changed files with 3 additions and 3 deletions
|
|
@ -2689,10 +2689,10 @@ CURLcode Curl_ossl_add_session(struct Curl_cfilter *cf,
|
|||
earlydata_max, qtp_clone, quic_tp_len,
|
||||
&sc_session);
|
||||
der_session_buf = NULL; /* took ownership of sdata */
|
||||
#ifdef USE_APPLE_SECTRUST
|
||||
sc_session->sectrust_verified = octx->sectrust_verified;
|
||||
#endif
|
||||
if(!result) {
|
||||
#ifdef USE_APPLE_SECTRUST
|
||||
sc_session->sectrust_verified = octx->sectrust_verified;
|
||||
#endif
|
||||
result = Curl_ssl_scache_put(cf, data, ssl_peer_key, sc_session);
|
||||
/* took ownership of `sc_session` */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue