File: mech_krb5.pyx

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 (21 lines) | stat: -rw-r--r-- 581 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
GSSAPI="BASE"  # This ensures that a full module is generated by Cython

from gssapi.raw.cython_types cimport *
from gssapi.raw.cython_converters cimport c_make_oid

from gssapi.raw import types as gsstypes

"""Kerberos-specific constants

Upon import, this module will populate
Kerberos-specific constants into NameType
and MechType.
"""


cdef extern from "python_gssapi_krb5.h":
    gss_OID gss_mech_krb5
    gss_OID GSS_KRB5_NT_PRINCIPAL_NAME

gsstypes.NameType.kerberos_principal = c_make_oid(GSS_KRB5_NT_PRINCIPAL_NAME)
gsstypes.MechType.kerberos = c_make_oid(gss_mech_krb5)