2 * Copyright (C) 1998, 1999, 2000, 2001, 2002,
3 * 2003 Free Software Foundation, Inc.
5 * This file is part of GnuPG.
7 * GnuPG is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * GnuPG is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
28 #undef ENABLE_COMMENT_PACKETS /* don't create comment packets */
30 #ifndef EXTERN_UNLESS_MAIN_MODULE
31 /* Norcraft can't cope with common symbols */
32 #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
33 #define EXTERN_UNLESS_MAIN_MODULE extern
35 #define EXTERN_UNLESS_MAIN_MODULE
39 EXTERN_UNLESS_MAIN_MODULE
53 int batch
; /* run in batch mode */
54 int answer_yes
; /* answer yes on most questions */
55 int answer_no
; /* answer no on most questions */
56 int check_sigs
; /* check key signatures */
59 int with_fingerprint
; /* opt --with-fingerprint active */
60 int fingerprint
; /* list fingerprints */
61 int list_sigs
; /* list signatures */
63 int list_packets
; /* list-packets mode: 1=normal, 2=invoked by command*/
71 int def_compress_algo
;
72 const char *def_secret_key
;
74 int def_recipient_self
;
75 int def_cert_check_level
;
82 const char *agent_program
;
83 char *display
; /* 5 options to be passed to the gpg-agent */
92 /* TM_CLASSIC must be zero to accomodate trustdbs generated before
93 we started storing the trust model inside the trustdb. */
94 enum {TM_CLASSIC
=0, TM_PGP
=1, TM_ALWAYS
, TM_AUTO
} trust_model
;
95 unsigned int force_ownertrust
;
98 CO_GNUPG
=0, CO_RFC2440
, CO_RFC1991
, CO_PGP2
, CO_PGP6
, CO_PGP7
, CO_PGP8
100 int pgp2_workarounds
;
101 unsigned int emulate_bugs
; /* bug emulation flags EMUBUG_xxxx */
103 const char *set_filename
;
106 const char *photo_viewer
;
110 int simple_sk_checksum
; /* create the deprecated rfc2440 secret
112 int not_dash_escaped
;
116 char *keyserver_scheme
;
117 char *keyserver_host
;
118 char *keyserver_port
;
119 char *keyserver_opaque
;
124 int include_disabled
;
126 int honor_http_proxy
;
127 int broken_http_proxy
;
131 int auto_key_retrieve
;
133 unsigned int import_options
;
134 unsigned int export_options
;
139 unsigned int import_options
;
140 unsigned int export_options
;
141 unsigned int list_options
;
142 unsigned int verify_options
;
143 char *def_preference_list
;
144 prefitem_t
*personal_cipher_prefs
;
145 prefitem_t
*personal_digest_prefs
;
146 prefitem_t
*personal_compress_prefs
;
152 STRLIST sig_notation_data
;
153 STRLIST cert_notation_data
;
154 STRLIST sig_policy_url
;
155 STRLIST cert_policy_url
;
156 STRLIST sig_keyserver_url
;
157 int use_embedded_filename
;
158 int allow_non_selfsigned_uid
;
159 int allow_freeform_uid
;
164 int ignore_time_conflict
;
165 int ignore_valid_from
;
166 int ignore_crc_error
;
167 int ignore_mdc_error
;
169 const char *override_session_key
;
170 int show_session_key
;
172 const char *gpg_agent_info
;
175 int no_expensive_trust_checks
;
177 int no_sig_create_check
;
178 int no_auto_check_trustdb
;
179 int preserve_permissions
;
180 int no_homedir_creation
;
181 struct groupitem
*grouplist
;
183 int mangle_dos_filenames
;
184 int enable_progress_filter
;
188 #define EMUBUG_MDENCODE 4
190 #define DBG_PACKET_VALUE 1 /* debug packet reading/writing */
191 #define DBG_MPI_VALUE 2 /* debug mpi details */
192 #define DBG_CIPHER_VALUE 4 /* debug cipher handling */
193 /* (may reveal sensitive data) */
194 #define DBG_FILTER_VALUE 8 /* debug internal filter handling */
195 #define DBG_IOBUF_VALUE 16 /* debug iobuf stuff */
196 #define DBG_MEMORY_VALUE 32 /* debug memory allocation stuff */
197 #define DBG_CACHE_VALUE 64 /* debug the cacheing */
198 #define DBG_MEMSTAT_VALUE 128 /* show memory statistics */
199 #define DBG_TRUST_VALUE 256 /* debug the trustdb */
200 #define DBG_HASHING_VALUE 512 /* debug hashing operations */
201 #define DBG_EXTPROG_VALUE 1024 /* debug external program calls */
204 #define DBG_PACKET (opt.debug & DBG_PACKET_VALUE)
205 #define DBG_CIPHER (opt.debug & DBG_CIPHER_VALUE)
206 #define DBG_FILTER (opt.debug & DBG_FILTER_VALUE)
207 #define DBG_CACHE (opt.debug & DBG_CACHE_VALUE)
208 #define DBG_TRUST (opt.debug & DBG_TRUST_VALUE)
209 #define DBG_HASHING (opt.debug & DBG_HASHING_VALUE)
210 #define DBG_EXTPROG (opt.debug & DBG_EXTPROG_VALUE)
212 #define GNUPG (opt.compliance==CO_GNUPG)
213 #define RFC1991 (opt.compliance==CO_RFC1991 || opt.compliance==CO_PGP2)
214 #define RFC2440 (opt.compliance==CO_RFC2440)
215 #define PGP2 (opt.compliance==CO_PGP2)
216 #define PGP6 (opt.compliance==CO_PGP6)
217 #define PGP7 (opt.compliance==CO_PGP7)
218 #define PGP8 (opt.compliance==CO_PGP8)
220 /* Various option flags */
222 #define IMPORT_ALLOW_LOCAL_SIGS 1
223 #define IMPORT_REPAIR_PKS_SUBKEY_BUG 2
224 #define IMPORT_FAST_IMPORT 4
225 #define IMPORT_SK2PK 8
227 #define EXPORT_INCLUDE_NON_RFC 1
228 #define EXPORT_INCLUDE_LOCAL_SIGS 2
229 #define EXPORT_INCLUDE_ATTRIBUTES 4
230 #define EXPORT_INCLUDE_SENSITIVE_REVKEYS 8
231 #define EXPORT_SEXP_FORMAT 16
234 #define LIST_SHOW_PHOTOS 1
235 #define LIST_SHOW_POLICY 2
236 #define LIST_SHOW_NOTATION 4
237 #define LIST_SHOW_KEYSERVER 8
238 #define LIST_SHOW_VALIDITY 16
239 #define LIST_SHOW_LONG_KEYID 32
240 #define LIST_SHOW_KEYRING 64
241 #define LIST_SHOW_SIG_EXPIRE 128
244 #define VERIFY_SHOW_PHOTOS 1
245 #define VERIFY_SHOW_POLICY 2
246 #define VERIFY_SHOW_NOTATION 4
247 #define VERIFY_SHOW_KEYSERVER 8
248 #define VERIFY_SHOW_VALIDITY 16
249 #define VERIFY_SHOW_LONG_KEYID 32
251 #endif /*G10_OPTIONS_H*/