(#15595) Clear up tests around ssl errors
The tests around the SSL errors had some unclear parts. They made it
look like the verify method was going to get an OpenSSL::SSL::SSLContext
where in reality it is provided an OpenSSL::X509::StoreContext. There
was also duplication between two tests that has been refactored out.