Ejemplo n.º 1
0
    def set_options(self, op):
        # type: (int) -> int
        """Adds the options set via bitmask in options to the Context.

        !!! Options already set before are not cleared!

        The behaviour of the SSL library can be changed by setting
        several options.  The options are coded as bitmasks and can be
        combined by a logical or operation (|).

        SSL.Context.set_options() and SSL.set_options() affect the
        (external) protocol behaviour of the SSL library. The (internal)
        behaviour of the API can be changed by using the similar
        SSL.Context.set_mode() and SSL.set_mode() functions.

        During a handshake, the option settings of the SSL object are
        used. When a new SSL object is created from a context using
        SSL(), the current option setting is copied. Changes to ctx
        do not affect already created SSL objects. SSL.clear() does not
        affect the settings.

        @param op: bitmask of additional options specified in
        SSL_CTX_set_options(3) manpage.

        @return: the new options bitmask after adding options.
        """
        return m2.ssl_ctx_set_options(self.ctx, op)
Ejemplo n.º 2
0
    def set_options(self, op):
        # type: (int) -> int
        """Adds the options set via bitmask in options to the Context.

        !!! Options already set before are not cleared!

        The behaviour of the SSL library can be changed by setting
        several options.  The options are coded as bitmasks and can be
        combined by a logical or operation (|).

        SSL.Context.set_options() and SSL.set_options() affect the
        (external) protocol behaviour of the SSL library. The (internal)
        behaviour of the API can be changed by using the similar
        SSL.Context.set_mode() and SSL.set_mode() functions.

        During a handshake, the option settings of the SSL object are
        used. When a new SSL object is created from a context using
        SSL(), the current option setting is copied. Changes to ctx
        do not affect already created SSL objects. SSL.clear() does not
        affect the settings.

        @param op: bitmask of additional options specified in
        SSL_CTX_set_options(3) manpage.

        @return: the new options bitmask after adding options.
        """
        return m2.ssl_ctx_set_options(self.ctx, op)
Ejemplo n.º 3
0
 def set_options(self, op):
     return m2.ssl_ctx_set_options(self.ctx, op)
Ejemplo n.º 4
0
 def set_options(self, op):
     return m2.ssl_ctx_set_options(self.ctx, op)