refactor cert config logic to reduce cyclomatic complexity
refactor cert config logic to reduce cyclomatic complexity

vivint-smarthome/mesos-dns,vivint-smarthome/mesos-dns,saagie/mesos-dns,mesosphere/mesos-dns,mesosphere/mesos-dns