Initial trust code: allow setting of trust checking functions