1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-29 02:22:45 +02:00

See ChangeLog: Sun Dec 19 15:22:26 CET 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-12-19 14:23:19 +00:00
parent 52f9bafcf7
commit b7a2f83141
18 changed files with 116 additions and 38 deletions

3
NEWS
View File

@ -1,3 +1,6 @@
* Some fixes for the W32 version
Noteworthy changes in version 1.0.1 (1999-12-16)
-----------------------------------

3
TODO
View File

@ -1,4 +1,7 @@
* don't allow certain commands in the edit menu when the secret key is
selected.
Scheduled for 1.1
-----------------
* With option -i prompt before adding a key to the keyring and show some

View File

@ -1 +1 @@
1.0.1
1.0.1a

View File

@ -1491,9 +1491,9 @@ is *very* easy to spy out your passphrase!
On many systems this program should be installed as setuid(root). This
is necessary to lock memory pages. Locking memory pages prevents the
operating system from writing memory pages to disk. If you get no
warning message about insecure memory your operating system supports
warning message about insecure memory then your operating system supports
locking without being root. The program drops root privileges as soon
as locked memory is allocated.
as the locked memory is allocated.
</para>
</refsect1>

View File

@ -1,3 +1,20 @@
Sun Dec 19 15:22:26 CET 1999 Werner Koch <wk@gnupg.de>
* armor.c (LF): Use this new macro at all places where a line LF
is needed. This way DOSish textfiles should be created when the
input data is also in dos mode.
* sign.c (LF): Ditto.
* textfilter.c (LF): Ditto.
(copy_clearsig_text): Disabled the forcing of CR,LF sequences
for DOS systems.
* plaintext.c (handle_plaintext): Fixes for line endings on DOS.
and react on a LF in cleartext.
* armor.c (fake_packet): Restore the original line ending after
removing trailing spaces.
* signal.c (got_fatal_signal): DOS fix.
Thu Dec 16 10:07:58 CET 1999 Werner Koch <wk@gnupg.de>
* mainproc.c (print_failed_pkenc): Fix for unknown algorithm.

View File

