Skip to content
  • Michael Hanselmann's avatar
    ganeti.http: Implement SSL for HTTP client · 438a366a
    Michael Hanselmann authored
    Implementing SSL for the HTTP client required more work than I expected.
    For correct error handling, quite a lot of code is needed. To avoid
    code duplication, I moved a lot of the socket handling code into a
    single function named _SocketOperation. It takes care of the polling
    and error handling for OpenSSL. At the same time, the functions calling
    it become a lot smaller.
    
    This patch brings a few more changes:
    - Error handling for socket.connect_ex (e.g. name resolution failures)
    - Rename "ResponseError" exception class to "_HttpClientError" --
      it's an internal class anyway
    
    Reviewed-by: iustinp
    438a366a