Commit Graph

5 Commits

Author SHA1 Message Date
Luke Howard
1175fa0435 gss: don't include mech_locl.h in spnego
including mech_locl.h in spnego/context_storage.c is unnecessary and
breaks the build on Windows
2021-08-11 19:12:11 +10:00
Luke Howard
a27a3af0c2 gss: store_spnego_context(): remove redundant overflow check
ctx->negoex_step is now a uint8_t, so it can never be bigger than 0xff. Remove
redundant overflow check.
2021-08-10 20:11:35 +10:00
Luke Howard
43858eaf9b gss: add oid/buffer storage helpers to mechglue
The functions for storing and retrieving GSS OIDs and buffers from
krb5_storage, added in 6554dc69, are generally useful. Move those into private
_gss_mg_XXX() API and update gss_{export,import}_{cred,sec_context} to use them
where appropriate.
2021-08-10 10:16:54 +10:00
Luke Howard
490173b417 gss: free exported context buffer after use in store_negoex_auth_mech()
Code style/consistency: store_negoex_auth_mech() should free the exported
context buffer after use. There is no leak as the buffer was freed at the end
of the function.
2021-08-10 10:16:50 +10:00
Luke Howard
6554dc69b0 gss: allow partial accept context export in SPNEGO
Support for exporting partially established acceptor context tokens. With this,
an acceptor can send the initiator an encrypted state cookie containing the
exported context token.

(The concrete mechanism, of course, must either require a single round trip or
support partial context export itself. Kerberos and GSS EAP would work, but
Kerberos with GSS_C_DCE_STYLE would not, as currently implemented.)

Partial context export is not permitted for initiators.
2021-08-07 18:56:33 +10:00