File: ext_iov_mic.pyi

package info (click to toggle)
python-gssapi 1.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 876 kB
  • sloc: python: 3,707; sh: 198; makefile: 154; ansic: 60
file content (90 lines) | stat: -rw-r--r-- 2,490 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import typing as t

if t.TYPE_CHECKING:
    from gssapi.raw.ext_dce import IOV
    from gssapi.raw.sec_contexts import SecurityContext


def get_mic_iov(
    context: "SecurityContext",
    message: "IOV",
    qop: t.Optional[int] = None,
) -> None:
    """Generate MIC tokens for the given IOV message.

    This method generates a MIC token for the given IOV message, and places it
    in the :attr:`~gssapi.raw.ext_dce.IOVBufferType.mic_token` buffer in the
    IOV. This method operates entirely in-place, and returns nothing.

    Warning:
        This modifies the input :class:`~gssapi.raw.ext_dce.IOV`.

    Args:
        context (~gssapi.raw.sec_contexts.SecurityContext): the current
            security context
        message (IOV): the :class:`~gssapi.raw.ext_dce.IOV` containing the
            message
        qop (int): the desired Quality of Protection
            (or None for the default QoP)

    Returns:
        None

    Raises:
        ~gssapi.exceptions.GSSError
    """


def get_mic_iov_length(
    context: "SecurityContext",
    message: "IOV",
    qop: t.Optional[int] = None,
) -> None:
    """Allocate space for the MIC buffer in the given IOV message.

    This method allocates space for the MIC token buffer
    (:attr:`~gssapi.raw.ext_dce.IOVBufferType.mic_token`) in the given IOV
    message.

    Warning:
        This modifies the input :class:`~gssapi.raw.ext_dce.IOV`.

    Args:
        context (~gssapi.raw.sec_contexts.SecurityContext): the current
            security context
        message (IOV): the :class:`~gssapi.raw.ext_dce.IOV` containing the
            message
        qop (int): the desired Quality of Protection
            (or None for the default QoP)

    Returns:
        None

    Raises:
        ~gssapi.exceptions.GSSError
    """


def verify_mic_iov(
    context: "SecurityContext",
    message: "IOV",
    qop: t.Optional[int] = None,
) -> int:
    """Verify that the MIC matches the data in the given IOV message.

    This method verifies that the MIC token in the MIC buffer
    (:attr:`~gssapi.raw.ext_dce.IOVBufferType.mic_token`) match the data
    buffer(s) in the given IOV method.

    Args:
        context (~gssapi.raw.sec_contexts.SecurityContext): the current
            security context
        message (IOV): the :class:`~gssapi.raw.ext_dce.IOV` containing the
            message

    Returns:
        int: the QoP used to generate the MIC token

    Raises:
        ~gssapi.exceptions.GSSError
    """