18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci *   fs/cifs/cifs_spnego.h -- SPNEGO upcall management for CIFS
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci *   Copyright (c) 2007 Red Hat, Inc.
58c2ecf20Sopenharmony_ci *   Author(s): Jeff Layton (jlayton@redhat.com)
68c2ecf20Sopenharmony_ci *              Steve French (sfrench@us.ibm.com)
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci *   This library is free software; you can redistribute it and/or modify
98c2ecf20Sopenharmony_ci *   it under the terms of the GNU Lesser General Public License as published
108c2ecf20Sopenharmony_ci *   by the Free Software Foundation; either version 2.1 of the License, or
118c2ecf20Sopenharmony_ci *   (at your option) any later version.
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci *   This library is distributed in the hope that it will be useful,
148c2ecf20Sopenharmony_ci *   but WITHOUT ANY WARRANTY; without even the implied warranty of
158c2ecf20Sopenharmony_ci *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
168c2ecf20Sopenharmony_ci *   the GNU Lesser General Public License for more details.
178c2ecf20Sopenharmony_ci *
188c2ecf20Sopenharmony_ci *   You should have received a copy of the GNU Lesser General Public License
198c2ecf20Sopenharmony_ci *   along with this library; if not, write to the Free Software
208c2ecf20Sopenharmony_ci *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
218c2ecf20Sopenharmony_ci */
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#ifndef _CIFS_SPNEGO_H
248c2ecf20Sopenharmony_ci#define _CIFS_SPNEGO_H
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#define CIFS_SPNEGO_UPCALL_VERSION 2
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci/*
298c2ecf20Sopenharmony_ci * The version field should always be set to CIFS_SPNEGO_UPCALL_VERSION.
308c2ecf20Sopenharmony_ci * The flags field is for future use. The request-key callout should set
318c2ecf20Sopenharmony_ci * sesskey_len and secblob_len, and then concatenate the SessKey+SecBlob
328c2ecf20Sopenharmony_ci * and stuff it in the data field.
338c2ecf20Sopenharmony_ci */
348c2ecf20Sopenharmony_cistruct cifs_spnego_msg {
358c2ecf20Sopenharmony_ci	uint32_t	version;
368c2ecf20Sopenharmony_ci	uint32_t	flags;
378c2ecf20Sopenharmony_ci	uint32_t	sesskey_len;
388c2ecf20Sopenharmony_ci	uint32_t	secblob_len;
398c2ecf20Sopenharmony_ci	uint8_t		data[1];
408c2ecf20Sopenharmony_ci};
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci#ifdef __KERNEL__
438c2ecf20Sopenharmony_ciextern struct key_type cifs_spnego_key_type;
448c2ecf20Sopenharmony_ciextern struct key *cifs_get_spnego_key(struct cifs_ses *sesInfo);
458c2ecf20Sopenharmony_ci#endif /* KERNEL */
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci#endif /* _CIFS_SPNEGO_H */
48