@@ -91,6 +91,7 @@ IOVBuffer = namedtuple('IOVBuffer', ['type', 'allocate', 'value'])
9191
9292
9393cdef class IOV:
94+ """ A GSSAPI IOV"""
9495 # defined in ext_dce.pxd
9596
9697 # cdef int iov_len
@@ -304,24 +305,28 @@ cdef class IOV:
304305def wrap_iov (SecurityContext context not None , IOV message not None ,
305306 confidential = True , qop = None ):
306307 """
307- Wrap/Encrypt an IOV message
308+ wrap_iov(context, message, confidential=True, qop=None)
309+ Wrap/Encrypt an IOV message.
308310
309311 This method wraps or encrypts an IOV message. The allocate
310- parameter of the :class:`IOVBuffer` indicates whether or
311- not that particular buffer should be automatically allocated
312- (for use with padding, header, and trailer buffers).
312+ parameter of the :class:`IOVBuffer` objects in the :class:`IOV`
313+ indicates whether or not that particular buffer should be
314+ automatically allocated (for use with padding, header, and
315+ trailer buffers).
316+
317+ Warning:
318+ This modifies the input :class:`IOV`.
313319
314320 Args:
315321 context (SecurityContext): the current security context
316- message (list ): a list of :class:`IOVBuffer` objects
322+ message (IOV ): an :class:`IOV` containing the message
317323 confidential (bool): whether or not to encrypt the message (True),
318324 or just wrap it with a MIC (False)
319325 qop (int): the desired Quality of Protection
320326 (or None for the default QoP)
321327
322328 Returns:
323- WrapResult: the wrapped/encrypted message (IOV list), and
324- whether or not encryption was actually used
329+ bool: whether or not confidentiality was actually used
325330
326331 Raises:
327332 GSSError
@@ -348,26 +353,31 @@ def wrap_iov(SecurityContext context not None, IOV message not None,
348353
349354def unwrap_iov (SecurityContext context not None , IOV message not None ):
350355 """
351- Unwrap/Decrypt an IOV message
356+ unwrap_iov(context, message)
357+ Unwrap/Decrypt an IOV message.
352358
353- This method unwraps or decrypts an IOV message. The allocate
354- parameter of the :class:`IOVBuffer` indicates whether or
355- not that particular buffer should be automatically allocated
356- (for use with padding, header, and trailer buffers).
359+ This method uwraps or decrypts an IOV message. The allocate
360+ parameter of the :class:`IOVBuffer` objects in the :class:`IOV`
361+ indicates whether or not that particular buffer should be
362+ automatically allocated (for use with padding, header, and
363+ trailer buffers).
357364
358365 As a special case, you may pass an entire IOV message
359366 as a single 'stream'. In this case, pass a buffer type
360367 of :attr:`IOVBufferType.stream` followed by a buffer type of
361368 :attr:`IOVBufferType.data`. The former should contain the
362369 entire IOV message, while the latter should be empty.
363370
371+ Warning:
372+ This modifies the input :class:`IOV`.
373+
364374 Args:
365375 context (SecurityContext): the current security context
366- message (list ): a list of :class:`IOVBuffer` objects
376+ message (IOV ): an :class:`IOV` containing the message
367377
368378 Returns:
369- UnwrapResult: the unwrapped/decrypted message, whether or not
370- encryption was used, and the QoP used
379+ IOVUnwrapResult: whether or not confidentiality was used,
380+ and the QoP used.
371381
372382 Raises:
373383 GSSError
@@ -393,7 +403,8 @@ def unwrap_iov(SecurityContext context not None, IOV message not None):
393403def wrap_iov_length (SecurityContext context not None , IOV message not None ,
394404 confidential = True , qop = None ):
395405 """
396- Appropriately size padding, trailer, and header IOV buffers
406+ wrap_iov_length(context, message, confidential=True, qop=None)
407+ Appropriately size padding, trailer, and header IOV buffers.
397408
398409 This method sets the length values on the IOV buffers. You
399410 should already have data provided for the data (and sign-only)
@@ -402,9 +413,12 @@ def wrap_iov_length(SecurityContext context not None, IOV message not None,
402413 In Python terms, this will result in an appropriately sized
403414 `bytes` object consisting of all zeros.
404415
416+ Warning:
417+ This modifies the input :class:`IOV`.
418+
405419 Args:
406420 context (SecurityContext): the current security context
407- message (list ): a list of :class:`IOVBuffer` objects
421+ message (IOV ): an :class:`IOV` containing the message
408422
409423 Returns:
410424 WrapResult: a list of :class:IOVBuffer` objects, and whether or not
@@ -437,7 +451,8 @@ def wrap_iov_length(SecurityContext context not None, IOV message not None,
437451def wrap_aead (SecurityContext context not None , bytes message not None ,
438452 bytes associated = None , confidential = True , qop = None ):
439453 """
440- Wrap/Encrypt an AEAD Message
454+ wrap_aead(context, message, associated=None, confidential=True, qop=None)
455+ Wrap/Encrypt an AEAD message.
441456
442457 This method takes an input message and associated data,
443458 and outputs and AEAD message.
@@ -492,7 +507,8 @@ def wrap_aead(SecurityContext context not None, bytes message not None,
492507def unwrap_aead (SecurityContext context not None , bytes message not None ,
493508 bytes associated = None ):
494509 """
495- Unwrap/Decrypt an AEAD Message
510+ unwrap_aead(context, message, associated=None)
511+ Unwrap/Decrypt an AEAD message.
496512
497513 This method takes an encrpyted/wrapped AEAD message and some associated
498514 data, and returns an unwrapped/decrypted message.
0 commit comments