@@ -27,7 +27,7 @@ class SecurityContext(rsec_contexts.SecurityContext):
2727
2828 def __new__ (cls , base = None , token = None ,
2929 name = None , creds = None , lifetime = None , flags = None ,
30- mech_type = None , channel_bindings = None , usage = None ):
30+ mech = None , channel_bindings = None , usage = None ):
3131
3232 if token is not None :
3333 base = rsec_contexts .import_sec_context (token )
@@ -36,7 +36,7 @@ def __new__(cls, base=None, token=None,
3636
3737 def __init__ (self , base = None , token = None ,
3838 name = None , creds = None , lifetime = None , flags = None ,
39- mech_type = None , channel_bindings = None , usage = None ):
39+ mech = None , channel_bindings = None , usage = None ):
4040 """
4141 The constructor creates a new security context, but does not begin
4242 the initiate or accept process.
@@ -55,7 +55,7 @@ def __init__(self, base=None, token=None,
5555 security context (if `base` or `token` are used) or the argument set.
5656
5757 For a security context of the `initiate` usage, the `name` argument
58- must be used, and the `creds`, `mech_type `, `flags`,
58+ must be used, and the `creds`, `mech `, `flags`,
5959 `lifetime`, and `channel_bindings` arguments may be
6060 used as well.
6161
@@ -86,19 +86,19 @@ def __init__(self, base=None, token=None,
8686
8787 # check for appropriate arguments
8888 if self .usage == 'initiate' :
89- # takes: creds?, target_name, mech_type ?, flags?,
89+ # takes: creds?, target_name, mech ?, flags?,
9090 # channel_bindings?
9191 if name is None :
9292 raise TypeError ("You must pass the 'name' argument when "
9393 "creating an initiating security context" )
9494 self ._target_name = name
95- self ._mech_type = mech_type
95+ self ._mech = mech
9696 self ._desired_flags = IntEnumFlagSet (RequirementFlag , flags )
9797 self ._desired_lifetime = lifetime
9898 else :
9999 # takes creds?
100100 if (name is not None or flags is not None or
101- mech_type is not None or lifetime is not None ):
101+ mech is not None or lifetime is not None ):
102102 raise TypeError ("You must pass at most the 'creds' "
103103 "argument when creating an accepting "
104104 "security context" )
@@ -290,7 +290,7 @@ def export(self):
290290 return rsec_contexts .export_sec_context (self )
291291
292292 _INQUIRE_ARGS = ('initiator_name' , 'target_name' , 'lifetime' ,
293- 'mech_type ' , 'flags' , 'locally_init' , 'complete' )
293+ 'mech ' , 'flags' , 'locally_init' , 'complete' )
294294
295295 @_utils .check_last_err
296296 def _inquire (self , ** kwargs ):
@@ -306,7 +306,7 @@ def _inquire(self, **kwargs):
306306 initiator_name (bool): get the initiator name for this context
307307 target_name (bool): get the target name for this context
308308 lifetime (bool): get the remaining lifetime for this context
309- mech_type (bool): get the mechanism used by this context
309+ mech (bool): get the mechanism used by this context
310310 flags (bool): get the flags set on this context
311311 locally_init (bool): get whether this context was locally initiated
312312 complete (bool): get whether negotiation on this context has
@@ -339,7 +339,7 @@ def _inquire(self, **kwargs):
339339 target_name = None
340340
341341 return tuples .InquireContextResult (init_name , target_name ,
342- res .lifetime , res .mech_type ,
342+ res .lifetime , res .mech ,
343343 res .flags , res .locally_init ,
344344 res .complete )
345345
@@ -352,8 +352,8 @@ def lifetime(self):
352352 'initiator_name' , 'Get the Name of the initiator of this context' )
353353 target_name = _utils .inquire_property (
354354 'target_name' , 'Get the Name of the target of this context' )
355- mech_type = _utils .inquire_property (
356- 'mech_type ' , 'Get the mechanism in use by this context' )
355+ mech = _utils .inquire_property (
356+ 'mech ' , 'Get the mechanism in use by this context' )
357357 actual_flags = _utils .inquire_property (
358358 'flags' , 'Get the flags set on this context' )
359359 locally_initiated = _utils .inquire_property (
@@ -412,7 +412,7 @@ def _acceptor_step(self, token):
412412
413413 def _initiator_step (self , token = None ):
414414 res = rsec_contexts .init_sec_context (self ._target_name , self ._creds ,
415- self , self ._mech_type ,
415+ self , self ._mech ,
416416 self ._desired_flags ,
417417 self ._desired_lifetime ,
418418 self ._channel_bindings ,
0 commit comments