Closed behackett closed 8 years ago
To enable confidentiality in authGSSClientWrap with the protect parameter you have to pass GSS_C_CONF_FLAG in the gssflags parameter to authGSSClientInit. Otherwise SSPI will return "The function requested is not supported".
Apple's original kerberos project enables this feature. WinKerberos currently defaults to signing but no confidentiality. That is, it passes SECQOP_WRAP_NO_ENCRYPT as the second parameter to EncryptMessage. We can instead pass 0 when protect is 1, following the example from MSDN's "SSPI/Kerberos Interoperability with GSSAPI" documentation.
References: https://github.com/apple/ccs-pykerberos/blob/PyKerberos-1.2.5/pysrc/kerberos.py#L261 https://msdn.microsoft.com/en-us/library/windows/desktop/aa375385(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa380496(v=vs.85).aspx
Note that the popular PyKerberos fork of Apple's project does not support this feature. https://github.com/02strich/pykerberos/blob/v1.1.9/pysrc/kerberos.py#L173