diff options
Diffstat (limited to 'gss-serv.c')
-rw-r--r-- | gss-serv.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/gss-serv.c b/gss-serv.c index 26eec25bd..190f56fc0 100644 --- a/gss-serv.c +++ b/gss-serv.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "servconf.h" | 36 | #include "servconf.h" |
37 | #include "xmalloc.h" | 37 | #include "xmalloc.h" |
38 | #include "getput.h" | 38 | #include "getput.h" |
39 | #include "monitor_wrap.h" | ||
39 | 40 | ||
40 | #include "ssh-gss.h" | 41 | #include "ssh-gss.h" |
41 | 42 | ||
@@ -58,6 +59,28 @@ ssh_gssapi_mech* supported_mechs[]= { | |||
58 | }; | 59 | }; |
59 | 60 | ||
60 | /* Unprivileged */ | 61 | /* Unprivileged */ |
62 | char * | ||
63 | ssh_gssapi_server_mechanisms() { | ||
64 | gss_OID_set supported; | ||
65 | |||
66 | ssh_gssapi_supported_oids(&supported); | ||
67 | return (ssh_gssapi_kex_mechs(supported, &ssh_gssapi_server_check_mech, | ||
68 | NULL)); | ||
69 | } | ||
70 | |||
71 | /* Unprivileged */ | ||
72 | int | ||
73 | ssh_gssapi_server_check_mech(gss_OID oid, void *data) { | ||
74 | Gssctxt * ctx = NULL; | ||
75 | int res; | ||
76 | |||
77 | res = !GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctx, oid))); | ||
78 | ssh_gssapi_delete_ctx(&ctx); | ||
79 | |||
80 | return (res); | ||
81 | } | ||
82 | |||
83 | /* Unprivileged */ | ||
61 | void | 84 | void |
62 | ssh_gssapi_supported_oids(gss_OID_set *oidset) | 85 | ssh_gssapi_supported_oids(gss_OID_set *oidset) |
63 | { | 86 | { |
@@ -293,14 +316,4 @@ ssh_gssapi_userok(char *user) | |||
293 | return (0); | 316 | return (0); |
294 | } | 317 | } |
295 | 318 | ||
296 | /* Privileged */ | ||
297 | OM_uint32 | ||
298 | ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic) | ||
299 | { | ||
300 | ctx->major = gss_verify_mic(&ctx->minor, ctx->context, | ||
301 | gssbuf, gssmic, NULL); | ||
302 | |||
303 | return (ctx->major); | ||
304 | } | ||
305 | |||
306 | #endif | 319 | #endif |