When verifying signatures we currently first check for expiration of the signing certificate.
But if the certificate has no certification you trust, that fact should have precedence over expiration and reported to the user in the result of a signature check.
Please change the verification logic accordingly.
The corresponding result messages from T7786: Draft: Kleopatra: improvements of signature verification result messages require that change.