fix SSL routines, it turnouts that they can fail in numberous ways and that retry is in order in these cases