print subject name in certificate check

Just turning attached patch of github issue #1028 into a push request
(with small adjustments).