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