mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
See ChangeLog: Fri Jul 28 18:19:11 CEST 2000 Werner Koch
This commit is contained in:
parent
b872ea2577
commit
d81c3f733b
12 changed files with 163 additions and 24 deletions
|
@ -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>
|
||||
|
||||
* keyedit.c (menu_expire): expire date for primary key can be set again.
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
#include <fcntl.h> /* for setmode() */
|
||||
#endif
|
||||
|
||||
|
||||
#include <gcrypt.h>
|
||||
|
@ -1449,6 +1452,9 @@ main( int argc, char **argv )
|
|||
size_t n = !endless && count < 100? count : 100;
|
||||
|
||||
p = gcry_random_bytes( n, level );
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
setmode ( fileno(stdout), O_BINARY );
|
||||
#endif
|
||||
fwrite( p, n, 1, stdout );
|
||||
gcry_free(p);
|
||||
if( !endless )
|
||||
|
@ -1676,6 +1682,9 @@ print_mds( const char *fname, int algo, const char *key )
|
|||
|
||||
if( !fname ) {
|
||||
fp = stdin;
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
setmode ( fileno(fp) , O_BINARY );
|
||||
#endif
|
||||
pname = gcry_xstrdup("[stdin]: ");
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -254,7 +254,7 @@ key_from_sexp( GCRY_MPI *array,
|
|||
list = gcry_sexp_find_token( sexp, topname, 0 );
|
||||
if( !list )
|
||||
return GCRYERR_INV_OBJ;
|
||||
l2 = gcry_sexp_cdr( list );
|
||||
l2 = gcry_sexp_cadr( list );
|
||||
gcry_sexp_release ( list );
|
||||
list = l2;
|
||||
if( !list )
|
||||
|
@ -311,6 +311,7 @@ factors_from_sexp( MPI **retarray, GCRY_SEXP sexp )
|
|||
if( !list )
|
||||
return GCRYERR_NO_OBJ;
|
||||
|
||||
#if 0
|
||||
/* count factors */
|
||||
ctx = NULL;
|
||||
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 );
|
||||
*retarray = array;
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
#include <fcntl.h> /* for setmode() */
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
#include <gcrypt.h>
|
||||
#include "options.h"
|
||||
|
@ -81,6 +85,9 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
|||
else if( !*fname || (*fname=='-' && !fname[1])) {
|
||||
/* no filename or "-" given; write to stdout */
|
||||
fp = stdout;
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
setmode ( fileno(fp) , O_BINARY );
|
||||
#endif
|
||||
}
|
||||
else if( !overwrite_filep( fname ) ) {
|
||||
rc = GPGERR_CREATE_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 ) {
|
||||
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] );
|
||||
}
|
||||
else if( algo == GCRY_PK_RSA ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue