1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-18 14:17:03 +01:00

See ChangeLog: Fri Jul 28 18:19:11 CEST 2000 Werner Koch

This commit is contained in:
Werner Koch 2000-07-28 16:19:07 +00:00
parent b872ea2577
commit d81c3f733b
12 changed files with 163 additions and 24 deletions

81
NEWS
View File

@ -1,6 +1,87 @@
Noteworthy changes in the current CVS HEAD
------------------------------------------
* Removed option --emulate-checksum-bug * Removed option --emulate-checksum-bug
* Fixed expiration handling of encryption keys.
* Add an experimental feature to do unattended key generation.
* The user is now asked for the reason of revocation as required
by the new OpenPGP draft.
* There is a ~/.gnupg/random_seed file now which saves the
state of the internal RNG and increases system performance
somewhat. This way the full entropy source is only used in
cases were it is really required.
Use the option --no-random-seed-file to disable this feature.
* New options --ignore-time-conflict and --lock-never.
* Some fixes for the W32 version.
* The entropy.dll is not anymore used by the W32 version but replaced
by code derived from Cryptlib.
* Encryption is now much faster: About 2 times for 1k bit keys
and 8 times for 4k keys.
* New encryption keys are generated in a way which allows a much
faster decryption.
* New command --export-secret-subkeys which outputs the
the _primary_ key with it's secret parts deleted. This is
useful for automated decryption/signature creation as it
allows to keep the real secret primary key offline and
thereby protecting the key certificates and allowing to
create revocations for the subkeys. See the FAQ for a
procedure to install such secret keys.
* Keygeneration now writes to the first writeable keyring or
as default to the one in the homedirectory. Prior versions
ignored all --keyring options.
* New option --command-fd to take user input from a file descriptor;
to be used with --status-fd by software which uses GnuPG as a backend.
* There is a new status PROGRESS which is used to show progress during
key generation.
* Support for the new MDC encryption packets. To create them either
--force-mdc must be use or cipher algorithm with a blocksize other
than 64 bits is to be used. --openpgp currently disables MDC packets
entirely. This option should not yet be used.
* New option --no-auto-key-retrieve to disable retrieving of
a missing public key from a keyerver, when a keyerver has been set.
* New command --verify-files. New option --fast-list-mode.
* $http_proxy is now used when --honor-http-proxy is set.
* Fixed some minor bugs and the problem with conventional encrypted
packets which did use the gpg v3 partial length headers.
* Some more translations.
* Fixed a bug with symmetric-only encryption using the non-default 3DES.
The option --emulate-3des-s2k-bug may be used to decrypt documents
which have been encrypted this way; this should be done immediately
as this workaround will be remove in 1.1
* Can now handle (but not display) PGP's photo IDs. I don't know the
format of that packet but after stripping a few bytes from the start
it looks like a JPEG (at least my test data). Handling of this
package is required because otherwise it would mix up the
self signatures and you can't import those keys.
* Passing non-ascii user IDs on the commandline should now work in all
cases.
* New keys are now generated with an additional preference to Blowfish.
* Removed the GNU Privacy Handbook from the distribution because it
is now in the package GPH.
Noteworthy changes in version 1.1.0 (1999-10-26) Noteworthy changes in version 1.1.0 (1999-10-26)

View File

@ -29,6 +29,7 @@ exp_files=""
LANG= LANG=
LANGUAGE= LANGUAGE=
LC_ALL= LC_ALL=
LC_MESSAGES=
#-------------------------------- #--------------------------------
#------ utility functions ------- #------ utility functions -------
@ -105,5 +106,6 @@ no-greeting
no-secmem-warning no-secmem-warning
load-extension ../cipher/tiger load-extension ../cipher/tiger
batch batch
emulate-md-encode-bug
EOF EOF

View File

