summaryrefslogtreecommitdiff
path: root/gss-serv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gss-serv.c')
-rw-r--r--gss-serv.c33
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 */
62char *
63ssh_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 */
72int
73ssh_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 */
61void 84void
62ssh_gssapi_supported_oids(gss_OID_set *oidset) 85ssh_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 */
297OM_uint32
298ssh_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