libfetch: rearrange this better #261

This commit is contained in:
Franco Fichtner 2025-08-26 10:34:58 +02:00
parent 2e20b10703
commit 8fda2e9b93

View file

@ -1174,12 +1174,13 @@ fetch_ssl_cb_verify_crt(int verified, X509_STORE_CTX *ctx)
*/
if (!verified && X509_STORE_CTX_get_error(ctx) == X509_V_ERR_UNABLE_TO_GET_CRL) {
if ((crt = X509_STORE_CTX_get_current_cert(ctx)) != NULL &&
(name = X509_get_subject_name(crt)) != NULL)
str = X509_NAME_oneline(name, 0, 0);
if (X509_STORE_CTX_get_error_depth(ctx) != 0) {
fetch_info("No CRL was provided for CA %s", str);
(name = X509_get_subject_name(crt)) != NULL) {
if (X509_STORE_CTX_get_error_depth(ctx) != 0) {
str = X509_NAME_oneline(name, 0, 0);
fetch_info("No CRL was provided for CA %s", str);
OPENSSL_free(str);
}
}
OPENSSL_free(str);
verified = 1;
}