Grid Community Toolkit  6.2.1705709074 (tag: v6.2.20240202)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
myproxy.h
1 /*
2  * myproxy.h
3  *
4  * Main public header for MyProxy library
5  *
6  */
7 
8 #ifndef __MYPROXY_H
9 #define __MYPROXY_H
10 
11 #define MYPROXY_VERSION "MYPROXYv2" /* protocol version string */
12 
13 /* compilation options */
14 #if defined(HAVE_LIBPAM)
15 #define MYPROXY_VERSION_PAM " PAM"
16 #else
17 #define MYPROXY_VERSION_PAM ""
18 #endif
19 #if defined(HAVE_LIBSASL2)
20 #define MYPROXY_VERSION_SASL " SASL"
21 #else
22 #define MYPROXY_VERSION_SASL ""
23 #endif
24 #if defined(BUILD_GSSAPI_PLUGIN)
25 #define MYPROXY_VERSION_KRB5 " KRB5"
26 #else
27 #define MYPROXY_VERSION_KRB5 ""
28 #endif
29 #if defined(HAVE_LIBLDAP)
30 #define MYPROXY_VERSION_LDAP " LDAP"
31 #else
32 #define MYPROXY_VERSION_LDAP ""
33 #endif
34 #if defined(HAVE_VOMS)
35 #define MYPROXY_VERSION_VOMS " VOMS"
36 #else
37 #define MYPROXY_VERSION_VOMS ""
38 #endif
39 #if defined(HAVE_OCSP)
40 #define MYPROXY_VERSION_OCSP " OCSP"
41 #else
42 #define MYPROXY_VERSION_OCSP ""
43 #endif
44 
45 /* software version constants */
46 #define MYPROXY_VERSION_MAJOR 6
47 #define MYPROXY_VERSION_MINOR 2
48 #define MYPROXY_VERSION_MICRO 16
49 #define MYPROXY_DATE "Jan 2024"
50 #define MYPROXY_STR2(x) #x
51 #define MYPROXY_STR(x) MYPROXY_STR2(x)
52 #define MYPROXY_VERSION_DATE \
53  "v" MYPROXY_STR(MYPROXY_VERSION_MAJOR) "." \
54  MYPROXY_STR(MYPROXY_VERSION_MINOR) " " MYPROXY_DATE \
55  MYPROXY_VERSION_PAM MYPROXY_VERSION_SASL MYPROXY_VERSION_KRB5 \
56  MYPROXY_VERSION_LDAP MYPROXY_VERSION_VOMS MYPROXY_VERSION_OCSP
57 
58 /*
59  * myproxy_version()
60  *
61  * Returns a static string indicating the MyProxy library version.
62  * Also sets major, minor, and micro version numbers if non-NULL.
63  */
64 char *myproxy_version(int *major, int *minor, int *micro);
65 
66 /*
67  * myproxy_check_version()
68  *
69  * Returns 0 if MyProxy library version matches this header.
70  * Returns 1 if major version number differs.
71  * Returns 2 if minor version number differs.
72  * Returns 3 if micro version number differs.
73  *
74  * Note: Requiring header and library version to match is recommended,
75  * as the MyProxy struct types sometimes change.
76  */
77 int myproxy_check_version_ex(int major, int minor, int micro);
78 #define myproxy_check_version() \
79  myproxy_check_version_ex(MYPROXY_VERSION_MAJOR, MYPROXY_VERSION_MINOR, \
80  MYPROXY_VERSION_MICRO)
81 
82 #include "myproxy_constants.h"
83 #include "myproxy_authorization.h"
84 #include "myproxy_protocol.h"
85 #include "myproxy_creds.h"
86 #include "myproxy_delegation.h"
87 #include "myproxy_log.h"
88 #include "myproxy_read_pass.h"
89 #include "myproxy_sasl_client.h"
90 #include "myproxy_sasl_server.h"
91 #include "myproxy_server.h"
92 #include "verror.h"
93 
94 #endif /* __MYPROXY_H */