Skip to content

Commit

Permalink
Properly close PKCS12 files when enumerating stores
Browse files Browse the repository at this point in the history
  • Loading branch information
vcsjones authored Jul 23, 2023
1 parent fa9f94d commit d40ca00
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ int32_t CryptoNative_X509StoreCtxRebuildChain(X509_STORE_CTX* ctx)
int32_t CryptoNative_X509StoreCtxSetVerifyCallback(X509_STORE_CTX* ctx, X509StoreVerifyCallback callback, void* appData)
{
ERR_clear_error();

X509_STORE_CTX_set_verify_cb(ctx, callback);

return X509_STORE_CTX_set_app_data(ctx, appData);
Expand Down Expand Up @@ -527,6 +527,10 @@ static X509* ReadNextPublicCert(DIR* dir, X509Stack* tmpStack, char* pathTmp, si
return cert;
}
}
else
{
fclose(fp);
}
}
}
}
Expand Down

0 comments on commit d40ca00

Please sign in to comment.