1 /* data.h global data structures for shishi application
2 * Copyright (C) 2002, 2003 Simon Josefsson
4 * This file is part of Shishi.
6 * Shishi 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 2 of the License, or
9 * (at your option) any later version.
11 * Shishi 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 Shishi; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
44 #if defined HAVE_DECL_H_ERRNO && !HAVE_DECL_H_ERRNO
45 /* extern int h_errno; */
52 #ifdef HAVE_SYS_TYPES_H
53 #include <sys/types.h>
56 #ifdef HAVE_SYS_SELECT_H
57 #include <sys/select.h>
60 #ifdef HAVE_SYS_SOCKET_H
61 #include <sys/socket.h>
64 #ifdef HAVE_SYS_IOCTL_H
65 #include <sys/ioctl.h>
73 # include <inttypes.h>
80 #if TIME_WITH_SYS_TIME
81 # include <sys/time.h>
85 # include <sys/time.h>
92 # if !STDC_HEADERS && HAVE_MEMORY_H
105 #ifdef HAVE_NETINET_IN_H
106 #include <netinet/in.h>
108 #ifdef HAVE_NETINET_IN6_H
109 #include <netinet/in6.h>
119 #define _(String) gettext (String)
120 #define gettext_noop(String) String
121 #define N_(String) gettext_noop (String)
123 /* Short and long parameter */
133 /* Long parameters only */
136 OPTION_GET_REQUEST
= 300,
139 OPTION_GET_WRITE_AP_REQUEST_FILE
,
140 OPTION_GET_WRITE_AUTHENTICATOR_FILE
,
141 OPTION_GET_WRITE_REQUEST_FILE
,
142 OPTION_GET_WRITE_RESPONSE_FILE
,
143 OPTION_GET_READ_REQUEST_FILE
,
144 OPTION_GET_READ_RESPONSE_FILE
,
148 OPTION_GET_CLIENT_NAME
,
149 OPTION_GET_KEY_VALUE
,
151 OPTION_GET_SERVER_NAME
,
152 OPTION_GET_TICKET_GRANTER
,
154 OPTION_GET_FORCE_TGS
,
155 OPTION_AP_AUTHENTICATOR_READ_FILE
,
156 OPTION_AP_AUTHENTICATOR_WRITE_FILE
,
157 OPTION_AP_AUTHENTICATOR_DATA
,
158 OPTION_AP_AUTHENTICATOR_READ_DATA_FILE
,
159 OPTION_AP_REQUEST_READ_FILE
,
160 OPTION_AP_REQUEST_WRITE_FILE
,
162 OPTION_AP_SERVER_NAME
,
163 OPTION_CRYPTO_ENCRYPT
,
164 OPTION_CRYPTO_DECRYPT
,
165 OPTION_CRYPTO_ALGORITHM
,
166 OPTION_CRYPTO_KEY_VERSION
,
167 OPTION_CRYPTO_KEY_USAGE
,
168 OPTION_CRYPTO_KEY_VALUE
,
169 OPTION_CRYPTO_READ_KEY_FILE
,
170 OPTION_CRYPTO_WRITE_KEY_FILE
,
171 OPTION_CRYPTO_READ_DATA_FILE
,
172 OPTION_CRYPTO_WRITE_DATA_FILE
,
173 OPTION_CRYPTO_PASSWORD
,
174 OPTION_CRYPTO_RANDOM
,
175 OPTION_CRYPTO_PARAMETER
,
178 OPTION_CRYPTO_CLIENT_NAME
,
180 OPTION_CRYPTO_GENERATE_KEY
,
181 OPTION_LIST_SERVER_NAME
,
182 OPTION_DESTROY_SERVER_NAME
,
183 OPTION_VERBOSE_LIBRARY
186 #define TYPE_TEXT_NAME "text"
187 #define TYPE_DER_NAME "der"
188 #define TYPE_HEX_NAME "hex"
189 #define TYPE_BASE64_NAME "base64"
190 #define TYPE_BINARY_NAME "binary"
194 int silent
, verbose
, verbose_library
;
199 char *ticketwritefile
;
204 char *authenticatorwritefile
;
205 int authenticatorwritetype
;
206 char *apreqwritefile
;
218 char *kdcreqwritefile
;
220 char *kdcreqreadfile
;
222 char *kdcrepwritefile
;
224 char *kdcrepreadfile
;
230 char *authenticatorreadfile
;
231 int authenticatorreadtype
;
232 char *authenticatordatareadfile
;
233 int authenticatordatareadtype
;
234 char *authenticatordata
;
254 extern int ap (Shishi
* handle
, struct arguments arg
);
256 extern int kdc (Shishi
* handle
, struct arguments arg
);
258 extern int crypto (Shishi
* handle
, struct arguments arg
);