@@ -763,6 +763,7 @@ class HTTP_Client(object):
763763 :param ssl: whether to use HTTPS or not
764764 :param ssp: the SSP object to use for binding
765765 :param no_check_certificate: with SSL, do not check the certificate
766+ :param no_chan_bindings: force disable sending the channel bindings
766767 """
767768
768769 def __init__ (
@@ -772,6 +773,7 @@ def __init__(
772773 sslcontext = None ,
773774 ssp = None ,
774775 no_check_certificate = False ,
776+ no_chan_bindings = False ,
775777 ):
776778 self .sock = None
777779 self ._sockinfo = None
@@ -781,6 +783,7 @@ def __init__(
781783 self .ssp = ssp
782784 self .sspcontext = None
783785 self .no_check_certificate = no_check_certificate
786+ self .no_chan_bindings = no_chan_bindings
784787 self .chan_bindings = GSS_C_NO_CHANNEL_BINDINGS
785788
786789 def _connect_or_reuse (self , host , port = None , tls = False , timeout = 5 ):
@@ -823,7 +826,7 @@ def _connect_or_reuse(self, host, port=None, tls=False, timeout=5):
823826 else :
824827 context = self .sslcontext
825828 sock = context .wrap_socket (sock , server_hostname = host )
826- if self .ssp :
829+ if self .ssp and not self . no_chan_bindings :
827830 # Compute the channel binding token (CBT)
828831 self .chan_bindings = GssChannelBindings .fromssl (
829832 ChannelBindingType .TLS_SERVER_END_POINT ,
0 commit comments