@ -37,6 +37,11 @@
#include "status.h"
#include "i18n.h"
#ifdef HAVE_DOSISH_SYSTEM
#define LF "\r\n"
#else
#define LF "\n"
#endif
#define MAX_LINELEN 20000
@ -485,13 +490,26 @@ fake_packet( armor_filter_context_t *afx, IOBUF a,
if( !maxlen )
afx->truncated++;
if( !afx->not_dash_escaped ) {
int crlf;
p = afx->buffer;
n = afx->buffer_len;
crlf = n > 1 && p[n-2] == '\r' && p[n-1]=='\n';
/* PGP2 does not treat a tab as white space character */
afx->buffer_len =
trim_trailing_chars( afx->buffer, afx->buffer_len,
afx->buffer_len = trim_trailing_chars( p, n,
afx->pgp2mode ? " \r\n" : " \t\r\n");
/* the buffer is always allocated with enough space to append
* a CR, LF, Nul */
afx->buffer[afx->buffer_len++] = '\r';
* the removed [CR], LF and a Nul
* The reason for this complicated procedure is to keep at least
* the original tupe of lineending - handling of the removed
* trailing spaces seems to be impossible in our method
* of faking a packet; either we have to use a temporary file
* or calculate the hash here in this module and somehow find
* a way to send the hash down the processing line (well, a special
* faked packet could do the job).
*/
if( crlf )
afx->buffer[afx->buffer_len++] = '\r';
afx->buffer[afx->buffer_len++] = '\n';
afx->buffer[afx->buffer_len] = 0;
}
@ -880,10 +898,10 @@ armor_filter( void *opaque, int control,
log_bug("afx->what=%d", afx->what);
iobuf_writestr(a, "-----");
iobuf_writestr(a, head_strings[afx->what] );
iobuf_writestr(a, "-----\n");
iobuf_writestr(a, "-----" LF );
if( !opt.no_version )
iobuf_writestr(a, "Version: GnuPG v" VERSION " ("
PRINTABLE_OS_NAME ")\n");
PRINTABLE_OS_NAME ")" LF );
if( opt.comment_string ) {
const char *s = opt.comment_string;
@ -899,15 +917,15 @@ armor_filter( void *opaque, int control,
else
iobuf_put(a, *s );
}
iobuf_put(a, '\n' );
iobuf_writestr(a, LF );
}
}
else
iobuf_writestr(a,
"Comment: For info see http://www.gnupg.org\n");
"Comment: For info see http://www.gnupg.org" LF);
if( afx->hdrlines )
iobuf_writestr(a, afx->hdrlines);
iobuf_put(a, '\n');
iobuf_writestr(a, LF );
afx->status++;
afx->idx = 0;
afx->idx2 = 0;
@ -936,7 +954,7 @@ armor_filter( void *opaque, int control,
c = bintoasc[radbuf[2]&077];
iobuf_put(a, c);
if( ++idx2 >= (64/4) ) { /* pgp doesn't like 72 here */
iobuf_put(a, '\n');
iobuf_writestr(a, LF );
idx2=0;
}
}
@ -980,13 +998,13 @@ armor_filter( void *opaque, int control,
iobuf_put(a, '=');
}
if( ++idx2 >= (64/4) ) { /* pgp doesn't like 72 here */
iobuf_put(a, '\n');
iobuf_writestr(a, LF );
idx2=0;
}
}
/* may need a linefeed */
if( idx2 )
iobuf_put(a, '\n');
iobuf_writestr(a, LF );
/* write the CRC */
iobuf_put(a, '=');
radbuf[0] = crc >>16;
@ -1006,7 +1024,7 @@ armor_filter( void *opaque, int control,
log_bug("afx->what=%d", afx->what);
iobuf_writestr(a, "-----");
iobuf_writestr(a, tail_strings[afx->what] );
iobuf_writestr(a, "-----\n");
iobuf_writestr(a, "-----" LF );
}
else if( !afx->any_data && !afx->inp_bypass ) {
log_error(_("no valid OpenPGP data found.\n"));

View File

@ -107,8 +107,10 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
}
if( mfx->md )
md_putc(mfx->md, c );
if( c == '\r' )
continue; /* fixme: this hack might be too simple */
#ifndef HAVE_DOSISH_SYSTEM
if( c == '\r' ) /* convert to native line ending */
continue; /* fixme: this hack might be too simple */
#endif
if( fp ) {
if( putc( c, fp ) == EOF ) {
log_error("Error writing to `%s': %s\n",
@ -152,8 +154,10 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
while( (c = iobuf_get(pt->buf)) != -1 ) {
if( mfx->md )
md_putc(mfx->md, c );
#ifndef HAVE_DOSISH_SYSTEM
if( convert && c == '\r' )
continue; /* fixme: this hack might be too simple */
#endif
if( fp ) {
if( putc( c, fp ) == EOF ) {
log_error("Error writing to `%s': %s\n",
@ -169,10 +173,10 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
int eof;
for( eof=0; !eof; ) {
/* Why do we check for len < 32768:
* If we won´ we would practically read 2 EOFS but
* If we won't, we would practically read 2 EOFs but
* the first one has already popped the block_filter
* off and therefore we don't catch the boundary.
* Always assume EOF if iobuf_read returns less bytes
* So, always assume EOF if iobuf_read returns less bytes
* then requested */
int len = iobuf_read( pt->buf, buffer, 32768 );
if( len == -1 )
@ -217,6 +221,8 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
if( !state ) {
if( c == '\r' )
state = 1;
else if( c == '\n' )
state = 2;
else
md_putc(mfx->md, c );
}

View File

@ -39,6 +39,12 @@
#include "i18n.h"
#ifdef HAVE_DOSISH_SYSTEM
#define LF "\r\n"
#else
#define LF "\n"
#endif
/****************
* Create a notation. It is assumed that the stings in STRLIST
@ -582,7 +588,7 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
else if( (rc = open_outfile( fname, 1, &out )) )
goto leave;
iobuf_writestr(out, "-----BEGIN PGP SIGNED MESSAGE-----\n" );
iobuf_writestr(out, "-----BEGIN PGP SIGNED MESSAGE-----" LF );
for( sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next ) {
PKT_secret_key *sk = sk_rover->sk;

View File

@ -53,7 +53,6 @@ static RETSIGTYPE
got_fatal_signal( int sig )
{
const char *s;
struct sigaction nact;
if( caught_fatal_sig )
raise( sig );
@ -67,11 +66,15 @@ got_fatal_signal( int sig )
s = get_signal_name(sig); write(2, s, strlen(s) );
write(2, " caught ... exiting\n", 21 );
/* reset action to default action and raise signal again */
nact.sa_handler = SIG_DFL;
sigemptyset( &nact.sa_mask );
nact.sa_flags = 0;
sigaction( sig, &nact, NULL);
#ifndef HAVE_DOSISH_SYSTEM
{ /* reset action to default action and raise signal again */
struct sigaction nact;
nact.sa_handler = SIG_DFL;
sigemptyset( &nact.sa_mask );
nact.sa_flags = 0;
sigaction( sig, &nact, NULL);
}
#endif
raise( sig );
}

View File

@ -32,6 +32,11 @@
#include "filter.h"
#include "i18n.h"
#ifdef HAVE_DOSISH_SYSTEM
#define LF "\r\n"
#else
#define LF "\n"
#endif
#define MAX_LINELEN 19995 /* a little bit smaller than in armor.c */
/* to make sure that a warning is displayed while */
@ -183,7 +188,14 @@ copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
iobuf_put( out, '-' );
iobuf_put( out, ' ' );
}
#ifdef __MINGW32__
#if 0 /*defined(HAVE_DOSISH_SYSTEM)*/
/* We don't use this anymore because my interpretation of rfc2440 7.1
* is that there is no conversion needed. If one decides to
* clearsign a unix file on a DOS box he will get a mixed line endings.
* If at some point it turns out, that a conversion is a nice feature
* we can make an option out of it.
*/
/* make sure the lines do end in CR,LF */
if( n > 1 && ( (buffer[n-2] == '\r' && buffer[n-1] == '\n' )
|| (buffer[n-2] == '\n' && buffer[n-1] == '\r'))) {
@ -206,10 +218,7 @@ copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
/* at eof */
if( !pending_lf ) { /* make sure that the file ends with a LF */
#ifndef __MINGW32__
iobuf_put( out, '\r');
#endif
iobuf_put( out, '\n');
iobuf_writestr( out, LF );
if( !escape_dash )
md_putc( md, '\n' );
}

View File

@ -1,3 +1,8 @@
Sun Dec 19 15:22:26 CET 1999 Werner Koch <wk@gnupg.de>
* power/ : Converted more comments to C comments because some AS
complain about ' in comments.
Thu Dec 16 10:07:58 CET 1999 Werner Koch <wk@gnupg.de>
* Makefile.am: c/SFLAGS/ASFLAGS/. This has only been used by the

View File

@ -22,12 +22,13 @@
#include "sysdep.h"
#include "asm-syntax.h"
/*
# INPUT PARAMETERS
# res_ptr r3
# s1_ptr r4
# s2_ptr r5
# size r6
*/
.toc
.extern mpihelp_add_n[DS]

View File

@ -22,12 +22,13 @@
#include "sysdep.h"
#include "asm-syntax.h"
/*
# INPUT PARAMETERS
# res_ptr r3
# s_ptr r4
# size r5
# cnt r6
*/
.toc
.extern mpihelp_lshift[DS]

View File

@ -23,6 +23,7 @@
#include "sysdep.h"
#include "asm-syntax.h"
/*
# INPUT PARAMETERS
# res_ptr r3
# s1_ptr r4
@ -38,6 +39,7 @@
# iteration, so we have to compute the compensation carefully (the natural,
# srai+and doesn't work). Since the POWER architecture has a branch unit
# we can branch in zero cycles, so that's how we perform the additions.
*/
.toc
.csect .mpihelp_mul_1[PR]

View File

@ -25,7 +25,7 @@
/*
# INPUT PARAMETERS
# res_ptr r3
# s1_ptr r4
@ -41,6 +41,7 @@
# iteration, so we have to compute the compensation carefully (the natural,
# srai+and doesn't work). Since the POWER architecture has a branch unit
# we can branch in zero cycles, so that's how we perform the additions.
*/
.toc
.csect .mpihelp_addmul_1[PR]

View File

@ -24,7 +24,7 @@
#include "asm-syntax.h"
/*
# INPUT PARAMETERS
# res_ptr r3
@ -41,6 +41,7 @@
# iteration, so we have to compute the compensation carefully (the natural,
# srai+and doesn't work). Since the POWER architecture has a branch unit
# we can branch in zero cycles, so that's how we perform the additions.
*/
.toc
.csect .mpihelp_submul_1[PR]

View File

@ -23,12 +23,13 @@
#include "asm-syntax.h"
/*
# INPUT PARAMETERS
# res_ptr r3
# s_ptr r4
# size r5
# cnt r6
*/
.toc
.extern mpihelp_rshift[DS]

View File

@ -22,12 +22,13 @@
#include "sysdep.h"
#include "asm-syntax.h"
/*
# INPUT PARAMETERS
# res_ptr r3
# s1_ptr r4
# s2_ptr r5
# size r6
*/
.toc
.extern mpihelp_sub_n[DS]