@ -701,16 +701,9 @@ sexp_to_key( GCRY_SEXP sexp, int want_private, MPI **retarray, int *retalgo)
:"public-key", 0 ); :"public-key", 0 );
if( !list ) if( !list )
return GCRYERR_INV_OBJ; /* Does not contain a public- or private-key object */ return GCRYERR_INV_OBJ; /* Does not contain a public- or private-key object */
l2 = gcry_sexp_cdr( list ); l2 = gcry_sexp_cadr( list );
gcry_sexp_release ( list ); gcry_sexp_release ( list );
list = l2; list = l2;
if( !list )
return GCRYERR_NO_OBJ; /* no cdr for the key object */
l2 = gcry_sexp_car( list );
gcry_sexp_release ( list );
list = l2;
if( !list )
return GCRYERR_NO_OBJ; /* no car for the key object */
name = gcry_sexp_car_data( list, &n ); name = gcry_sexp_car_data( list, &n );
if( !name ) { if( !name ) {
gcry_sexp_release ( list ); gcry_sexp_release ( list );
@ -873,7 +866,7 @@ sexp_to_enc( GCRY_SEXP sexp, MPI **retarray, int *retalgo)
list = gcry_sexp_find_token( sexp, "enc-val" , 0 ); list = gcry_sexp_find_token( sexp, "enc-val" , 0 );
if( !list ) if( !list )
return GCRYERR_INV_OBJ; /* Does not contain a encrypted value object */ return GCRYERR_INV_OBJ; /* Does not contain a encrypted value object */
l2 = gcry_sexp_cdr( list ); l2 = gcry_sexp_cadr( list );
gcry_sexp_release ( list ); gcry_sexp_release ( list );
list = l2; list = l2;
if( !list ) { if( !list ) {
@ -1332,7 +1325,7 @@ gcry_pk_genkey( GCRY_SEXP *r_key, GCRY_SEXP s_parms )
list = gcry_sexp_find_token( s_parms, "genkey", 0 ); list = gcry_sexp_find_token( s_parms, "genkey", 0 );
if( !list ) if( !list )
return GCRYERR_INV_OBJ; /* Does not contain genkey data */ return GCRYERR_INV_OBJ; /* Does not contain genkey data */
l2 = gcry_sexp_cdr( list ); l2 = gcry_sexp_cadr( list );
gcry_sexp_release ( list ); gcry_sexp_release ( list );
list = l2; list = l2;
if( !list ) if( !list )
@ -1402,7 +1395,7 @@ gcry_pk_genkey( GCRY_SEXP *r_key, GCRY_SEXP s_parms )
/* build the string */ /* build the string */
nelem = 0; nelem = 0;
string = p = g10_xmalloc ( needed ); string = p = g10_xmalloc ( needed );
p = stpcpy ( p, "(key-data(" ); p = stpcpy ( p, "(key-data" );
p = stpcpy ( p, "(public-key(" ); p = stpcpy ( p, "(public-key(" );
p = stpcpy ( p, algo_name ); p = stpcpy ( p, algo_name );
@ -1412,7 +1405,7 @@ gcry_pk_genkey( GCRY_SEXP *r_key, GCRY_SEXP s_parms )
p = stpcpy ( p, "%m)" ); p = stpcpy ( p, "%m)" );
mpis[nelem++] = skey[i]; mpis[nelem++] = skey[i];
} }
strcpy ( p, "))" ); p = stpcpy ( p, "))" );
p = stpcpy ( p, "(private-key(" ); p = stpcpy ( p, "(private-key(" );
p = stpcpy ( p, algo_name ); p = stpcpy ( p, algo_name );
@ -1422,14 +1415,14 @@ gcry_pk_genkey( GCRY_SEXP *r_key, GCRY_SEXP s_parms )
p = stpcpy ( p, "%m)" ); p = stpcpy ( p, "%m)" );
mpis[nelem++] = skey[i]; mpis[nelem++] = skey[i];
} }
strcpy ( p, "))" ); p = stpcpy ( p, "))" );
p = stpcpy ( p, "(misc-key-info(pm1-factors" ); p = stpcpy ( p, "(misc-key-info(pm1-factors" );
for(i=0; factors[i]; i++ ) { for(i=0; factors[i]; i++ ) {
p = stpcpy ( p, "%m" ); p = stpcpy ( p, "%m" );
mpis[nelem++] = factors[i]; mpis[nelem++] = factors[i];
} }
strcpy ( p, "))" ); strcpy ( p, ")))" );
while ( nelem < DIM(mpis) ) while ( nelem < DIM(mpis) )
mpis[nelem++] = NULL; mpis[nelem++] = NULL;
@ -1439,6 +1432,7 @@ gcry_pk_genkey( GCRY_SEXP *r_key, GCRY_SEXP s_parms )
* we have. which normally should be no problem as only those * we have. which normally should be no problem as only those
* with a corresponding %m are used * with a corresponding %m are used
*/ */
log_debug ("retstr=`%s'\n", string);
if ( gcry_sexp_build ( r_key, NULL, string, if ( gcry_sexp_build ( r_key, NULL, string,
mpis[0], mpis[1], mpis[2], mpis[3], mpis[4], mpis[5], mpis[0], mpis[1], mpis[2], mpis[3], mpis[4], mpis[5],
mpis[6], mpis[7], mpis[8], mpis[9], mpis[10], mpis[11], mpis[6], mpis[7], mpis[8], mpis[9], mpis[10], mpis[11],
@ -1447,7 +1441,7 @@ gcry_pk_genkey( GCRY_SEXP *r_key, GCRY_SEXP s_parms )
mpis[24], mpis[25], mpis[26], mpis[27], mpis[28], mpis[29] mpis[24], mpis[25], mpis[26], mpis[27], mpis[28], mpis[29]
) ) ) )
BUG (); BUG ();
assert ( DIM(mpis) == 29 ); assert ( DIM(mpis) == 30 );
g10_free ( string ); g10_free ( string );
} }
release_mpi_array ( skey ); release_mpi_array ( skey );

View File

@ -1,3 +1,11 @@
Fri Jul 28 18:19:11 CEST 2000 Werner Koch <wk@openit.de>
* sig-check.c (pk_verify): Fixed the S-Exp withe the pkey.
* gpg.c (main): Use setmode(O_BINARY) for MSDOS while generating random bytes
(print_mds): Likewise for stdin.
* plaintext.c (handle_plaintext): Likewise for stdout.
Tue Jul 25 17:44:15 CEST 2000 Werner Koch <wk@openit.de> Tue Jul 25 17:44:15 CEST 2000 Werner Koch <wk@openit.de>
* keyedit.c (menu_expire): expire date for primary key can be set again. * keyedit.c (menu_expire): expire date for primary key can be set again.

View File

@ -25,6 +25,9 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include <unistd.h> #include <unistd.h>
#ifdef HAVE_DOSISH_SYSTEM
#include <fcntl.h> /* for setmode() */
#endif
#include <gcrypt.h> #include <gcrypt.h>
@ -1449,6 +1452,9 @@ main( int argc, char **argv )
size_t n = !endless && count < 100? count : 100; size_t n = !endless && count < 100? count : 100;
p = gcry_random_bytes( n, level ); p = gcry_random_bytes( n, level );
#ifdef HAVE_DOSISH_SYSTEM
setmode ( fileno(stdout), O_BINARY );
#endif
fwrite( p, n, 1, stdout ); fwrite( p, n, 1, stdout );
gcry_free(p); gcry_free(p);
if( !endless ) if( !endless )
@ -1676,6 +1682,9 @@ print_mds( const char *fname, int algo, const char *key )
if( !fname ) { if( !fname ) {
fp = stdin; fp = stdin;
#ifdef HAVE_DOSISH_SYSTEM
setmode ( fileno(fp) , O_BINARY );
#endif
pname = gcry_xstrdup("[stdin]: "); pname = gcry_xstrdup("[stdin]: ");
} }
else { else {

View File

@ -254,7 +254,7 @@ key_from_sexp( GCRY_MPI *array,
list = gcry_sexp_find_token( sexp, topname, 0 ); list = gcry_sexp_find_token( sexp, topname, 0 );
if( !list ) if( !list )
return GCRYERR_INV_OBJ; return GCRYERR_INV_OBJ;
l2 = gcry_sexp_cdr( list ); l2 = gcry_sexp_cadr( list );
gcry_sexp_release ( list ); gcry_sexp_release ( list );
list = l2; list = l2;
if( !list ) if( !list )
@ -311,6 +311,7 @@ factors_from_sexp( MPI **retarray, GCRY_SEXP sexp )
if( !list ) if( !list )
return GCRYERR_NO_OBJ; return GCRYERR_NO_OBJ;
#if 0
/* count factors */ /* count factors */
ctx = NULL; ctx = NULL;
for( n=0; (l2 = gcry_sexp_enum( list, &ctx, 0 )); n++ ) for( n=0; (l2 = gcry_sexp_enum( list, &ctx, 0 )); n++ )
@ -337,6 +338,10 @@ factors_from_sexp( MPI **retarray, GCRY_SEXP sexp )
} }
} }
} }
#else
array = gcry_xcalloc( 1, sizeof *array );
#warning dummy code here
#endif
gcry_sexp_release ( list ); gcry_sexp_release ( list );
*retarray = array; *retarray = array;

