mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
See ChangeLog: Tue Jul 13 17:39:25 CEST 1999 Werner Koch
This commit is contained in:
parent
8caf2f7437
commit
68512418bd
4
NEWS
4
NEWS
@ -14,6 +14,10 @@
|
|||||||
* New commands --lsign-key and made --sign-key a shortcut for --edit
|
* New commands --lsign-key and made --sign-key a shortcut for --edit
|
||||||
and sign.
|
and sign.
|
||||||
|
|
||||||
|
* New options (#122--124 ;-) --[no-]default-recipient[-self]. See the
|
||||||
|
man page.
|
||||||
|
|
||||||
|
* Enhanced info output in case of multiple recipients and fixed exit code.
|
||||||
|
|
||||||
Noteworthy changes in version 0.9.8
|
Noteworthy changes in version 0.9.8
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
3
THANKS
3
THANKS
@ -20,6 +20,7 @@ David Ellement ellement@sdd.hp.com
|
|||||||
Detlef Lannert lannert@lannert.rz.uni-duesseldorf.de
|
Detlef Lannert lannert@lannert.rz.uni-duesseldorf.de
|
||||||
Dirk Lattermann dlatt@t-online.de
|
Dirk Lattermann dlatt@t-online.de
|
||||||
Ed Boraas ecxjo@esperanto.org
|
Ed Boraas ecxjo@esperanto.org
|
||||||
|
Enzo Michelangeli em@MailAndNews.com
|
||||||
Ernst Molitor ernst.molitor@uni-bonn.de
|
Ernst Molitor ernst.molitor@uni-bonn.de
|
||||||
Fabio Coatti cova@felix.unife.it
|
Fabio Coatti cova@felix.unife.it
|
||||||
Felix von Leitner leitner@amdiv.de
|
Felix von Leitner leitner@amdiv.de
|
||||||
@ -97,7 +98,7 @@ Wim Vandeputte bunbun@reptile.rug.ac.be
|
|||||||
nbecker@hns.com
|
nbecker@hns.com
|
||||||
|
|
||||||
Thanks to the German Unix User Group for providing FTP space,
|
Thanks to the German Unix User Group for providing FTP space,
|
||||||
Martin Hamilton for hosting the mailing list and hsp for
|
Martin Hamilton for hosting the mailing list and HSP for
|
||||||
hosting gnupg.org.
|
hosting gnupg.org.
|
||||||
|
|
||||||
Many thanks to my wife Gerlinde for having so much patience with
|
Many thanks to my wife Gerlinde for having so much patience with
|
||||||
|
2
TODO
2
TODO
@ -14,6 +14,8 @@
|
|||||||
* find a way to allow the import of non-self-signed keys. This is needed
|
* find a way to allow the import of non-self-signed keys. This is needed
|
||||||
for the IN ENCR/SIGN hack.
|
for the IN ENCR/SIGN hack.
|
||||||
|
|
||||||
|
* add an option to use a OpenPGP packet as input (and don't build a literal
|
||||||
|
data packet)
|
||||||
|
|
||||||
Nice to have
|
Nice to have
|
||||||
------------
|
------------
|
||||||
|
51
doc/gpg.sgml
51
doc/gpg.sgml
@ -464,6 +464,34 @@ values will be overwritten.
|
|||||||
</para></listitem></varlistentry>
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>--print-md <parameter>algo</parameter> &OptParmFiles;</term>
|
||||||
|
<listitem><para>
|
||||||
|
Print message digest og algorithm ALGO for all given files of stdin.
|
||||||
|
If "*" is used for the algorithm, digests for all available algorithms
|
||||||
|
are printed.
|
||||||
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>--gen-random <parameter>0|1|2</parameter>
|
||||||
|
<optional><parameter>count</parameter></optional></term>
|
||||||
|
<listitem><para>
|
||||||
|
Emit COUNT random bytes of the given quality level. If count is not given
|
||||||
|
or zero, an endless sequenece of random bytes will be emitted.
|
||||||
|
PLEASE, don't use this command unless you know waht you are doing, it may
|
||||||
|
remove precious entropy from the system!
|
||||||
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>--gen-prime <parameter>mode</parameter>
|
||||||
|
<parameter>bits</parameter>
|
||||||
|
<optional><parameter>qbits</parameter></optional></term>
|
||||||
|
<listitem><para>
|
||||||
|
Use the source, Luke :-). The output format is still subject to change.
|
||||||
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>--version</term>
|
<term>--version</term>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
@ -544,9 +572,30 @@ found in the secret keyring.
|
|||||||
<term></term>
|
<term></term>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
Encrypt for user id &ParmName;. If this option is not
|
Encrypt for user id &ParmName;. If this option is not
|
||||||
specified, GnuPG asks for the user id.
|
specified, GnuPG asks for the user-id unless --default-recipient is given
|
||||||
</para></listitem></varlistentry>
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>--default-recipient &ParmName;</term>
|
||||||
|
<listitem><para>
|
||||||
|
Use &ParmName; as default recipient if option --recipient is not used and
|
||||||
|
don't ask if this is a valid one. &ParmName; must be a non empty.
|
||||||
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>--default-recipient-self</term>
|
||||||
|
<listitem><para>
|
||||||
|
Use the default key as default recipient if option --recipient is not used and
|
||||||
|
don't ask if this is a valid one. The default key is the first one from the
|
||||||
|
secret keyring or the one set with --default-key.
|
||||||
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>--no-default-recipient</term>
|
||||||
|
<listitem><para>
|
||||||
|
Reset --default-recipient and --default-recipient-self.
|
||||||
|
</para></listitem></varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>--encrypt-to &ParmName;</term>
|
<term>--encrypt-to &ParmName;</term>
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
Tue Jul 13 17:39:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
|
|
||||||
|
* pkclist.c (do_edit_ownertrust): Changed the way help works.
|
||||||
|
(build_pk_list): Implemented default recipient stuff.
|
||||||
|
* g10.c: New options --default-recipient[-self]
|
||||||
|
(main): Suppress greeting in most cases, entering a passphrase or
|
||||||
|
a missing value is not considered to be interactive use.
|
||||||
|
Merged --print-md and --print-mds; the latter is now obsolete.
|
||||||
|
Changed the way --gen-random works and documented it.
|
||||||
|
Changed the way --gen-prime works and add a man entry.
|
||||||
|
* g10.c (MAINTAINER_OPTIONS): Removed.
|
||||||
|
|
||||||
Mon Jul 12 18:45:57 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
Mon Jul 12 18:45:57 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,13 +19,6 @@
|
|||||||
#-----------------------------------------------
|
#-----------------------------------------------
|
||||||
# With some exceptions, these cannot be combined
|
# With some exceptions, these cannot be combined
|
||||||
|
|
||||||
print-md algo
|
|
||||||
# print the message digest of algorithm ALGO for stdin or all
|
|
||||||
# given filenames
|
|
||||||
|
|
||||||
print-mds
|
|
||||||
# print all message digests of all give filenames
|
|
||||||
|
|
||||||
store
|
store
|
||||||
# simply packs the input data into a rfc1991 packet format
|
# simply packs the input data into a rfc1991 packet format
|
||||||
|
|
||||||
|
129
g10/g10.c
129
g10/g10.c
@ -26,7 +26,6 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#define MAINTAINER_OPTIONS
|
|
||||||
|
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
#include "iobuf.h"
|
#include "iobuf.h"
|
||||||
@ -112,6 +111,9 @@ enum cmd_and_opt_values { aNull = 0,
|
|||||||
oKeyring,
|
oKeyring,
|
||||||
oSecretKeyring,
|
oSecretKeyring,
|
||||||
oDefaultKey,
|
oDefaultKey,
|
||||||
|
oDefRecipient,
|
||||||
|
oDefRecipientSelf,
|
||||||
|
oNoDefRecipient,
|
||||||
oOptions,
|
oOptions,
|
||||||
oDebug,
|
oDebug,
|
||||||
oDebugAll,
|
oDebugAll,
|
||||||
@ -217,17 +219,19 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
{ aDeArmor, "dearmor", 256, N_("De-Armor a file or stdin") },
|
{ aDeArmor, "dearmor", 256, N_("De-Armor a file or stdin") },
|
||||||
{ aEnArmor, "enarmor", 256, N_("En-Armor a file or stdin") },
|
{ aEnArmor, "enarmor", 256, N_("En-Armor a file or stdin") },
|
||||||
{ aPrintMD, "print-md" , 256, N_("|algo [files]|print message digests")},
|
{ aPrintMD, "print-md" , 256, N_("|algo [files]|print message digests")},
|
||||||
{ aPrintMDs, "print-mds" , 256, N_("print all message digests")},
|
|
||||||
#ifdef MAINTAINER_OPTIONS
|
|
||||||
{ aPrimegen, "gen-prime" , 256, "@" },
|
{ aPrimegen, "gen-prime" , 256, "@" },
|
||||||
{ aGenRandom, "gen-random" , 256, "@" },
|
{ aGenRandom, "gen-random" , 256, "@" },
|
||||||
#endif
|
|
||||||
|
|
||||||
{ 301, NULL, 0, N_("@\nOptions:\n ") },
|
{ 301, NULL, 0, N_("@\nOptions:\n ") },
|
||||||
|
|
||||||
{ oArmor, "armor", 0, N_("create ascii armored output")},
|
{ oArmor, "armor", 0, N_("create ascii armored output")},
|
||||||
{ oRecipient, "recipient", 2, N_("|NAME|encrypt for NAME")},
|
{ oRecipient, "recipient", 2, N_("|NAME|encrypt for NAME")},
|
||||||
{ oRecipient, "remote-user", 2, "@"}, /* old option name */
|
{ oRecipient, "remote-user", 2, "@"}, /* old option name */
|
||||||
|
{ oDefRecipient, "default-recipient" ,2,
|
||||||
|
N_("|NAME|use NAME as default recipient")},
|
||||||
|
{ oDefRecipientSelf, "default-recipient-self" ,0,
|
||||||
|
N_("use the default key as default recipient")},
|
||||||
|
{ oNoDefRecipient, "no-default-recipient", 0, "@" },
|
||||||
{ oEncryptTo, "encrypt-to", 2, "@" },
|
{ oEncryptTo, "encrypt-to", 2, "@" },
|
||||||
{ oNoEncryptTo, "no-encrypt-to", 0, "@" },
|
{ oNoEncryptTo, "no-encrypt-to", 0, "@" },
|
||||||
{ oUser, "local-user",2, N_("use this user-id to sign or decrypt")},
|
{ oUser, "local-user",2, N_("use this user-id to sign or decrypt")},
|
||||||
@ -282,6 +286,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
|
|
||||||
/* hidden options */
|
/* hidden options */
|
||||||
{ aExportOwnerTrust, "list-ownertrust",0 , "@"}, /* alias */
|
{ aExportOwnerTrust, "list-ownertrust",0 , "@"}, /* alias */
|
||||||
|
{ aPrintMDs, "print-mds" , 256, "@"}, /* old */
|
||||||
{ aListTrustDB, "list-trustdb",0 , "@"},
|
{ aListTrustDB, "list-trustdb",0 , "@"},
|
||||||
{ aListTrustPath, "list-trust-path",0, "@"},
|
{ aListTrustPath, "list-trust-path",0, "@"},
|
||||||
{ oKOption, NULL, 0, "@"},
|
{ oKOption, NULL, 0, "@"},
|
||||||
@ -520,7 +525,7 @@ main( int argc, char **argv )
|
|||||||
int parse_debug = 0;
|
int parse_debug = 0;
|
||||||
int default_config =1;
|
int default_config =1;
|
||||||
int default_keyring = 1;
|
int default_keyring = 1;
|
||||||
int greeting = 1;
|
int greeting = 0;
|
||||||
enum cmd_and_opt_values cmd = 0;
|
enum cmd_and_opt_values cmd = 0;
|
||||||
const char *trustdb_name = NULL;
|
const char *trustdb_name = NULL;
|
||||||
char *def_cipher_string = NULL;
|
char *def_cipher_string = NULL;
|
||||||
@ -654,26 +659,25 @@ main( int argc, char **argv )
|
|||||||
case aListKeys: set_cmd( &cmd, aListKeys); break;
|
case aListKeys: set_cmd( &cmd, aListKeys); break;
|
||||||
case aListSigs: set_cmd( &cmd, aListSigs); break;
|
case aListSigs: set_cmd( &cmd, aListSigs); break;
|
||||||
case aExportSecret: set_cmd( &cmd, aExportSecret); break;
|
case aExportSecret: set_cmd( &cmd, aExportSecret); break;
|
||||||
case aDeleteSecretKey: set_cmd( &cmd, aDeleteSecretKey); break;
|
case aDeleteSecretKey: set_cmd( &cmd, aDeleteSecretKey);
|
||||||
case aDeleteKey: set_cmd( &cmd, aDeleteKey); break;
|
greeting=1; break;
|
||||||
|
case aDeleteKey: set_cmd( &cmd, aDeleteKey); greeting=1; break;
|
||||||
|
|
||||||
case aDetachedSign: detached_sig = 1; set_cmd( &cmd, aSign ); break;
|
case aDetachedSign: detached_sig = 1; set_cmd( &cmd, aSign ); break;
|
||||||
case aSym: set_cmd( &cmd, aSym); break;
|
case aSym: set_cmd( &cmd, aSym); break;
|
||||||
case aDecrypt: set_cmd( &cmd, aDecrypt); break;
|
case aDecrypt: set_cmd( &cmd, aDecrypt); break;
|
||||||
case aEncr: set_cmd( &cmd, aEncr); break;
|
case aEncr: set_cmd( &cmd, aEncr); break;
|
||||||
case aSign: set_cmd( &cmd, aSign ); break;
|
case aSign: set_cmd( &cmd, aSign ); break;
|
||||||
case aKeygen: set_cmd( &cmd, aKeygen); break;
|
case aKeygen: set_cmd( &cmd, aKeygen); greeting=1; break;
|
||||||
case aSignKey: set_cmd( &cmd, aSignKey); break;
|
case aSignKey: set_cmd( &cmd, aSignKey); break;
|
||||||
case aLSignKey: set_cmd( &cmd, aLSignKey); break;
|
case aLSignKey: set_cmd( &cmd, aLSignKey); break;
|
||||||
case aStore: set_cmd( &cmd, aStore); break;
|
case aStore: set_cmd( &cmd, aStore); break;
|
||||||
case aEditKey: set_cmd( &cmd, aEditKey); break;
|
case aEditKey: set_cmd( &cmd, aEditKey); greeting=1; break;
|
||||||
case aClearsign: set_cmd( &cmd, aClearsign); break;
|
case aClearsign: set_cmd( &cmd, aClearsign); break;
|
||||||
case aGenRevoke: set_cmd( &cmd, aGenRevoke); break;
|
case aGenRevoke: set_cmd( &cmd, aGenRevoke); break;
|
||||||
case aVerify: set_cmd( &cmd, aVerify); break;
|
case aVerify: set_cmd( &cmd, aVerify); break;
|
||||||
#ifdef MAINTAINER_OPTIONS
|
|
||||||
case aPrimegen: set_cmd( &cmd, aPrimegen); break;
|
case aPrimegen: set_cmd( &cmd, aPrimegen); break;
|
||||||
case aGenRandom: set_cmd( &cmd, aGenRandom); break;
|
case aGenRandom: set_cmd( &cmd, aGenRandom); break;
|
||||||
#endif
|
|
||||||
case aPrintMD: set_cmd( &cmd, aPrintMD); break;
|
case aPrintMD: set_cmd( &cmd, aPrintMD); break;
|
||||||
case aPrintMDs: set_cmd( &cmd, aPrintMDs); break;
|
case aPrintMDs: set_cmd( &cmd, aPrintMDs); break;
|
||||||
case aListTrustDB: set_cmd( &cmd, aListTrustDB); break;
|
case aListTrustDB: set_cmd( &cmd, aListTrustDB); break;
|
||||||
@ -681,8 +685,8 @@ main( int argc, char **argv )
|
|||||||
case aUpdateTrustDB: set_cmd( &cmd, aUpdateTrustDB); break;
|
case aUpdateTrustDB: set_cmd( &cmd, aUpdateTrustDB); break;
|
||||||
case aFixTrustDB: set_cmd( &cmd, aFixTrustDB); break;
|
case aFixTrustDB: set_cmd( &cmd, aFixTrustDB); break;
|
||||||
case aListTrustPath: set_cmd( &cmd, aListTrustPath); break;
|
case aListTrustPath: set_cmd( &cmd, aListTrustPath); break;
|
||||||
case aDeArmor: set_cmd( &cmd, aDeArmor); greeting = 0; break;
|
case aDeArmor: set_cmd( &cmd, aDeArmor); break;
|
||||||
case aEnArmor: set_cmd( &cmd, aEnArmor); greeting = 0; break;
|
case aEnArmor: set_cmd( &cmd, aEnArmor); break;
|
||||||
case aExportOwnerTrust: set_cmd( &cmd, aExportOwnerTrust); break;
|
case aExportOwnerTrust: set_cmd( &cmd, aExportOwnerTrust); break;
|
||||||
case aImportOwnerTrust: set_cmd( &cmd, aImportOwnerTrust); break;
|
case aImportOwnerTrust: set_cmd( &cmd, aImportOwnerTrust); break;
|
||||||
|
|
||||||
@ -730,6 +734,18 @@ main( int argc, char **argv )
|
|||||||
case oMaxCertDepth: opt.max_cert_depth = pargs.r.ret_int; break;
|
case oMaxCertDepth: opt.max_cert_depth = pargs.r.ret_int; break;
|
||||||
case oTrustDBName: trustdb_name = pargs.r.ret_str; break;
|
case oTrustDBName: trustdb_name = pargs.r.ret_str; break;
|
||||||
case oDefaultKey: opt.def_secret_key = pargs.r.ret_str; break;
|
case oDefaultKey: opt.def_secret_key = pargs.r.ret_str; break;
|
||||||
|
case oDefRecipient:
|
||||||
|
if( *pargs.r.ret_str )
|
||||||
|
opt.def_recipient = make_username(pargs.r.ret_str);
|
||||||
|
break;
|
||||||
|
case oDefRecipientSelf:
|
||||||
|
m_free(opt.def_recipient); opt.def_recipient = NULL;
|
||||||
|
opt.def_recipient_self = 1;
|
||||||
|
break;
|
||||||
|
case oNoDefRecipient:
|
||||||
|
m_free(opt.def_recipient); opt.def_recipient = NULL;
|
||||||
|
opt.def_recipient_self = 0;
|
||||||
|
break;
|
||||||
case oNoOptions: break; /* no-options */
|
case oNoOptions: break; /* no-options */
|
||||||
case oHomedir: opt.homedir = pargs.r.ret_str; break;
|
case oHomedir: opt.homedir = pargs.r.ret_str; break;
|
||||||
case oNoBatch: opt.batch = 0; break;
|
case oNoBatch: opt.batch = 0; break;
|
||||||
@ -834,10 +850,11 @@ main( int argc, char **argv )
|
|||||||
fprintf(stderr, "%s %s; %s\n",
|
fprintf(stderr, "%s %s; %s\n",
|
||||||
strusage(11), strusage(13), strusage(14) );
|
strusage(11), strusage(13), strusage(14) );
|
||||||
fprintf(stderr, "%s\n", strusage(15) );
|
fprintf(stderr, "%s\n", strusage(15) );
|
||||||
|
}
|
||||||
#ifdef IS_DEVELOPMENT_VERSION
|
#ifdef IS_DEVELOPMENT_VERSION
|
||||||
|
if( !opt.batch )
|
||||||
log_info("NOTE: this is a development version!\n");
|
log_info("NOTE: this is a development version!\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
if( opt.batch )
|
if( opt.batch )
|
||||||
tty_batchmode( 1 );
|
tty_batchmode( 1 );
|
||||||
|
|
||||||
@ -1191,68 +1208,70 @@ main( int argc, char **argv )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
#ifdef MAINTAINER_OPTIONS
|
|
||||||
case aPrimegen:
|
case aPrimegen:
|
||||||
if( argc == 1 ) {
|
{ int mode = argc < 2 ? 0 : atoi(*argv);
|
||||||
mpi_print( stdout, generate_public_prime( atoi(argv[0]) ), 1);
|
|
||||||
putchar('\n');
|
if( mode == 1 && argc == 2 ) {
|
||||||
|
mpi_print( stdout, generate_public_prime( atoi(argv[1]) ), 1);
|
||||||
}
|
}
|
||||||
else if( argc == 2 ) {
|
else if( mode == 2 && argc == 3 ) {
|
||||||
mpi_print( stdout, generate_elg_prime( 0, atoi(argv[0]),
|
mpi_print( stdout, generate_elg_prime(
|
||||||
atoi(argv[1]), NULL,NULL ), 1);
|
0, atoi(argv[1]),
|
||||||
putchar('\n');
|
atoi(argv[2]), NULL,NULL ), 1);
|
||||||
}
|
}
|
||||||
else if( argc == 3 ) {
|
else if( mode == 3 && argc == 3 ) {
|
||||||
|
MPI *factors;
|
||||||
|
mpi_print( stdout, generate_elg_prime(
|
||||||
|
1, atoi(argv[1]),
|
||||||
|
atoi(argv[2]), NULL,&factors ), 1);
|
||||||
|
putchar('\n');
|
||||||
|
mpi_print( stdout, factors[0], 1 ); /* print q */
|
||||||
|
}
|
||||||
|
else if( mode == 4 && argc == 3 ) {
|
||||||
MPI g = mpi_alloc(1);
|
MPI g = mpi_alloc(1);
|
||||||
mpi_print( stdout, generate_elg_prime( 0, atoi(argv[0]),
|
mpi_print( stdout, generate_elg_prime(
|
||||||
atoi(argv[1]), g, NULL ), 1);
|
0, atoi(argv[1]),
|
||||||
printf("\nGenerator: ");
|
atoi(argv[2]), g, NULL ), 1);
|
||||||
mpi_print( stdout, g, 1 );
|
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
|
mpi_print( stdout, g, 1 );
|
||||||
mpi_free(g);
|
mpi_free(g);
|
||||||
}
|
}
|
||||||
else if( argc == 4 ) {
|
else
|
||||||
mpi_print( stdout, generate_elg_prime( 1, atoi(argv[0]),
|
wrong_args("--gen-prime mode bits [qbits] ");
|
||||||
atoi(argv[1]), NULL,NULL ), 1);
|
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
}
|
}
|
||||||
else
|
|
||||||
usage(1);
|
|
||||||
break;
|
break;
|
||||||
#endif /* MAINTAINER OPTIONS */
|
|
||||||
|
|
||||||
#ifdef MAINTAINER_OPTIONS
|
|
||||||
case aGenRandom:
|
case aGenRandom:
|
||||||
if( argc < 1 || argc > 2 )
|
|
||||||
wrong_args("--gen-random level [hex]");
|
|
||||||
{
|
{
|
||||||
int c;
|
int level = argc ? atoi(*argv):0;
|
||||||
int level = atoi(*argv);
|
int count = argc > 1 ? atoi(argv[1]): 0;
|
||||||
for(;;) {
|
int endless = !count;
|
||||||
|
|
||||||
|
if( argc < 1 || argc > 2 || level < 0 || level > 2 || count < 0 )
|
||||||
|
wrong_args("--gen-random 0|1|2 [count]");
|
||||||
|
|
||||||
|
while( endless || count ) {
|
||||||
byte *p;
|
byte *p;
|
||||||
if( argc == 2 ) {
|
size_t n = !endless && count < 100? count : 100;
|
||||||
p = get_random_bits( 8, level, 0);
|
|
||||||
printf("%02x", *p );
|
p = get_random_bits( n*8, level, 0);
|
||||||
fflush(stdout);
|
fwrite( p, n, 1, stdout );
|
||||||
}
|
|
||||||
else {
|
|
||||||
p = get_random_bits( 800, level, 0);
|
|
||||||
for(c=0; c < 100; c++ )
|
|
||||||
putchar( p[c] );
|
|
||||||
}
|
|
||||||
m_free(p);
|
m_free(p);
|
||||||
|
if( !endless )
|
||||||
|
count -= n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif /* MAINTAINER OPTIONS */
|
|
||||||
|
|
||||||
case aPrintMD:
|
case aPrintMD:
|
||||||
if( argc < 1)
|
if( argc < 1)
|
||||||
wrong_args("--print-md algo [file]");
|
wrong_args("--print-md algo [files]");
|
||||||
else {
|
{
|
||||||
int algo = string_to_digest_algo(*argv);
|
int all_algos = (**argv=='*' && !(*argv)[1]);
|
||||||
|
int algo = all_algos? 0 : string_to_digest_algo(*argv);
|
||||||
|
|
||||||
if( !algo )
|
if( !algo && !all_algos )
|
||||||
log_error(_("invalid hash algorithm `%s'\n"), *argv );
|
log_error(_("invalid hash algorithm `%s'\n"), *argv );
|
||||||
else {
|
else {
|
||||||
argc--; argv++;
|
argc--; argv++;
|
||||||
@ -1266,7 +1285,7 @@ main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case aPrintMDs:
|
case aPrintMDs: /* old option */
|
||||||
if( !argc )
|
if( !argc )
|
||||||
print_mds(NULL,0);
|
print_mds(NULL,0);
|
||||||
else {
|
else {
|
||||||
|
@ -50,6 +50,8 @@ struct {
|
|||||||
int def_digest_algo;
|
int def_digest_algo;
|
||||||
int def_compress_algo;
|
int def_compress_algo;
|
||||||
const char *def_secret_key;
|
const char *def_secret_key;
|
||||||
|
char *def_recipient;
|
||||||
|
int def_recipient_self;
|
||||||
int no_comment;
|
int no_comment;
|
||||||
int no_version;
|
int no_version;
|
||||||
int marginals_needed;
|
int marginals_needed;
|
||||||
|
@ -22,6 +22,15 @@ $Id$
|
|||||||
|
|
||||||
# default-key 621CC013
|
# default-key 621CC013
|
||||||
|
|
||||||
|
# If you do not pass a recipient to gpg, it will ask for one.
|
||||||
|
# Using this option you can encrypt to a default key. key validation
|
||||||
|
# will not be done in this case.
|
||||||
|
# The second form uses the default key as default recipient.
|
||||||
|
|
||||||
|
# default-recipient some-user-id
|
||||||
|
# default-recipient-self
|
||||||
|
|
||||||
|
|
||||||
# The next option is enabled because this one is needed for interoperation
|
# The next option is enabled because this one is needed for interoperation
|
||||||
# with PGP 5 users. To enable full OpenPGP compliance you have to remove
|
# with PGP 5 users. To enable full OpenPGP compliance you have to remove
|
||||||
# this option.
|
# this option.
|
||||||
@ -52,8 +61,11 @@ escape-from-lines
|
|||||||
# every time it is needed - normally this is not needed.
|
# every time it is needed - normally this is not needed.
|
||||||
lock-once
|
lock-once
|
||||||
|
|
||||||
# If you have configured GnuPG without a random gatherer,
|
# If you have configured GnuPG without a random gatherer
|
||||||
# you have to uncomment one of the following lines.
|
# (./configure --enable-static-rnd=none), you have to
|
||||||
|
# uncomment _one_ of the following lines. These
|
||||||
|
# extensions won't get used if you have a random gatherer
|
||||||
|
# compiled in (which is the default for GNU and xxxBSD systems)
|
||||||
#load-extension rndlinux
|
#load-extension rndlinux
|
||||||
#load-extension rndunix
|
#load-extension rndunix
|
||||||
#load-extension rndegd
|
#load-extension rndegd
|
||||||
|
106
g10/pkclist.c
106
g10/pkclist.c
@ -108,7 +108,7 @@ show_paths( ulong lid, int only_first )
|
|||||||
* Returns true if an ownertrust has changed.
|
* Returns true if an ownertrust has changed.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
do_edit_ownertrust( ulong lid, int mode, unsigned *new_trust )
|
do_edit_ownertrust( ulong lid, int mode, unsigned *new_trust, int defer_help )
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
int rc;
|
int rc;
|
||||||
@ -118,6 +118,7 @@ do_edit_ownertrust( ulong lid, int mode, unsigned *new_trust )
|
|||||||
int changed=0;
|
int changed=0;
|
||||||
int quit=0;
|
int quit=0;
|
||||||
int show=0;
|
int show=0;
|
||||||
|
int did_help=defer_help;
|
||||||
|
|
||||||
rc = keyid_from_lid( lid, keyid );
|
rc = keyid_from_lid( lid, keyid );
|
||||||
if( rc ) {
|
if( rc ) {
|
||||||
@ -133,6 +134,12 @@ do_edit_ownertrust( ulong lid, int mode, unsigned *new_trust )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for(;;) {
|
||||||
|
/* a string with valid answers */
|
||||||
|
char *ans = _("sSmMqQ");
|
||||||
|
|
||||||
|
if( !did_help ) {
|
||||||
if( !mode ) {
|
if( !mode ) {
|
||||||
tty_printf(_("No trust value assigned to %lu:\n"
|
tty_printf(_("No trust value assigned to %lu:\n"
|
||||||
"%4u%c/%08lX %s \""), lid,
|
"%4u%c/%08lX %s \""), lid,
|
||||||
@ -157,17 +164,16 @@ do_edit_ownertrust( ulong lid, int mode, unsigned *new_trust )
|
|||||||
else
|
else
|
||||||
tty_printf(_(" q = quit\n"));
|
tty_printf(_(" q = quit\n"));
|
||||||
tty_printf("\n");
|
tty_printf("\n");
|
||||||
|
did_help = 1;
|
||||||
for(;;) {
|
}
|
||||||
/* a string with valid answers */
|
|
||||||
char *ans = _("sSmMqQ");
|
|
||||||
|
|
||||||
if( strlen(ans) != 6 )
|
if( strlen(ans) != 6 )
|
||||||
BUG();
|
BUG();
|
||||||
p = cpr_get("edit_ownertrust.value",_("Your decision? "));
|
p = cpr_get("edit_ownertrust.value",_("Your decision? "));
|
||||||
trim_spaces(p);
|
trim_spaces(p);
|
||||||
cpr_kill_prompt();
|
cpr_kill_prompt();
|
||||||
if( *p && p[1] )
|
if( !*p )
|
||||||
|
did_help = 0;
|
||||||
|
else if( *p && p[1] )
|
||||||
;
|
;
|
||||||
else if( !p[1] && (*p >= '1' && *p <= '4') ) {
|
else if( !p[1] && (*p >= '1' && *p <= '4') ) {
|
||||||
unsigned trust;
|
unsigned trust;
|
||||||
@ -207,13 +213,15 @@ int
|
|||||||
edit_ownertrust( ulong lid, int mode )
|
edit_ownertrust( ulong lid, int mode )
|
||||||
{
|
{
|
||||||
unsigned int trust;
|
unsigned int trust;
|
||||||
|
int no_help = 0;
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
switch( do_edit_ownertrust( lid, mode, &trust ) ) {
|
switch( do_edit_ownertrust( lid, mode, &trust, no_help ) ) {
|
||||||
case -1:
|
case -1:
|
||||||
return 0;
|
return 0;
|
||||||
case -2:
|
case -2:
|
||||||
show_paths( lid, 1 );
|
show_paths( lid, 1 );
|
||||||
|
no_help = 1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
trust &= ~TRUST_FLAG_DISABLED;
|
trust &= ~TRUST_FLAG_DISABLED;
|
||||||
@ -231,7 +239,7 @@ static int
|
|||||||
add_ownertrust_cb( ulong lid )
|
add_ownertrust_cb( ulong lid )
|
||||||
{
|
{
|
||||||
unsigned trust;
|
unsigned trust;
|
||||||
int rc = do_edit_ownertrust( lid, 0, &trust );
|
int rc = do_edit_ownertrust( lid, 0, &trust, 0 );
|
||||||
|
|
||||||
if( rc == 1 )
|
if( rc == 1 )
|
||||||
return trust & TRUST_MASK;
|
return trust & TRUST_MASK;
|
||||||
@ -560,6 +568,42 @@ key_present_in_pk_list(PK_LIST pk_list, PKT_public_key *pk)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/****************
|
||||||
|
* Return a malloced string with a default reciepient if there is any
|
||||||
|
*/
|
||||||
|
static char *
|
||||||
|
default_recipient(void)
|
||||||
|
{
|
||||||
|
PKT_secret_key *sk;
|
||||||
|
byte fpr[MAX_FINGERPRINT_LEN+1];
|
||||||
|
size_t n;
|
||||||
|
char *p;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if( opt.def_recipient )
|
||||||
|
return m_strdup( opt.def_recipient );
|
||||||
|
if( !opt.def_recipient_self )
|
||||||
|
return NULL;
|
||||||
|
sk = m_alloc_clear( sizeof *sk );
|
||||||
|
i = get_seckey_byname( sk, NULL, 0 );
|
||||||
|
if( i ) {
|
||||||
|
free_secret_key( sk );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
n = MAX_FINGERPRINT_LEN;
|
||||||
|
fingerprint_from_sk( sk, fpr, &n );
|
||||||
|
free_secret_key( sk );
|
||||||
|
p = m_alloc( 2*n+3 );
|
||||||
|
*p++ = '0';
|
||||||
|
*p++ = 'x';
|
||||||
|
for(i=0; i < n; i++ )
|
||||||
|
sprintf( p+2*i, "%02X", fpr[i] );
|
||||||
|
p -= 2;
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use )
|
build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use )
|
||||||
{
|
{
|
||||||
@ -568,6 +612,7 @@ build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use )
|
|||||||
int rc=0;
|
int rc=0;
|
||||||
int any_recipients=0;
|
int any_recipients=0;
|
||||||
STRLIST rov;
|
STRLIST rov;
|
||||||
|
char *def_rec = NULL;
|
||||||
|
|
||||||
/* check whether there are any recipients in the list and build the
|
/* check whether there are any recipients in the list and build the
|
||||||
* list of the encrypt-to ones (we always trust them) */
|
* list of the encrypt-to ones (we always trust them) */
|
||||||
@ -608,16 +653,26 @@ build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use )
|
|||||||
|
|
||||||
if( !any_recipients && !opt.batch ) { /* ask */
|
if( !any_recipients && !opt.batch ) { /* ask */
|
||||||
char *answer=NULL;
|
char *answer=NULL;
|
||||||
|
int have_def_rec;
|
||||||
|
|
||||||
|
def_rec = default_recipient();
|
||||||
|
have_def_rec = !!def_rec;
|
||||||
|
if( !have_def_rec )
|
||||||
tty_printf(_(
|
tty_printf(_(
|
||||||
"You did not specify a user ID. (you may use \"-r\")\n\n"));
|
"You did not specify a user ID. (you may use \"-r\")\n\n"));
|
||||||
for(;;) {
|
for(;;) {
|
||||||
rc = 0;
|
rc = 0;
|
||||||
m_free(answer);
|
m_free(answer);
|
||||||
|
if( have_def_rec ) {
|
||||||
|
answer = def_rec;
|
||||||
|
def_rec = NULL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
answer = cpr_get_utf8("pklist.user_id.enter",
|
answer = cpr_get_utf8("pklist.user_id.enter",
|
||||||
_("Enter the user ID: "));
|
_("Enter the user ID: "));
|
||||||
trim_spaces(answer);
|
trim_spaces(answer);
|
||||||
cpr_kill_prompt();
|
cpr_kill_prompt();
|
||||||
|
}
|
||||||
if( !*answer )
|
if( !*answer )
|
||||||
break;
|
break;
|
||||||
if( pk )
|
if( pk )
|
||||||
@ -628,6 +683,16 @@ build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use )
|
|||||||
if( rc )
|
if( rc )
|
||||||
tty_printf(_("No such user ID.\n"));
|
tty_printf(_("No such user ID.\n"));
|
||||||
else if( !(rc=check_pubkey_algo2(pk->pubkey_algo, use)) ) {
|
else if( !(rc=check_pubkey_algo2(pk->pubkey_algo, use)) ) {
|
||||||
|
if( have_def_rec ) {
|
||||||
|
PK_LIST r = m_alloc( sizeof *r );
|
||||||
|
r->pk = pk; pk = NULL;
|
||||||
|
r->next = pk_list;
|
||||||
|
r->mark = 0;
|
||||||
|
pk_list = r;
|
||||||
|
any_recipients = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
int trustlevel;
|
int trustlevel;
|
||||||
|
|
||||||
rc = check_trust( pk, &trustlevel, NULL, NULL, NULL );
|
rc = check_trust( pk, &trustlevel, NULL, NULL, NULL );
|
||||||
@ -651,12 +716,35 @@ build_pk_list( STRLIST remusr, PK_LIST *ret_pk_list, unsigned use )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
m_free(def_rec); def_rec = NULL;
|
||||||
|
have_def_rec = 0;
|
||||||
|
}
|
||||||
m_free(answer);
|
m_free(answer);
|
||||||
if( pk ) {
|
if( pk ) {
|
||||||
free_public_key( pk );
|
free_public_key( pk );
|
||||||
pk = NULL;
|
pk = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if( !any_recipients && (def_rec = default_recipient()) ) {
|
||||||
|
pk = m_alloc_clear( sizeof *pk );
|
||||||
|
pk->pubkey_usage = use;
|
||||||
|
rc = get_pubkey_byname( NULL, pk, def_rec, NULL );
|
||||||
|
if( rc )
|
||||||
|
log_error(_("unknown default recipient `s'\n"), def_rec );
|
||||||
|
else if( !(rc=check_pubkey_algo2(pk->pubkey_algo, use)) ) {
|
||||||
|
PK_LIST r = m_alloc( sizeof *r );
|
||||||
|
r->pk = pk; pk = NULL;
|
||||||
|
r->next = pk_list;
|
||||||
|
r->mark = 0;
|
||||||
|
pk_list = r;
|
||||||
|
any_recipients = 1;
|
||||||
|
}
|
||||||
|
if( pk ) {
|
||||||
|
free_public_key( pk );
|
||||||
|
pk = NULL;
|
||||||
|
}
|
||||||
|
m_free(def_rec); def_rec = NULL;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
any_recipients = 0;
|
any_recipients = 0;
|
||||||
for(; remusr; remusr = remusr->next ) {
|
for(; remusr; remusr = remusr->next ) {
|
||||||
|
@ -1624,7 +1624,7 @@ update_trustdb()
|
|||||||
ulong count=0, err_count=0, new_count=0;
|
ulong count=0, err_count=0, new_count=0;
|
||||||
|
|
||||||
while( !(rc = enum_keyblocks( 1, &kbpos, &keyblock )) ) {
|
while( !(rc = enum_keyblocks( 1, &kbpos, &keyblock )) ) {
|
||||||
int modified;
|
/*int modified;*/
|
||||||
TRUSTREC drec;
|
TRUSTREC drec;
|
||||||
PKT_public_key *pk = find_kbnode( keyblock, PKT_PUBLIC_KEY )
|
PKT_public_key *pk = find_kbnode( keyblock, PKT_PUBLIC_KEY )
|
||||||
->pkt->pkt.public_key;
|
->pkt->pkt.public_key;
|
||||||
|
@ -9,10 +9,8 @@ DISTCLEANFILES = mpih-add1.S mpih-mul1.S mpih-mul2.S mpih-mul3.S \
|
|||||||
mpih-lshift.S mpih-rshift.S mpih-sub1.S asm-syntax.h sysdep.h
|
mpih-lshift.S mpih-rshift.S mpih-sub1.S asm-syntax.h sysdep.h
|
||||||
CLEANFILES = tmp-*.s
|
CLEANFILES = tmp-*.s
|
||||||
|
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libmpi.la
|
noinst_LTLIBRARIES = libmpi.la
|
||||||
|
|
||||||
|
|
||||||
libmpi_la_LDFLAGS =
|
libmpi_la_LDFLAGS =
|
||||||
libmpi_la_SOURCES = longlong.h \
|
libmpi_la_SOURCES = longlong.h \
|
||||||
mpi-add.c \
|
mpi-add.c \
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
Tue Jun 29 21:44:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
Tue Jul 13 17:39:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
|
|
||||||
|
* de.po: Updated (Walter)
|
||||||
|
|
||||||
|
Tue Jun 29 21:44:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
* it.po: Updated (Marco).
|
* it.po: Updated (Marco).
|
||||||
|
|
||||||
Sat Jun 26 12:15:59 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
Sat Jun 26 12:15:59 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user