'@param ssl_context:SSL context
@type ssl_context: OpenSSL.SSL.Context
@param debuglevel: debug level for HTTPSHandler
@type debuglevel: int'

def __init__(self, ssl_context, debuglevel=0):

    AbstractHTTPHandler.__init__(self, debuglevel)
    if (ssl_context is not None):
        if (not isinstance(ssl_context, SSL.Context)):
            raise TypeError(('Expecting    OpenSSL.SSL.Context    type    for    "ssl_context"    keyword;    got    %r    instead' % ssl_context))
        self.ssl_context = ssl_context
    else:
        self.ssl_context = SSL.Context(SSL.TLSv1_METHOD)
