3 * RPC Pipe client routines
4 * Copyright (C) Simo Sorce 2010.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef _CLI_SPNEGO_H_
21 #define _CLI_SPENGO_H_
29 struct spnego_context {
30 enum spnego_mech mech;
33 struct gensec_security *gensec_security;
34 struct gse_context *gssapi_state;
37 char *oid_list[ASN1_MAX_OIDS];
43 SPNEGO_CONV_AUTH_MORE,
44 SPNEGO_CONV_AUTH_CONFIRM,
52 struct tsocket_address *remote_address;
55 NTSTATUS spnego_gssapi_init_client(TALLOC_CTX *mem_ctx,
56 bool do_sign, bool do_seal,
58 const char *ccache_name,
63 struct spnego_context **spengo_ctx);
64 NTSTATUS spnego_generic_init_client(TALLOC_CTX *mem_ctx,
66 bool do_sign, bool do_seal,
71 struct spnego_context **spnego_ctx);
73 NTSTATUS spnego_get_client_auth_token(TALLOC_CTX *mem_ctx,
74 struct spnego_context *sp_ctx,
76 DATA_BLOB *spnego_out);
78 bool spnego_require_more_processing(struct spnego_context *sp_ctx);
80 NTSTATUS spnego_get_negotiated_mech(struct spnego_context *sp_ctx,
81 enum spnego_mech *type,
84 DATA_BLOB spnego_get_session_key(TALLOC_CTX *mem_ctx,
85 struct spnego_context *sp_ctx);
87 NTSTATUS spnego_sign(TALLOC_CTX *mem_ctx,
88 struct spnego_context *sp_ctx,
89 DATA_BLOB *data, DATA_BLOB *full_data,
90 DATA_BLOB *signature);
91 NTSTATUS spnego_sigcheck(TALLOC_CTX *mem_ctx,
92 struct spnego_context *sp_ctx,
93 DATA_BLOB *data, DATA_BLOB *full_data,
94 DATA_BLOB *signature);
95 NTSTATUS spnego_seal(TALLOC_CTX *mem_ctx,
96 struct spnego_context *sp_ctx,
97 DATA_BLOB *data, DATA_BLOB *full_data,
98 DATA_BLOB *signature);
99 NTSTATUS spnego_unseal(TALLOC_CTX *mem_ctx,
100 struct spnego_context *sp_ctx,
101 DATA_BLOB *data, DATA_BLOB *full_data,
102 DATA_BLOB *signature);
104 #endif /* _CLI_SPENGO_H_ */