xref: /netbsd-src/external/gpl2/xcvs/dist/src/gssapi-client.h (revision 274254cdae52594c1aa480a736aef78313d15c9c)
1a7c91847Schristos /* CVS GSSAPI client stuff.
2a7c91847Schristos 
3a7c91847Schristos    This program is free software; you can redistribute it and/or modify
4a7c91847Schristos    it under the terms of the GNU General Public License as published by
5a7c91847Schristos    the Free Software Foundation; either version 2, or (at your option)
6a7c91847Schristos    any later version.
7a7c91847Schristos 
8a7c91847Schristos    This program is distributed in the hope that it will be useful,
9a7c91847Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
10a7c91847Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11a7c91847Schristos    GNU General Public License for more details.  */
12a7c91847Schristos 
13a7c91847Schristos 
14a7c91847Schristos #ifndef GSSAPI_CLIENT_H__
15a7c91847Schristos #define GSSAPI_CLIENT_H__
16a7c91847Schristos 
17a7c91847Schristos #ifdef HAVE_GSSAPI
18a7c91847Schristos 
19a7c91847Schristos /* Here goes the generic include magic necessary for using
20a7c91847Schristos  * cross platform gssapi which configure doesn't perform itself.
21a7c91847Schristos  */
22a7c91847Schristos 
23a7c91847Schristos /* Can't include both of these headers at the same time with Solaris 7 &
24a7c91847Schristos  * Heimdal Kerberos 0.3.  If some system ends up requiring both, a configure
25a7c91847Schristos  * test like TIME_AND_SYS_TIME will probably be necessary.
26a7c91847Schristos  */
27a7c91847Schristos #ifdef HAVE_GSSAPI_H
28a7c91847Schristos # include <gssapi.h>
29a7c91847Schristos #else
30a7c91847Schristos /* Assume existance of this header so that the user will get an informative
31a7c91847Schristos  * message if HAVE_GSSAPI somehow gets defined with both headers missing.
32a7c91847Schristos  */
33a7c91847Schristos # include <gssapi/gssapi.h>
34a7c91847Schristos #endif
35a7c91847Schristos #ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H
36a7c91847Schristos /* MIT Kerberos 5 v1.2.1 */
37a7c91847Schristos # include <gssapi/gssapi_generic.h>
38a7c91847Schristos #endif
39a7c91847Schristos 
40a7c91847Schristos #include "socket-client.h"
41a7c91847Schristos 
42a7c91847Schristos /* Set this to turn on GSSAPI encryption.  */
43a7c91847Schristos extern int cvs_gssapi_encrypt;
44a7c91847Schristos 
45a7c91847Schristos extern gss_ctx_id_t gcontext;
46a7c91847Schristos 
47a7c91847Schristos /* We can't declare the arguments without including gssapi.h, and I
48a7c91847Schristos    don't want to do that in every file.  */
49a7c91847Schristos struct buffer* cvs_gssapi_wrap_buffer_initialize( struct buffer *buf,
50a7c91847Schristos 						  int input,
51a7c91847Schristos 						   gss_ctx_id_t gcontext,
52a7c91847Schristos 						   void (*memory) (struct buffer *) );
53a7c91847Schristos 
54*274254cdSchristos int connect_to_gserver (cvsroot_t *, int, const char *);
55a7c91847Schristos 
56a7c91847Schristos extern void initialize_gssapi_buffers (struct buffer **to_server_p,
57a7c91847Schristos 					     struct buffer **from_server_p);
58a7c91847Schristos 
59a7c91847Schristos #endif /* HAVE_GSSAPI */
60a7c91847Schristos 
61a7c91847Schristos #endif
62