aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 600f8440d..110289243 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -110,6 +110,7 @@ enum cmd_and_opt_values
oCertNotation,
oShowNotation,
oNoShowNotation,
+ oKnownNotation,
aEncrFiles,
aEncrSym,
aDecryptFiles,
@@ -225,6 +226,7 @@ enum cmd_and_opt_values
oDebugAll,
oDebugIOLBF,
oDebugSetIobufSize,
+ oDebugAllowLargeChunks,
oStatusFD,
oStatusFile,
oAttributeFD,
@@ -634,6 +636,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oDebugAll, "debug-all", "@"),
ARGPARSE_s_n (oDebugIOLBF, "debug-iolbf", "@"),
ARGPARSE_s_u (oDebugSetIobufSize, "debug-set-iobuf-size", "@"),
+ ARGPARSE_s_u (oDebugAllowLargeChunks, "debug-allow-large-chunks", "@"),
ARGPARSE_s_i (oStatusFD, "status-fd", "@"),
ARGPARSE_s_s (oStatusFile, "status-file", "@"),
ARGPARSE_s_i (oAttributeFD, "attribute-fd", "@"),
@@ -680,6 +683,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_s (oSetNotation, "set-notation", "@"),
ARGPARSE_s_s (oSigNotation, "sig-notation", "@"),
ARGPARSE_s_s (oCertNotation, "cert-notation", "@"),
+ ARGPARSE_s_s (oKnownNotation, "known-notation", "@"),
ARGPARSE_group (302, N_(
"@\n(See the man page for a complete listing of all commands and options)\n"
@@ -2347,6 +2351,7 @@ main (int argc, char **argv)
static int print_dane_records;
static int print_pka_records;
+ static int allow_large_chunks;
#ifdef __riscos__
@@ -2761,6 +2766,10 @@ main (int argc, char **argv)
opt_set_iobuf_size_used = 1;
break;
+ case oDebugAllowLargeChunks:
+ allow_large_chunks = 1;
+ break;
+
case oStatusFD:
set_status_fd ( translate_sys2libc_fd_int (pargs.r.ret_int, 1) );
break;
@@ -3121,7 +3130,7 @@ main (int argc, char **argv)
break;
case oSender:
{
- char *mbox = mailbox_from_userid (pargs.r.ret_str);
+ char *mbox = mailbox_from_userid (pargs.r.ret_str, 0);
if (!mbox)
log_error (_("\"%s\" is not a proper mail address\n"),
pargs.r.ret_str);
@@ -3358,6 +3367,7 @@ main (int argc, char **argv)
break;
case oSigNotation: add_notation_data( pargs.r.ret_str, 0 ); break;
case oCertNotation: add_notation_data( pargs.r.ret_str, 1 ); break;
+ case oKnownNotation: register_known_notation (pargs.r.ret_str); break;
case oShowNotation:
deprecated_warning(configname,configlineno,"--show-notation",
"--list-options ","show-notations");
@@ -3881,18 +3891,18 @@ main (int argc, char **argv)
keygen_set_std_prefs(pers_compress_list,PREFTYPE_ZIP))
log_error(_("invalid personal compress preferences\n"));
- /* Check chunk size. Please fix also the man page if you chnage
+ /* Check chunk size. Please fix also the man page if you change
* the default. The limits are given by the specs. */
if (!opt.chunk_size)
- opt.chunk_size = 30; /* Default to 1 GiB chunks. */
+ opt.chunk_size = 27; /* Default to the suggested max of 128 MiB. */
else if (opt.chunk_size < 6)
{
opt.chunk_size = 6;
log_info (_("chunk size invalid - using %d\n"), opt.chunk_size);
}
- else if (opt.chunk_size > 62)
+ else if (opt.chunk_size > (allow_large_chunks? 62 : 27))
{
- opt.chunk_size = 62;
+ opt.chunk_size = (allow_large_chunks? 62 : 27);
log_info (_("chunk size invalid - using %d\n"), opt.chunk_size);
}
@@ -4865,9 +4875,9 @@ main (int argc, char **argv)
while( endless || count ) {
byte *p;
- /* Wee need a multiple of 3, so that in case of
+ /* We need a multiple of 3, so that in case of
armored output we get a correct string. No
- linefolding is done, as it is best to levae this to
+ linefolding is done, as it is best to leave this to
other tools */
size_t n = !endless && count < 99? count : 99;