(#19271) Proper check for which cert to use in ssl error

Don't assume the puppet ca subject name starts with 'puppet ca'
Merge pull request #1477 from dalen/ssl_error

(#19271) Proper check for which cert to use in ssl error