summaryrefslogtreecommitdiff
path: root/gss-serv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gss-serv.c')
-rw-r--r--gss-serv.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/gss-serv.c b/gss-serv.c
index 117130459..05ae54e97 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -62,6 +62,28 @@ ssh_gssapi_mech* supported_mechs[]= {
62}; 62};
63 63
64/* Unpriviledged */ 64/* Unpriviledged */
65char *
66ssh_gssapi_server_mechanisms() {
67 gss_OID_set supported;
68
69 ssh_gssapi_supported_oids(&supported);
70 return (ssh_gssapi_kex_mechs(supported, &ssh_gssapi_server_check_mech,
71 NULL));
72}
73
74/* Unpriviledged */
75int
76ssh_gssapi_server_check_mech(gss_OID oid, void *data) {
77 Gssctxt * ctx = NULL;
78 int res;
79
80 res = !GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctx, oid)));
81 ssh_gssapi_delete_ctx(&ctx);
82
83 return (res);
84}
85
86/* Unpriviledged */
65void 87void
66ssh_gssapi_supported_oids(gss_OID_set *oidset) 88ssh_gssapi_supported_oids(gss_OID_set *oidset)
67{ 89{
@@ -298,14 +320,4 @@ ssh_gssapi_userok(char *user)
298 return (0); 320 return (0);
299} 321}
300 322
301/* Priviledged */
302OM_uint32
303ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
304{
305 ctx->major = gss_verify_mic(&ctx->minor, ctx->context,
306 gssbuf, gssmic, NULL);
307
308 return (ctx->major);
309}
310
311#endif 323#endif