What signature does TWRP look for? The stock recovery will look for a valid signature from its manufacturer.

What signature does TWRP look for?
Does it have a built in keychain of known developers? Does it just check for any signature and accepts it regardless of the signer to check for integrity only? Does it check whether the signature is from the same signer as the currently installed ROM?

(I'm asking because LineagOS recently started releasing signed builds but TWRP failed to verify it. Probably you'll want to use the LineagOS OS recovery but those haven't been released yet)
It will for an md5 checksum of what you're flashing if its present.
If TWRP won't let you flash a file, likely the checksum is turned on and can turned off in settings at the TWRP gui and possibly at an extended menu when selecting the file to flash.

If the file you're trying to flash doesn't work with TWRP, for example its contents isn't in a format that TWRP handels, then it won't work. Files from phone manufactures often have their own signing signatures that are only going to work with the recovery that is also from the manufacturer, and some manufactures are going to use an encrypted image that the stock recovery and bootloader are going to work with.  The rule of thumb, here, is not to flash OEM files with TWRP unless you know its okay with your device.