move cert_is_trusted to utilities