fix issue #2480: a custom SSL context can be used for HTTPS