HomePhorge

(#7224) Reword 'hostname was not match' error message
99330fa56d5fUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#7224) Reword 'hostname was not match' error message

This error message is grammatically incorrect and unhelpful, so we replace it
with a message that explains more correctly what went wrong and what was
expected. This message happens when making an authenticated connection to a
server where the certificate doesn't match its hostname. This happens in the
REST terminuses, so we wrap their HTTP methods with a helper that will catch
the appropriate SSLError and re-raise it with the better message stating the
hostname used, and the list of hostnames that we were expecting it to be a part
of.

Unfortunately, because the certificate in question isn't available at error
time, we have to use the Net::HTTP#verify_callback to capture it.

Paired-With: Jacob Helwig <jacob@puppetlabs.com>
Reviewed-By: Dominic Maraglia <dominic@puppetlabs.com>

Details

Provenance
Nick Lewis <nick@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU1d867b026dbf: (#7224) Add a helper to Puppet::SSL::Certificate to retrieve alternate names
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Lewis <nick@puppetlabs.com> committed rPU99330fa56d5f: (#7224) Reword 'hostname was not match' error message (authored by Nick Lewis <nick@puppetlabs.com>).Jun 15 2011, 2:03 AM