Add set_verify_depth function to SSL context and stream.
Thanks go to Nick Jones <nick dot fa dot jones at gmail dot com>, on whose work this commit is based.