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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
"""Low-Level GSSAPI Bindings
The low-level API presents a series of methods designed
to closely mimic the C API presented in RFC 2744 and
associated RFCs.
In this API, classes are simply thin wrappers around C
constructs, and generally lack instance methods. However,
classes will automatically free associated memory (so the
release_xyz methods are not necessary to call).
The core RFC 2744 components are organized into the following
submodules:
gssapi.raw.names -- Names
gssapi.raw.creds -- Credentials
gssapi.raw.sec_contexts -- Security Contexts
gssapi.raw.message -- Message encryption, decryption, etc
gssapi.raw.misc -- Miscellaneous functions
gssapi.raw.types -- Miscellaneous types (enums, etc)
gssapi.raw.exceptions -- Exceptions
Additionally, a number of extensions may be present. All extensions
are in modules of the form `gssapi.raw.ext_xyz`.
All available functions and classes can be accessed directly from this
module (`gssapi.raw`) -- it is unnecessary to directly import submodules.
"""
import pkgutil
import importlib
from gssapi.raw import _enum_extensions
# NB(directxman12): the enum extensions must be imported BEFORE ANYTHING ELSE!
for modinf in pkgutil.iter_modules(_enum_extensions.__path__):
name = modinf[1]
importlib.import_module('{0}._enum_extensions.{1}'.format(__name__, name))
del pkgutil
del importlib
from gssapi.raw.creds import * # noqa
from gssapi.raw.message import * # noqa
from gssapi.raw.misc import * # noqa
from gssapi.raw.exceptions import * # noqa
from gssapi.raw.names import * # noqa
from gssapi.raw.sec_contexts import * # noqa
from gssapi.raw.oids import * # noqa
from gssapi.raw.types import * # noqa
from gssapi.raw.chan_bindings import * # noqa
# optional S4U support
try:
from gssapi.raw.ext_s4u import * # noqa
except ImportError:
pass # no s4u support in the system's GSSAPI library
# optional cred store support
try:
from gssapi.raw.ext_cred_store import * # noqa
except ImportError:
pass
# optional RFC 4178 support
try:
from gssapi.raw.ext_rfc4178 import * # noqa
except ImportError:
pass
# optional RFC 5587 support
try:
from gssapi.raw.ext_rfc5587 import * # noqa
except ImportError:
pass
# optional RFC 5588 support
try:
from gssapi.raw.ext_rfc5588 import * # noqa
except ImportError:
pass
# optional RFC 5801 support
try:
from gssapi.raw.ext_rfc5801 import * # noqa
except ImportError:
pass
try:
from gssapi.raw.ext_cred_imp_exp import * # noqa
except ImportError:
pass
# optional KRB5 mech support
try:
import gssapi.raw.mech_krb5 # noqa
except ImportError:
pass
# optional password support
try:
from gssapi.raw.ext_password import * # noqa
from gssapi.raw.ext_password_add import * # noqa
except ImportError:
pass
# optional DCE (IOV) support
try:
from gssapi.raw.ext_dce import * # noqa
# optional IOV MIC support (requires DCE support)
from gssapi.raw.ext_iov_mic import * # noqa
except ImportError:
pass
# optional DCE (AEAD) support
try:
from gssapi.raw.ext_dce_aead import * # noqa
except ImportError:
pass
# optional KRB5 specific extension support
try:
from gssapi.raw.ext_krb5 import * # noqa
except ImportError:
pass
# optional RFC 6680 support
try:
from gssapi.raw.ext_rfc6680 import * # noqa
from gssapi.raw.ext_rfc6680_comp_oid import * # noqa
except ImportError:
pass
# optional Global Grid Forum support
try:
from gssapi.raw.ext_ggf import * # noqa
except ImportError:
pass
# optional set_cred_option support
try:
from gssapi.raw.ext_set_cred_opt import * # noqa
except ImportError:
pass
|