@@ -80,7 +80,7 @@ cdef class Creds:
8080 self .raw_creds = NULL
8181
8282
83- def acquire_cred (Name name , ttl = None , mechs = None , usage = ' both' ):
83+ def acquire_cred (Name name , lifetime = None , mechs = None , usage = ' both' ):
8484 """
8585 Get GSSAPI credentials for the given name and mechanisms.
8686
@@ -91,7 +91,8 @@ def acquire_cred(Name name, ttl=None, mechs=None, usage='both'):
9191 Args:
9292 name (Name): the name for which to acquire the credentials (or None
9393 for the "no name" functionality)
94- ttl (int): the lifetime for the credentials (or None for indefinite)
94+ lifetime (int): the lifetime for the credentials (or None for
95+ indefinite)
9596 mechs ([MechType]): the desired mechanisms for which the credentials
9697 should work, or None for the default set
9798 usage (str): the usage type for the credentials: may be
@@ -112,7 +113,7 @@ def acquire_cred(Name name, ttl=None, mechs=None, usage='both'):
112113 else :
113114 desired_mechs = GSS_C_NO_OID_SET
114115
115- cdef OM_uint32 input_ttl = c_py_ttl_to_c(ttl )
116+ cdef OM_uint32 input_ttl = c_py_ttl_to_c(lifetime )
116117
117118 cdef gss_name_t c_name
118119 if name is None :
@@ -173,7 +174,8 @@ def release_cred(Creds creds not None):
173174
174175
175176def add_cred (Creds input_cred , Name name not None , OID mech not None ,
176- usage = ' initiate' , initiator_ttl = None , acceptor_ttl = None ):
177+ usage = ' initiate' , init_lifetime = None ,
178+ accept_lifetime = None ):
177179 """ Add a credential element to a credential.
178180
179181 This method can be used to either compose two credentials (i.e., original
@@ -186,9 +188,9 @@ def add_cred(Creds input_cred, Name name not None, OID mech not None,
186188 mech (MechType): the desired security mechanism (required).
187189 usage (str): usage type for credentials. Possible values:
188190 'initiate' (default), 'accept', 'both' (failsafe).
189- initiator_ttl (int): lifetime of credentials for use in initiating
191+ init_lifetime (int): lifetime of credentials for use in initiating
190192 security contexts (None for indefinite)
191- acceptor_ttl (int): lifetime of credentials for use in accepting
193+ accept_lifetime (int): lifetime of credentials for use in accepting
192194 security contexts (None for indefinite)
193195
194196 Returns:
@@ -214,8 +216,8 @@ def add_cred(Creds input_cred, Name name not None, OID mech not None,
214216 else :
215217 raw_input_cred = GSS_C_NO_CREDENTIAL
216218
217- cdef OM_uint32 input_initiator_ttl = c_py_ttl_to_c(initiator_ttl )
218- cdef OM_uint32 input_acceptor_ttl = c_py_ttl_to_c(acceptor_ttl )
219+ cdef OM_uint32 input_initiator_ttl = c_py_ttl_to_c(init_lifetime )
220+ cdef OM_uint32 input_acceptor_ttl = c_py_ttl_to_c(accept_lifetime )
219221
220222 cdef gss_cred_id_t output_creds
221223 cdef gss_OID_set actual_mechs
@@ -241,16 +243,16 @@ def add_cred(Creds input_cred, Name name not None, OID mech not None,
241243 raise GSSError(maj_stat, min_stat)
242244
243245
244- def inquire_cred (Creds creds not None , name = True , ttl = True ,
245- usage = True , mechs = True ):
246+ def inquire_cred (Creds creds not None , name = True , lifetime = True , usage = True ,
247+ mechs = True ):
246248 """ Inspect credentials for information
247249
248250 This method inspects a :class:`Creds` object for information.
249251
250252 Args:
251253 creds (Creds): the credentials to inspect
252254 name (bool): get the Name associated with the credentials
253- ttl (bool): get the TTL for the credentials
255+ lifetime (bool): get the TTL for the credentials
254256 usage (bool): get the usage type of the credentials
255257 mechs (bool): the mechanims used with the credentials
256258
@@ -270,7 +272,7 @@ def inquire_cred(Creds creds not None, name=True, ttl=True,
270272
271273 cdef OM_uint32 res_ttl
272274 cdef OM_uint32 * res_ttl_ptr = NULL
273- if ttl :
275+ if lifetime :
274276 res_ttl_ptr = & res_ttl
275277
276278 cdef gss_cred_usage_t res_usage
@@ -305,7 +307,7 @@ def inquire_cred(Creds creds not None, name=True, ttl=True,
305307 py_usage = ' both'
306308
307309 py_ttl = None
308- if ttl :
310+ if lifetime :
309311 py_ttl = c_c_ttl_to_py(res_ttl)
310312
311313 py_mechs = None
@@ -318,8 +320,8 @@ def inquire_cred(Creds creds not None, name=True, ttl=True,
318320
319321
320322def inquire_cred_by_mech (Creds creds not None , OID mech not None ,
321- name = True , initiator_ttl = True ,
322- acceptor_ttl = True , usage = True ):
323+ name = True , init_lifetime = True ,
324+ accept_lifetime = True , usage = True ):
323325 """ Inspect credentials for mechanism-specific
324326
325327 This method inspects a :class:`Creds` object for information
@@ -329,8 +331,8 @@ def inquire_cred_by_mech(Creds creds not None, OID mech not None,
329331 creds (Creds): the credentials to inspect
330332 mech (OID): the desired mechanism
331333 name (bool): get the Name associated with the credentials
332- initiator_ttl (bool): get the initiator TTL for the credentials
333- acceprot_ttl (bool): get the acceptor TTL for the credentials
334+ init_lifetime (bool): get the initiator TTL for the credentials
335+ accept_lifetime (bool): get the acceptor TTL for the credentials
334336 usage (bool): get the usage type of the credentials
335337
336338 Returns:
@@ -349,12 +351,12 @@ def inquire_cred_by_mech(Creds creds not None, OID mech not None,
349351
350352 cdef OM_uint32 res_initiator_ttl
351353 cdef OM_uint32 * res_initiator_ttl_ptr = NULL
352- if initiator_ttl :
354+ if init_lifetime :
353355 res_initiator_ttl_ptr = & res_initiator_ttl
354356
355357 cdef OM_uint32 res_acceptor_ttl
356358 cdef OM_uint32 * res_acceptor_ttl_ptr = NULL
357- if acceptor_ttl :
359+ if accept_lifetime :
358360 res_acceptor_ttl_ptr = & res_acceptor_ttl
359361
360362 cdef gss_cred_usage_t res_usage
@@ -376,11 +378,11 @@ def inquire_cred_by_mech(Creds creds not None, OID mech not None,
376378 rn = None
377379
378380 py_initiator_ttl = None
379- if initiator_ttl :
381+ if init_lifetime :
380382 py_initiator_ttl = c_c_ttl_to_py(res_initiator_ttl)
381383
382384 py_acceptor_ttl = None
383- if acceptor_ttl :
385+ if accept_lifetime :
384386 py_acceptor_ttl = c_c_ttl_to_py(res_acceptor_ttl)
385387
386388 py_usage = None
0 commit comments