benoitc / hackney

simple HTTP client in Erlang
Other
1.34k stars 427 forks source link

Fix error caused by `honor_cipher_order`, CI errors #589

Closed jonnystorm closed 5 years ago

jonnystorm commented 5 years ago

OTP-22.1 (commit 124da8950c) introduced assert_role/4 into :ssl, which throws an error when :ssl.connect is called with the honor_cipher_order option defined. The error returned is {:error, {:option, :server_only, :honor_cipher_order}}.

With OTP-22.1, a dialyzer warning also appears:

    129: Invalid type specification for function
    hackney_ssl:shutdown/2. The success typing is
    ( { 'sslsocket',
         _,
         nonempty_maybe_improper_list()
      | {'dtls' | port(), _}
      },
      'read' | 'read_write' | 'write'
    ) -> 'ok' | {'error',_}

Prior to the above, CI errors began to appear as a result of cowboy-1.0.4 download failures. Using cowboy-1.1.2 fixes this.