What if...
1. Boot into recovery on an unaffected or already fixed system
2. Lift SIP the Apple way (csrutil disable)
3. Reboot into recovery with SIP now disabled (in recovery, a separate bootable environment not using any of the original system files is used: therefore, it’s more likely to succeed in reaching where one shouldn't reach)
4. Selectively zip the contents of /private/var/folders/*/com.apple.trustd
5. Reactivate SIP
6. Expand the files from resulting .zip on affected systems in Recovery with SIP lifted beforehand.
7. Narrow the selection down to the culprit file.
8. PROFIT?
Could it be that the culprit db isn’t GUID-specific and can be copied across systems? I’m pretty sure it can be backed up at least for the same system.
I can tell you I tried replacing all the files in /private/var/folder/*/com.apple.trustd from a backup before june 1st. Made no difference. Only after booting safe mode did it clear it for me. Those database files get actively updated in realtime from other places....(caches, keychains, etc..)
I think the real solution is clearing what's updating them(which is basically the solutions we have).
So, disconnect from internet,
boot your system in some way so you can interact with it, (nv_disable=1, or VESA mode, or temp put in an amd graphics card and take out Nvidia one, take out your nvidia card and use built in graphics controller if your system has one, etc...whatever you need/want to do depending on your type of mac or hack)
(or skip above and just boot safe mode)
then properly clear dyld cache(using ONYX or terminal like u put in post #365),
run crlrefresh rp in terminal,
then removing all caches in /var/db/crls/
and of course block trustd and ocspd from connecting using your favorite method (I like using little snitch myself).
restart,
plug internet back in.
This I think will theoretically bring everything back without having to boot safe mode (assuming you haven't removed or done anything with the previously working NVidia web kext files, and are still installed in system). ( I have not tested this...I have my system working and don't want to mess with it now....but I will if I get stuck in that state again)