httpx/sig/io/ssl.rbs
2024-06-11 18:21:22 +01:00

28 lines
685 B
Plaintext

module HTTPX
class TLSError < OpenSSL::SSL::SSLError
end
class SSL < TCP
TLS_OPTIONS: Hash[Symbol, untyped]
@ctx: OpenSSL::SSL::SSLContext
@verify_hostname: bool
attr_writer ssl_session: OpenSSL::SSL::Session?
# TODO: lift when https://github.com/ruby/rbs/issues/1497 fixed
# def initialize: (URI::Generic origin, Array[ipaddr]? addresses, options options) ?{ (self) -> void } -> void
def session_new_cb: { (OpenSSL::SSL::Session sess) -> void } -> void
def can_verify_peer?: () -> bool
def verify_hostname: (String host) -> bool
def ssl_session_expired?: () -> boolish
# :nocov:
def try_ssl_connect: () -> void
end
end