summaryrefslogtreecommitdiff
path: root/ssh-gss.h
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-gss.h')
-rw-r--r--ssh-gss.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/ssh-gss.h b/ssh-gss.h
index 4e9e357b5..31d5a0835 100644
--- a/ssh-gss.h
+++ b/ssh-gss.h
@@ -1,6 +1,6 @@
1/* $OpenBSD: ssh-gss.h,v 1.10 2007/06/12 08:20:00 djm Exp $ */ 1/* $OpenBSD: ssh-gss.h,v 1.10 2007/06/12 08:20:00 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 3 * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -75,6 +75,7 @@ typedef struct {
75 char *filename; 75 char *filename;
76 char *envvar; 76 char *envvar;
77 char *envval; 77 char *envval;
78 struct passwd *owner;
78 void *data; 79 void *data;
79} ssh_gssapi_ccache; 80} ssh_gssapi_ccache;
80 81
@@ -82,8 +83,11 @@ typedef struct {
82 gss_buffer_desc displayname; 83 gss_buffer_desc displayname;
83 gss_buffer_desc exportedname; 84 gss_buffer_desc exportedname;
84 gss_cred_id_t creds; 85 gss_cred_id_t creds;
86 gss_name_t name;
85 struct ssh_gssapi_mech_struct *mech; 87 struct ssh_gssapi_mech_struct *mech;
86 ssh_gssapi_ccache store; 88 ssh_gssapi_ccache store;
89 int used;
90 int updated;
87} ssh_gssapi_client; 91} ssh_gssapi_client;
88 92
89typedef struct ssh_gssapi_mech_struct { 93typedef struct ssh_gssapi_mech_struct {
@@ -94,6 +98,7 @@ typedef struct ssh_gssapi_mech_struct {
94 int (*userok) (ssh_gssapi_client *, char *); 98 int (*userok) (ssh_gssapi_client *, char *);
95 int (*localname) (ssh_gssapi_client *, char **); 99 int (*localname) (ssh_gssapi_client *, char **);
96 void (*storecreds) (ssh_gssapi_client *); 100 void (*storecreds) (ssh_gssapi_client *);
101 int (*updatecreds) (ssh_gssapi_ccache *, ssh_gssapi_client *);
97} ssh_gssapi_mech; 102} ssh_gssapi_mech;
98 103
99typedef struct { 104typedef struct {
@@ -104,7 +109,7 @@ typedef struct {
104 gss_OID oid; /* client */ 109 gss_OID oid; /* client */
105 gss_cred_id_t creds; /* server */ 110 gss_cred_id_t creds; /* server */
106 gss_name_t client; /* server */ 111 gss_name_t client; /* server */
107 gss_cred_id_t client_creds; /* server */ 112 gss_cred_id_t client_creds; /* both */
108} Gssctxt; 113} Gssctxt;
109 114
110extern ssh_gssapi_mech *supported_mechs[]; 115extern ssh_gssapi_mech *supported_mechs[];
@@ -128,16 +133,21 @@ void ssh_gssapi_build_ctx(Gssctxt **);
128void ssh_gssapi_delete_ctx(Gssctxt **); 133void ssh_gssapi_delete_ctx(Gssctxt **);
129OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t); 134OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t);
130void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *); 135void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *);
131int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *); 136int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *, const char *);
137OM_uint32 ssh_gssapi_client_identity(Gssctxt *, const char *);
138int ssh_gssapi_credentials_updated(Gssctxt *);
132 139
133/* In the server */ 140/* In the server */
134typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *); 141typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *,
135char *ssh_gssapi_client_mechanisms(const char *host); 142 const char *);
136char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *); 143char *ssh_gssapi_client_mechanisms(const char *, const char *);
144char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *,
145 const char *);
137gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int); 146gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int);
138int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *); 147int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *,
148 const char *);
139OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID); 149OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
140int ssh_gssapi_userok(char *name); 150int ssh_gssapi_userok(char *name, struct passwd *);
141OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t); 151OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t);
142void ssh_gssapi_do_child(char ***, u_int *); 152void ssh_gssapi_do_child(char ***, u_int *);
143void ssh_gssapi_cleanup_creds(void); 153void ssh_gssapi_cleanup_creds(void);
@@ -145,6 +155,8 @@ void ssh_gssapi_storecreds(void);
145 155
146char *ssh_gssapi_server_mechanisms(void); 156char *ssh_gssapi_server_mechanisms(void);
147int ssh_gssapi_oid_table_ok(); 157int ssh_gssapi_oid_table_ok();
158
159int ssh_gssapi_update_creds(ssh_gssapi_ccache *store);
148#endif /* GSSAPI */ 160#endif /* GSSAPI */
149 161
150#endif /* _SSH_GSS_H */ 162#endif /* _SSH_GSS_H */