puppetlabs/puppet — pull request #2048 by adaburrows (2013-11-08 18:31:35+00:00)
Title: (maint) Allow code to verify SSL connections post factum

Previously, we only loaded the SSL certificates into the SSL
context if they were present and we were setting the SSL
validation to VALIDATE_PEER.

This forces the certificates to be loaded into the SSL context
if the certificates are present. Then we set the verify mode
as we had in the past.

The allows code using Puppet::Network::HTTP::Connection to
fetch the status of the SSL connection validation and the certname
of the host's SSL cert after a request has been made. This will
allow code to decide if it will trust information retreived from
another host based on those two facts.