1997-11-18 14:06:00 +00:00
|
|
|
/* options.h
|
2002-04-29 14:42:34 +00:00
|
|
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
1997-11-18 14:06:00 +00:00
|
|
|
*
|
1998-12-23 12:41:40 +00:00
|
|
|
* This file is part of GnuPG.
|
1997-11-18 14:06:00 +00:00
|
|
|
*
|
1998-12-23 12:41:40 +00:00
|
|
|
* GnuPG is free software; you can redistribute it and/or modify
|
1997-11-18 14:06:00 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
1998-12-23 12:41:40 +00:00
|
|
|
* GnuPG is distributed in the hope that it will be useful,
|
1997-11-18 14:06:00 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
|
|
*/
|
|
|
|
#ifndef G10_OPTIONS_H
|
|
|
|
#define G10_OPTIONS_H
|
|
|
|
|
1999-05-25 17:56:15 +00:00
|
|
|
#include <types.h>
|
* options.h, main.h, keygen.c (keygen_set_set_prefs, keygen_get_std_prefs,
keygen_upd_std_prefs), keyedit.c (keyedit_menu), g10.c (main), pkclist.c
(select_algo_from_prefs): Add --personal-preference-list which allows the
user to factor in their own preferred algorithms when the preference lists
are consulted. Obviously, this does not let the user violate a
recepient's preferences (and the RFC) - this only influences the ranking
of the agreed-on (and available) algorithms from the recepients.
Suggested by David Hollenberg.
* options.h, keygen.c (keygen_set_std_prefs), g10.c (main): Rename
--preference-list to --default-preference-list (as that is what it really
is), and make it a true default in that if the user selects "default" they
get this list and not the compiled-in list.
2002-05-22 14:07:12 +00:00
|
|
|
#include "packet.h"
|
1998-10-16 16:00:17 +00:00
|
|
|
|
|
|
|
#undef ENABLE_COMMENT_PACKETS /* don't create comment packets */
|
|
|
|
|
2001-08-20 11:53:05 +00:00
|
|
|
#ifndef EXTERN_UNLESS_MAIN_MODULE
|
|
|
|
/* Norcraft can't cope with common symbols */
|
|
|
|
#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
|
|
|
|
#define EXTERN_UNLESS_MAIN_MODULE extern
|
|
|
|
#else
|
|
|
|
#define EXTERN_UNLESS_MAIN_MODULE
|
|
|
|
#endif
|
|
|
|
#endif
|
1998-10-16 16:00:17 +00:00
|
|
|
|
2001-08-20 11:53:05 +00:00
|
|
|
EXTERN_UNLESS_MAIN_MODULE
|
1997-11-18 14:06:00 +00:00
|
|
|
struct {
|
|
|
|
int verbose;
|
1998-10-25 19:00:01 +00:00
|
|
|
int quiet;
|
1997-11-18 14:06:00 +00:00
|
|
|
unsigned debug;
|
|
|
|
int armor;
|
|
|
|
int compress;
|
|
|
|
char *outfile;
|
1999-02-25 17:51:55 +00:00
|
|
|
int dry_run;
|
2000-01-05 10:46:34 +00:00
|
|
|
int list_only;
|
1997-12-23 17:30:18 +00:00
|
|
|
int textmode;
|
2001-12-07 01:00:21 +00:00
|
|
|
int expert;
|
2002-01-06 03:52:14 +00:00
|
|
|
int ask_sig_expire;
|
|
|
|
int ask_cert_expire;
|
1997-11-18 14:06:00 +00:00
|
|
|
int batch; /* run in batch mode */
|
|
|
|
int answer_yes; /* answer yes on most questions */
|
|
|
|
int answer_no; /* answer no on most questions */
|
|
|
|
int check_sigs; /* check key signatures */
|
1998-03-09 21:44:06 +00:00
|
|
|
int with_colons;
|
1999-06-08 11:41:46 +00:00
|
|
|
int with_key_data;
|
2001-09-06 17:10:00 +00:00
|
|
|
int with_fingerprint; /* opt --with-fingerprint active */
|
1997-12-09 12:46:23 +00:00
|
|
|
int fingerprint; /* list fingerprints */
|
|
|
|
int list_sigs; /* list signatures */
|
1997-12-16 19:15:09 +00:00
|
|
|
int no_armor;
|
2001-03-12 20:21:50 +00:00
|
|
|
int list_packets; /* list-packets mode: 1=normal, 2=invoked by command*/
|
1998-01-07 20:47:46 +00:00
|
|
|
int def_cipher_algo;
|
1998-10-18 15:21:22 +00:00
|
|
|
int force_v3_sigs;
|
2001-11-08 13:26:00 +00:00
|
|
|
int force_v4_certs;
|
1999-04-26 15:53:01 +00:00
|
|
|
int force_mdc;
|
2002-02-10 00:18:54 +00:00
|
|
|
int disable_mdc;
|
1998-01-07 20:47:46 +00:00
|
|
|
int def_digest_algo;
|
2002-05-10 15:27:20 +00:00
|
|
|
int cert_digest_algo;
|
1998-05-15 18:49:19 +00:00
|
|
|
int def_compress_algo;
|
1998-07-08 09:29:43 +00:00
|
|
|
const char *def_secret_key;
|
1999-07-13 15:41:14 +00:00
|
|
|
char *def_recipient;
|
|
|
|
int def_recipient_self;
|
2002-04-19 22:38:20 +00:00
|
|
|
int def_cert_check_level;
|
2002-05-07 15:21:57 +00:00
|
|
|
int sk_comments;
|
1999-02-10 16:22:40 +00:00
|
|
|
int no_version;
|
1998-01-25 18:56:33 +00:00
|
|
|
int marginals_needed;
|
|
|
|
int completes_needed;
|
1998-11-13 19:41:41 +00:00
|
|
|
int max_cert_depth;
|
1998-02-17 20:48:52 +00:00
|
|
|
const char *homedir;
|
2002-04-25 08:30:35 +00:00
|
|
|
|
|
|
|
char *display; /* 5 options to be passed to the gpg-agent */
|
|
|
|
char *ttyname;
|
|
|
|
char *ttytype;
|
|
|
|
char *lc_ctype;
|
|
|
|
char *lc_messages;
|
|
|
|
|
1998-04-30 14:06:01 +00:00
|
|
|
int skip_verify;
|
1998-05-29 11:53:54 +00:00
|
|
|
int compress_keys;
|
1998-07-14 17:10:28 +00:00
|
|
|
int compress_sigs;
|
1998-05-29 11:53:54 +00:00
|
|
|
int always_trust;
|
2001-12-07 15:24:32 +00:00
|
|
|
int pgp2;
|
--pgp6 flag. This is not nearly as involved as --pgp2. In short, it
turns off force_mdc, turns on no_comment, escape_from, and force_v3_sigs,
and sets compression to 1. It also restricts the user to IDEA (if
present), 3DES, CAST5, MD5, SHA1, and RIPEMD160. See the comments above
algo_available() for lots of discussion on why you would want to do this.
2002-01-29 01:12:00 +00:00
|
|
|
int pgp6;
|
2002-05-07 22:04:27 +00:00
|
|
|
int pgp7; /* if we get any more of these, it's time to look at a
|
|
|
|
special emulate_pgp variable... */
|
1998-06-11 07:16:50 +00:00
|
|
|
int rfc1991;
|
2000-06-05 10:27:46 +00:00
|
|
|
int rfc2440;
|
2000-01-05 10:46:34 +00:00
|
|
|
int pgp2_workarounds;
|
2000-06-05 21:28:41 +00:00
|
|
|
unsigned int emulate_bugs; /* bug emulation flags EMUBUG_xxxx */
|
1998-07-31 16:45:58 +00:00
|
|
|
int shm_coprocess;
|
1998-08-11 17:29:34 +00:00
|
|
|
const char *set_filename;
|
|
|
|
const char *comment_string;
|
1998-09-11 05:47:32 +00:00
|
|
|
int throw_keyid;
|
2001-12-21 23:06:02 +00:00
|
|
|
int show_photos;
|
|
|
|
const char *photo_viewer;
|
1998-09-28 19:25:31 +00:00
|
|
|
int s2k_mode;
|
|
|
|
int s2k_digest_algo;
|
|
|
|
int s2k_cipher_algo;
|
2002-04-17 16:00:03 +00:00
|
|
|
int simple_sk_checksum; /* create the deprecated rfc2440 secret
|
|
|
|
key protection*/
|
1998-11-20 17:42:18 +00:00
|
|
|
int not_dash_escaped;
|
1998-12-17 17:36:05 +00:00
|
|
|
int escape_from;
|
1998-11-27 20:40:56 +00:00
|
|
|
int lock_once;
|
2001-12-06 21:43:04 +00:00
|
|
|
char *keyserver_scheme;
|
|
|
|
char *keyserver_host;
|
|
|
|
char *keyserver_port;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
int verbose;
|
|
|
|
int include_revoked:1;
|
|
|
|
int include_disabled:1;
|
|
|
|
int use_temp_files:1;
|
|
|
|
int keep_temp_files:1;
|
2002-02-04 21:49:08 +00:00
|
|
|
int refresh_add_fake_v3_keyids:1;
|
2002-03-07 19:44:57 +00:00
|
|
|
int auto_key_retrieve:1;
|
2001-12-06 21:43:04 +00:00
|
|
|
STRLIST other;
|
|
|
|
} keyserver_options;
|
2001-12-21 23:06:02 +00:00
|
|
|
int exec_disable;
|
* options.h, main.h, keygen.c (keygen_set_set_prefs, keygen_get_std_prefs,
keygen_upd_std_prefs), keyedit.c (keyedit_menu), g10.c (main), pkclist.c
(select_algo_from_prefs): Add --personal-preference-list which allows the
user to factor in their own preferred algorithms when the preference lists
are consulted. Obviously, this does not let the user violate a
recepient's preferences (and the RFC) - this only influences the ranking
of the agreed-on (and available) algorithms from the recepients.
Suggested by David Hollenberg.
* options.h, keygen.c (keygen_set_std_prefs), g10.c (main): Rename
--preference-list to --default-preference-list (as that is what it really
is), and make it a true default in that if the user selects "default" they
get this list and not the compiled-in list.
2002-05-22 14:07:12 +00:00
|
|
|
char *def_preference_list;
|
|
|
|
prefitem_t *personal_prefs;
|
2002-05-29 20:52:51 +00:00
|
|
|
int personal_mdc;
|
2001-12-20 05:02:30 +00:00
|
|
|
int no_perm_warn;
|
2001-12-06 21:43:04 +00:00
|
|
|
char *temp_dir;
|
1999-02-19 14:54:00 +00:00
|
|
|
int no_encrypt_to;
|
1999-05-19 14:12:26 +00:00
|
|
|
int interactive;
|
2002-05-02 13:25:59 +00:00
|
|
|
STRLIST sig_notation_data;
|
|
|
|
STRLIST cert_notation_data;
|
2001-12-06 22:04:08 +00:00
|
|
|
int show_notation;
|
2002-05-02 13:25:59 +00:00
|
|
|
STRLIST sig_policy_url;
|
|
|
|
STRLIST cert_policy_url;
|
2001-12-06 22:04:08 +00:00
|
|
|
int show_policy_url;
|
1999-06-01 14:08:57 +00:00
|
|
|
int use_embedded_filename;
|
1999-07-22 18:11:55 +00:00
|
|
|
int allow_non_selfsigned_uid;
|
2000-08-23 17:47:49 +00:00
|
|
|
int allow_freeform_uid;
|
1999-07-26 07:44:46 +00:00
|
|
|
int no_literal;
|
|
|
|
ulong set_filesize;
|
1999-10-08 18:34:56 +00:00
|
|
|
int honor_http_proxy;
|
1999-11-29 20:44:31 +00:00
|
|
|
int fast_list_mode;
|
2001-03-14 06:56:11 +00:00
|
|
|
int fixed_list_mode;
|
2000-02-09 14:35:37 +00:00
|
|
|
int ignore_time_conflict;
|
2001-08-01 10:30:24 +00:00
|
|
|
int ignore_valid_from;
|
2000-10-19 16:01:37 +00:00
|
|
|
int ignore_crc_error;
|
2000-05-18 09:30:29 +00:00
|
|
|
int command_fd;
|
2000-07-27 10:01:27 +00:00
|
|
|
const char *override_session_key;
|
|
|
|
int show_session_key;
|
2000-11-16 15:45:03 +00:00
|
|
|
int use_agent;
|
2002-01-26 16:34:00 +00:00
|
|
|
const char *gpg_agent_info;
|
2000-07-27 15:33:37 +00:00
|
|
|
int merge_only;
|
2000-08-01 18:06:27 +00:00
|
|
|
int try_all_secrets;
|
2001-01-11 13:20:02 +00:00
|
|
|
int no_expensive_trust_checks;
|
2001-03-27 18:13:44 +00:00
|
|
|
int no_sig_cache;
|
|
|
|
int no_sig_create_check;
|
2001-09-24 16:03:14 +00:00
|
|
|
int no_auto_check_trustdb;
|
2001-07-26 09:37:47 +00:00
|
|
|
int preserve_permissions;
|
2001-08-07 15:35:13 +00:00
|
|
|
int no_homedir_creation;
|
2001-12-21 20:08:51 +00:00
|
|
|
int show_keyring;
|
1997-11-18 14:06:00 +00:00
|
|
|
} opt;
|
|
|
|
|
|
|
|
|
1998-07-29 19:35:05 +00:00
|
|
|
#define EMUBUG_GPGCHKSUM 1
|
1999-10-04 19:27:02 +00:00
|
|
|
#define EMUBUG_3DESS2K 2
|
2000-06-05 21:28:41 +00:00
|
|
|
#define EMUBUG_MDENCODE 4
|
1998-07-29 19:35:05 +00:00
|
|
|
|
1997-11-18 14:06:00 +00:00
|
|
|
#define DBG_PACKET_VALUE 1 /* debug packet reading/writing */
|
|
|
|
#define DBG_MPI_VALUE 2 /* debug mpi details */
|
|
|
|
#define DBG_CIPHER_VALUE 4 /* debug cipher handling */
|
|
|
|
/* (may reveal sensitive data) */
|
|
|
|
#define DBG_FILTER_VALUE 8 /* debug internal filter handling */
|
|
|
|
#define DBG_IOBUF_VALUE 16 /* debug iobuf stuff */
|
|
|
|
#define DBG_MEMORY_VALUE 32 /* debug memory allocation stuff */
|
|
|
|
#define DBG_CACHE_VALUE 64 /* debug the cacheing */
|
|
|
|
#define DBG_MEMSTAT_VALUE 128 /* show memory statistics */
|
1998-01-13 19:04:23 +00:00
|
|
|
#define DBG_TRUST_VALUE 256 /* debug the trustdb */
|
2000-06-28 09:56:18 +00:00
|
|
|
#define DBG_HASHING_VALUE 512 /* debug hashing operations */
|
2002-05-29 18:46:49 +00:00
|
|
|
#define DBG_EXTPROG_VALUE 1024 /* debug external program calls */
|
1997-11-18 14:06:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define DBG_PACKET (opt.debug & DBG_PACKET_VALUE)
|
|
|
|
#define DBG_FILTER (opt.debug & DBG_FILTER_VALUE)
|
|
|
|
#define DBG_CACHE (opt.debug & DBG_CACHE_VALUE)
|
1998-01-13 19:04:23 +00:00
|
|
|
#define DBG_TRUST (opt.debug & DBG_TRUST_VALUE)
|
2000-06-28 09:56:18 +00:00
|
|
|
#define DBG_HASHING (opt.debug & DBG_HASHING_VALUE)
|
2002-05-29 18:46:49 +00:00
|
|
|
#define DBG_EXTPROG (opt.debug & DBG_EXTPROG_VALUE)
|
1997-11-18 14:06:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif /*G10_OPTIONS_H*/
|