diff options
Diffstat (limited to 'gss-serv.c')
-rw-r--r-- | gss-serv.c | 32 |
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 */ |
65 | char * | ||
66 | ssh_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 */ | ||
75 | int | ||
76 | ssh_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 */ | ||
65 | void | 87 | void |
66 | ssh_gssapi_supported_oids(gss_OID_set *oidset) | 88 | ssh_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 */ | ||
302 | OM_uint32 | ||
303 | ssh_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 |