(#17864) Don't check certificate_revocation if configured not to

Patch from the redmine issue, as requested.