gss: port NegoEx implementation from MIT
An implementation of draft-zhu-negoex-04 for MIT Kerberos was developed in 2011. This has been recently integrated, with many fixes from Greg Hudson. This commit ports it to Heimdal. The implementation has been interoperability tested with MIT Kerberos and Windows, using the GSS EAP mechanism developed as part of the Moonshot project. The SPNEGO code was also updated to import the state machine from Apple which improves mechListMIC processing and avoids discarding initial context tokens generated during mechanism probing, that can be used for optimistic tokens. Finally, to aid in testing, the GSS-API mechanism glue configuration file can be changed using the environment variable GSS_MECH_CONFIG. This environment variable name, along with the format of the configuration file, is compatible with MIT (although it would be difficult for a single mechanism binary to support both implementations).
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "heim_threads.h"
|
||||
#include <krb5.h>
|
||||
#include "krb5_locl.h"
|
||||
#include "negoex_err.h"
|
||||
|
||||
struct mg_thread_ctx {
|
||||
gss_OID mech;
|
||||
@@ -99,6 +100,8 @@ _gss_mechglue_thread(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
krb5_add_et_list(ctx->context, initialize_ngex_error_table_r);
|
||||
|
||||
HEIMDAL_setspecific(context_key, ctx, ret);
|
||||
if (ret) {
|
||||
krb5_free_context(ctx->context);
|
||||
@@ -109,6 +112,16 @@ _gss_mechglue_thread(void)
|
||||
return ctx;
|
||||
}
|
||||
|
||||
krb5_context
|
||||
_gss_mg_krb5_context(void)
|
||||
{
|
||||
struct mg_thread_ctx *mg;
|
||||
|
||||
mg = _gss_mechglue_thread();
|
||||
|
||||
return mg ? mg->context : NULL;
|
||||
}
|
||||
|
||||
OM_uint32
|
||||
_gss_mg_get_error(const gss_OID mech,
|
||||
OM_uint32 value,
|
||||
|
Reference in New Issue
Block a user