Did you find out more about this problem? We are getting the same error message here... the code looks basically the same. With 5.8.0, the problem did not occur, but we cannot use that version anymore. Also, with the certificate test site badssl.com, the same code is working.