View File

@ -24,6 +24,10 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#ifdef HAVE_DOSISH_SYSTEM
#include <fcntl.h> /* for setmode() */
#endif
#include "util.h" #include "util.h"
#include <gcrypt.h> #include <gcrypt.h>
#include "options.h" #include "options.h"
@ -81,6 +85,9 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
else if( !*fname || (*fname=='-' && !fname[1])) { else if( !*fname || (*fname=='-' && !fname[1])) {
/* no filename or "-" given; write to stdout */ /* no filename or "-" given; write to stdout */
fp = stdout; fp = stdout;
#ifdef HAVE_DOSISH_SYSTEM
setmode ( fileno(fp) , O_BINARY );
#endif
} }
else if( !overwrite_filep( fname ) ) { else if( !overwrite_filep( fname ) ) {
rc = GPGERR_CREATE_FILE; rc = GPGERR_CREATE_FILE;

View File

@ -67,7 +67,7 @@ pk_verify( int algo, MPI hash, MPI *data, MPI *pkey,
} }
else if( algo == GCRY_PK_ELG || algo == GCRY_PK_ELG_E ) { else if( algo == GCRY_PK_ELG || algo == GCRY_PK_ELG_E ) {
rc = gcry_sexp_build ( &s_pkey, NULL, rc = gcry_sexp_build ( &s_pkey, NULL,
"(public-key(dsa(p%m)(g%m)(y%m)))", "(public-key(elg(p%m)(g%m)(y%m)))",
pkey[0], pkey[1], pkey[2] ); pkey[0], pkey[1], pkey[2] );
} }
else if( algo == GCRY_PK_RSA ) { else if( algo == GCRY_PK_RSA ) {

View File

@ -1,3 +1,7 @@
Fri Jul 28 18:19:11 CEST 2000 Werner Koch <wk@openit.de>
* mpicoder.c (gcry_mpi_scan): Normalize the returned MPI.
Tue Jul 25 17:44:15 CEST 2000 Werner Koch <wk@openit.de> Tue Jul 25 17:44:15 CEST 2000 Werner Koch <wk@openit.de>
* config.links: Support for powerpc--netbsd by Gabriel Rosenkoetter. * config.links: Support for powerpc--netbsd by Gabriel Rosenkoetter.

View File

@ -355,8 +355,10 @@ gcry_mpi_scan( struct gcry_mpi **ret_mpi, enum gcry_mpi_format format,
else else
mpi_set_buffer( a, s, len, 0 ); mpi_set_buffer( a, s, len, 0 );
} }
if( ret_mpi ) if( ret_mpi ) {
mpi_normalize ( a );
*ret_mpi = a; *ret_mpi = a;
}
else else
mpi_free(a); mpi_free(a);
return 0; return 0;
@ -365,8 +367,10 @@ gcry_mpi_scan( struct gcry_mpi **ret_mpi, enum gcry_mpi_format format,
a = mpi_alloc( (len+BYTES_PER_MPI_LIMB-1) / BYTES_PER_MPI_LIMB ); a = mpi_alloc( (len+BYTES_PER_MPI_LIMB-1) / BYTES_PER_MPI_LIMB );
if( len ) /* not zero */ if( len ) /* not zero */
mpi_set_buffer( a, buffer, len, 0 ); mpi_set_buffer( a, buffer, len, 0 );
if( ret_mpi ) if( ret_mpi ) {
mpi_normalize ( a );
*ret_mpi = a; *ret_mpi = a;
}
else else
mpi_free(a); mpi_free(a);
return 0; return 0;
@ -375,8 +379,10 @@ gcry_mpi_scan( struct gcry_mpi **ret_mpi, enum gcry_mpi_format format,
a = mpi_read_from_buffer( (char*)buffer, &len, 0 ); a = mpi_read_from_buffer( (char*)buffer, &len, 0 );
if( nbytes ) if( nbytes )
*nbytes = len; *nbytes = len;
if( ret_mpi ) if( ret_mpi ) {
mpi_normalize ( a );
*ret_mpi = a; *ret_mpi = a;
}
else else
mpi_free(a); mpi_free(a);
return a? 0 : GCRYERR_INV_OBJ; return a? 0 : GCRYERR_INV_OBJ;
@ -405,8 +411,10 @@ gcry_mpi_scan( struct gcry_mpi **ret_mpi, enum gcry_mpi_format format,
} }
if( nbytes ) if( nbytes )
*nbytes = n+4; *nbytes = n+4;
if( ret_mpi ) if( ret_mpi ) {
mpi_normalize ( a );
*ret_mpi = a; *ret_mpi = a;
}
else else
mpi_free(a); mpi_free(a);
return 0; return 0;
@ -417,8 +425,10 @@ gcry_mpi_scan( struct gcry_mpi **ret_mpi, enum gcry_mpi_format format,
a = mpi_alloc(0); a = mpi_alloc(0);
if( mpi_fromstr( a, buffer ) ) if( mpi_fromstr( a, buffer ) )
return GCRYERR_INV_OBJ; return GCRYERR_INV_OBJ;
if( ret_mpi ) if( ret_mpi ) {
mpi_normalize ( a );
*ret_mpi = a; *ret_mpi = a;
}
else else
mpi_free(a); mpi_free(a);
return 0; return 0;

View File

@ -1,3 +1,10 @@
Fri Jul 28 18:19:11 CEST 2000 Werner Koch <wk@openit.de>
* iobuf.c: Use setmode() at several places to set stdin and stdout
to binary mode for MSDOS based systems
* iobuf.c (underflow): Initialize dummy_len to keep memory checker happy.
Fri Jul 14 19:38:23 CEST 2000 Werner Koch <wk@> Fri Jul 14 19:38:23 CEST 2000 Werner Koch <wk@>
* iobuf.c (iobuf_cancel): Broadcast the new Cancel message to all * iobuf.c (iobuf_cancel): Broadcast the new Cancel message to all

View File

@ -28,6 +28,9 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <gcrypt.h> #include <gcrypt.h>
#ifdef HAVE_DOSISH_SYSTEM
#include <fcntl.h> /* for setmode() */
#endif
#include "memory.h" #include "memory.h"
#include "util.h" #include "util.h"
@ -580,7 +583,10 @@ iobuf_open( const char *fname )
int print_only = 0; int print_only = 0;
if( !fname || (*fname=='-' && !fname[1]) ) { if( !fname || (*fname=='-' && !fname[1]) ) {
fp = stdin; /* fixme: set binary mode for msdoze */ fp = stdin;
#ifdef HAVE_DOSISH_SYSTEM
setmode ( fileno(fp) , O_BINARY );
#endif
fname = "[stdin]"; fname = "[stdin]";
print_only = 1; print_only = 1;
} }
@ -647,6 +653,9 @@ iobuf_create( const char *fname )
if( !fname || (*fname=='-' && !fname[1]) ) { if( !fname || (*fname=='-' && !fname[1]) ) {
fp = stdout; fp = stdout;
#ifdef HAVE_DOSISH_SYSTEM
setmode ( fileno(fp) , O_BINARY );
#endif
fname = "[stdout]"; fname = "[stdout]";
print_only = 1; print_only = 1;
} }
@ -742,7 +751,10 @@ iobuf_fopen( const char *fname, const char *mode )
int print_only = 0; int print_only = 0;
if( !fname || (*fname=='-' && !fname[1]) ) { if( !fname || (*fname=='-' && !fname[1]) ) {
fp = stdin; /* fixme: set binary mode for msdoze */ fp = stdin;
#ifdef HAVE_DOSISH_SYSTEM
setmode ( fileno(fp) , O_BINARY );
#endif
fname = "[stdin]"; fname = "[stdin]";
print_only = 1; print_only = 1;
} }