puppetlabs/puppet — pull request #917 by djmitche (2012-07-11 03:05:37+00:00)
Title: Offer better errors for certificate validation errors

The verify_callback callback gets an OpenSSL::SSL::SSLContext for each
certificate in the chain that's verified. If the verification failed,
then SSL provides a nice error to the callback, but that error doesn't
appear in the subsequent OpenSSL::SSL::SSLError.

This patch uses a technique similar to that used for peer_certs to
collect those errors and then add them to the Puppet::Error message
later.

This is my first patch to ruby, and I'm about 45 minutes away from first learning about Mocha, so be kind! But I take review comments well :)