Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
__init__.py152 linesDownload Raw Back to raw
1"""Low-Level GSSAPI Bindings2 3The low-level API presents a series of methods designed4to closely mimic the C API presented in RFC 2744 and5associated RFCs.6 7In this API, classes are simply thin wrappers around C8constructs, and generally lack instance methods.  However,9classes will automatically free associated memory (so the10release_xyz methods are not necessary to call).11 12The core RFC 2744 components are organized into the following13submodules:14 15    gssapi.raw.names -- Names16 17    gssapi.raw.creds -- Credentials18 19    gssapi.raw.sec_contexts -- Security Contexts20 21    gssapi.raw.message -- Message encryption, decryption, etc22 23    gssapi.raw.misc -- Miscellaneous functions24 25    gssapi.raw.types -- Miscellaneous types (enums, etc)26 27    gssapi.raw.exceptions -- Exceptions28 29Additionally, a number of extensions may be present.  All extensions30are in modules of the form `gssapi.raw.ext_xyz`.31 32All available functions and classes can be accessed directly from this33module (`gssapi.raw`) -- it is unnecessary to directly import submodules.34"""35 36 37import pkgutil38import importlib39 40from gssapi.raw import _enum_extensions41 42# NB(directxman12): the enum extensions must be imported BEFORE ANYTHING ELSE!43for modinf in pkgutil.iter_modules(_enum_extensions.__path__):44    name = modinf[1]45    importlib.import_module('{0}._enum_extensions.{1}'.format(__name__, name))46 47del pkgutil48del importlib49 50from gssapi.raw.creds import *  # noqa51from gssapi.raw.message import *  # noqa52from gssapi.raw.misc import *  # noqa53from gssapi.raw.exceptions import *  # noqa54from gssapi.raw.names import *  # noqa55from gssapi.raw.sec_contexts import *  # noqa56from gssapi.raw.oids import *  # noqa57from gssapi.raw.types import *  # noqa58from gssapi.raw.chan_bindings import *  # noqa59 60# optional S4U support61try:62    from gssapi.raw.ext_s4u import *  # noqa63except ImportError:64    pass  # no s4u support in the system's GSSAPI library65 66# optional cred store support67try:68    from gssapi.raw.ext_cred_store import *  # noqa69except ImportError:70    pass71 72# optional RFC 4178 support73try:74    from gssapi.raw.ext_rfc4178 import *  # noqa75except ImportError:76    pass77 78# optional RFC 5587 support79try:80    from gssapi.raw.ext_rfc5587 import *  # noqa81except ImportError:82    pass83 84# optional RFC 5588 support85try:86    from gssapi.raw.ext_rfc5588 import *  # noqa87except ImportError:88    pass89 90# optional RFC 5801 support91try:92    from gssapi.raw.ext_rfc5801 import *  # noqa93except ImportError:94    pass95 96try:97    from gssapi.raw.ext_cred_imp_exp import *  # noqa98except ImportError:99    pass100 101# optional KRB5 mech support102try:103    import gssapi.raw.mech_krb5  # noqa104except ImportError:105    pass106 107# optional password support108try:109    from gssapi.raw.ext_password import *  # noqa110    from gssapi.raw.ext_password_add import *  # noqa111except ImportError:112    pass113 114# optional DCE (IOV) support115try:116    from gssapi.raw.ext_dce import *  # noqa117    # optional IOV MIC support (requires DCE support)118    from gssapi.raw.ext_iov_mic import *  # noqa119except ImportError:120    pass121 122# optional DCE (AEAD) support123try:124    from gssapi.raw.ext_dce_aead import *  # noqa125except ImportError:126    pass127 128# optional KRB5 specific extension support129try:130    from gssapi.raw.ext_krb5 import *  # noqa131except ImportError:132    pass133 134# optional RFC 6680 support135try:136    from gssapi.raw.ext_rfc6680 import *  # noqa137    from gssapi.raw.ext_rfc6680_comp_oid import *  # noqa138except ImportError:139    pass140 141# optional Global Grid Forum support142try:143    from gssapi.raw.ext_ggf import *  # noqa144except ImportError:145    pass146 147# optional set_cred_option support148try:149    from gssapi.raw.ext_set_cred_opt import *  # noqa150except ImportError:151    pass152 
codekingpro/portable-devtools · Team Ai