mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
See ChangeLog: Thu May 20 14:04:08 CEST 1999 Werner Koch
This commit is contained in:
parent
bfb32130e5
commit
77d6309e21
4
NEWS
4
NEWS
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
* New option --interactive to prompt before overwriting files.
|
* New option --interactive to prompt before creating files.
|
||||||
|
|
||||||
* Add a work around for a bug in pgp 2 which led to bad signatures
|
* Add some work arounds for a bugs in pgp 2 which led to bad signatures
|
||||||
when used with canoncial texts in some cases.
|
when used with canoncial texts in some cases.
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ more arguments in future versions.
|
|||||||
status lines ere emitted for a good signature.
|
status lines ere emitted for a good signature.
|
||||||
|
|
||||||
SIG_ID <radix64_string> <sig_creation_date>
|
SIG_ID <radix64_string> <sig_creation_date>
|
||||||
This is emitted only for signatures which
|
This is emitted only for signatures of class 0 or 1 which
|
||||||
have been verified okay. The string is a signature id
|
have been verified okay. The string is a signature id
|
||||||
and may be used in applications to detect replay attacks
|
and may be used in applications to detect replay attacks
|
||||||
of signed messages. Note that only DLP algorithms give
|
of signed messages. Note that only DLP algorithms give
|
||||||
|
15
doc/FAQ
15
doc/FAQ
@ -21,7 +21,7 @@
|
|||||||
public key, and he would only be able to decrypt it by having the secret
|
public key, and he would only be able to decrypt it by having the secret
|
||||||
key and putting in the password to use his secret key.
|
key and putting in the password to use his secret key.
|
||||||
|
|
||||||
GNUPG is also useful for signing things. Things that are encrypted with
|
GnuPG is also useful for signing things. Things that are encrypted with
|
||||||
the secret key can be decrypted with the public key. To sign something, a
|
the secret key can be decrypted with the public key. To sign something, a
|
||||||
hash is taken of the data, and then the hash is in some form encoded with
|
hash is taken of the data, and then the hash is in some form encoded with
|
||||||
the secret key. If someone has your public key, they can verify that it
|
the secret key. If someone has your public key, they can verify that it
|
||||||
@ -71,7 +71,7 @@
|
|||||||
readable, just add the '-a' option. But the preferred method is to use
|
readable, just add the '-a' option. But the preferred method is to use
|
||||||
a MIME aware mail reader (Mutt, Pine and many more).
|
a MIME aware mail reader (Mutt, Pine and many more).
|
||||||
|
|
||||||
There is a small security glitch in the OpenPGP (and therefor GNUPG) system;
|
There is a small security glitch in the OpenPGP (and therefore GnuPG) system;
|
||||||
to avoid this you should always sign and encrypt a message instead of only
|
to avoid this you should always sign and encrypt a message instead of only
|
||||||
encrypting it.
|
encrypting it.
|
||||||
|
|
||||||
@ -85,13 +85,13 @@
|
|||||||
"gpg --fingerprint --fingerprint <user ID>".
|
"gpg --fingerprint --fingerprint <user ID>".
|
||||||
|
|
||||||
Q: Why are some signatures with an ELG-E key valid?
|
Q: Why are some signatures with an ELG-E key valid?
|
||||||
A: These are ElGamal Key generated by GNUPG in v3 (rfc1991)
|
A: These are ElGamal Key generated by GnuPG in v3 (rfc1991)
|
||||||
packets. The OpenPGP draft later changed the algorithm
|
packets. The OpenPGP draft later changed the algorithm
|
||||||
identifier for ElGamal keys which are usable for signatures
|
identifier for ElGamal keys which are usable for signatures
|
||||||
and encryption from 16 to 20. GNUPG now uses 20 when it
|
and encryption from 16 to 20. GnuPG now uses 20 when it
|
||||||
generates new ElGamal keys but still accept 16 (which is
|
generates new ElGamal keys but still accept 16 (which is
|
||||||
according to OpenPGP "encryption only") if this key is in
|
according to OpenPGP "encryption only") if this key is in
|
||||||
a v3 packet. GNUPG is the only program which had used
|
a v3 packet. GnuPG is the only program which had used
|
||||||
these v3 ElGamal keys - so this assumption is quite safe.
|
these v3 ElGamal keys - so this assumption is quite safe.
|
||||||
|
|
||||||
Q: Why is PGP 5.x not able to encrypt messages with some keys?
|
Q: Why is PGP 5.x not able to encrypt messages with some keys?
|
||||||
@ -120,11 +120,14 @@
|
|||||||
|
|
||||||
Q: How can I encrypt a message so that pgp 2.x is able to decrypt it?
|
Q: How can I encrypt a message so that pgp 2.x is able to decrypt it?
|
||||||
A: You can't do that because pgp 2.x normally uses IDEA which is not
|
A: You can't do that because pgp 2.x normally uses IDEA which is not
|
||||||
supported by GNUPG because it is patented, but if you have a modified
|
supported by GnuPG because it is patented, but if you have a modified
|
||||||
version of PGP you can try this:
|
version of PGP you can try this:
|
||||||
|
|
||||||
gpg --rfc1991 --cipher-algo 3des ...
|
gpg --rfc1991 --cipher-algo 3des ...
|
||||||
|
|
||||||
|
Please don't pipe the data to encrypt to gpg but give it as a filename;
|
||||||
|
other wise, pgp 2 will not be able to handle it.
|
||||||
|
|
||||||
Q: How can I conventional encrypt a message, so that PGP can decrypt it?
|
Q: How can I conventional encrypt a message, so that PGP can decrypt it?
|
||||||
A: You can't do this for PGP 2. For PGP 5 you should use this:
|
A: You can't do this for PGP 2. For PGP 5 you should use this:
|
||||||
|
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
Thu May 20 14:04:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
|
* misc.c (pull_in_libs): do the volatile only for gcc
|
||||||
|
|
||||||
|
* sig-check (signature_check): Emit SIG_iD only for classes 0 and 1.
|
||||||
|
|
||||||
|
* armor.c (armor_filter): Add detection of PGP2 created clearsigs.
|
||||||
|
(fake_packet): A tab is not a WS for pgp2 - handle this.
|
||||||
|
* textfilter.c (len_without_trailing_chars): New.
|
||||||
|
(copy_clearsig_text): Add pgp2mode arg.
|
||||||
|
* sign.c (clearsign_file): pass old_style to the above fnc.
|
||||||
|
|
||||||
|
|
||||||
Wed May 19 16:04:30 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
Wed May 19 16:04:30 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
* g10.c: New option --interactive.
|
* g10.c: New option --interactive.
|
||||||
|
12
g10/armor.c
12
g10/armor.c
@ -425,9 +425,8 @@ check_input( armor_filter_context_t *afx, IOBUF a )
|
|||||||
|
|
||||||
if( rc )
|
if( rc )
|
||||||
invalid_armor();
|
invalid_armor();
|
||||||
else if( afx->in_cleartext ) {
|
else if( afx->in_cleartext )
|
||||||
afx->faked = 1;
|
afx->faked = 1;
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
afx->inp_checked = 1;
|
afx->inp_checked = 1;
|
||||||
afx->crc = CRCINIT;
|
afx->crc = CRCINIT;
|
||||||
@ -480,7 +479,10 @@ fake_packet( armor_filter_context_t *afx, IOBUF a,
|
|||||||
if( !maxlen )
|
if( !maxlen )
|
||||||
afx->truncated++;
|
afx->truncated++;
|
||||||
if( !afx->not_dash_escaped ) {
|
if( !afx->not_dash_escaped ) {
|
||||||
afx->buffer_len = trim_trailing_ws( afx->buffer, afx->buffer_len );
|
/* PGP2 does not treat a tab as white space character */
|
||||||
|
afx->buffer_len =
|
||||||
|
trim_trailing_chars( afx->buffer, afx->buffer_len,
|
||||||
|
afx->pgp2mode ? " \r\n" : " \t\r\n");
|
||||||
/* the buffer is always allocated with enough space to append
|
/* the buffer is always allocated with enough space to append
|
||||||
* a CR, LF, Nul */
|
* a CR, LF, Nul */
|
||||||
afx->buffer[afx->buffer_len++] = '\r';
|
afx->buffer[afx->buffer_len++] = '\r';
|
||||||
@ -809,8 +811,10 @@ armor_filter( void *opaque, int control,
|
|||||||
* is easy to construct the packets */
|
* is easy to construct the packets */
|
||||||
|
|
||||||
hashes &= 1|2|4|8;
|
hashes &= 1|2|4|8;
|
||||||
if( !hashes )
|
if( !hashes ) {
|
||||||
hashes |= 4; /* default to MD 5 */
|
hashes |= 4; /* default to MD 5 */
|
||||||
|
afx->pgp2mode = 1;
|
||||||
|
}
|
||||||
n=0;
|
n=0;
|
||||||
do {
|
do {
|
||||||
/* first some onepass signature packets */
|
/* first some onepass signature packets */
|
||||||
|
@ -44,6 +44,7 @@ typedef struct {
|
|||||||
int faked; /* we are faking a literal data packet */
|
int faked; /* we are faking a literal data packet */
|
||||||
int truncated; /* number of truncated lines */
|
int truncated; /* number of truncated lines */
|
||||||
int qp_detected;
|
int qp_detected;
|
||||||
|
int pgp2mode;
|
||||||
|
|
||||||
byte *buffer; /* malloced buffer */
|
byte *buffer; /* malloced buffer */
|
||||||
unsigned buffer_size; /* and size of this buffer */
|
unsigned buffer_size; /* and size of this buffer */
|
||||||
@ -119,7 +120,7 @@ int cipher_filter( void *opaque, int control,
|
|||||||
int text_filter( void *opaque, int control,
|
int text_filter( void *opaque, int control,
|
||||||
IOBUF chain, byte *buf, size_t *ret_len);
|
IOBUF chain, byte *buf, size_t *ret_len);
|
||||||
int copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
|
int copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
|
||||||
int escape_dash, int escape_from );
|
int escape_dash, int escape_from, int pgp2mode );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,10 @@ const char *g10m_revision_string(int);
|
|||||||
const char *g10c_revision_string(int);
|
const char *g10c_revision_string(int);
|
||||||
const char *g10u_revision_string(int);
|
const char *g10u_revision_string(int);
|
||||||
|
|
||||||
volatile void
|
#ifdef __GNUC__
|
||||||
|
volatile
|
||||||
|
#endif
|
||||||
|
void
|
||||||
pull_in_libs(void)
|
pull_in_libs(void)
|
||||||
{
|
{
|
||||||
g10m_revision_string(0);
|
g10m_revision_string(0);
|
||||||
|
@ -64,7 +64,7 @@ signature_check( PKT_signature *sig, MD_HANDLE digest )
|
|||||||
|
|
||||||
free_public_key( pk );
|
free_public_key( pk );
|
||||||
|
|
||||||
if( !rc && is_status_enabled() ) {
|
if( !rc && sig->sig_class < 2 && is_status_enabled() ) {
|
||||||
/* This signature id works best with DLP algorithms because
|
/* This signature id works best with DLP algorithms because
|
||||||
* they use a random parameter for every signature. Instead of
|
* they use a random parameter for every signature. Instead of
|
||||||
* this sig-id we could have also used the hash of the document
|
* this sig-id we could have also used the hash of the document
|
||||||
|
@ -548,7 +548,7 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
|
|||||||
}
|
}
|
||||||
/*md_start_debug( textmd, "sign" );*/
|
/*md_start_debug( textmd, "sign" );*/
|
||||||
copy_clearsig_text( out, inp, textmd,
|
copy_clearsig_text( out, inp, textmd,
|
||||||
!opt.not_dash_escaped, opt.escape_from );
|
!opt.not_dash_escaped, opt.escape_from, old_style );
|
||||||
/* fixme: check for read errors */
|
/* fixme: check for read errors */
|
||||||
|
|
||||||
/* now write the armor */
|
/* now write the armor */
|
||||||
|
@ -37,14 +37,14 @@
|
|||||||
/* to make sure that a warning is displayed while */
|
/* to make sure that a warning is displayed while */
|
||||||
/* creating a message */
|
/* creating a message */
|
||||||
|
|
||||||
unsigned
|
static unsigned
|
||||||
len_without_trailing_ws( byte *line, unsigned len )
|
len_without_trailing_chars( byte *line, unsigned len, const char *trimchars )
|
||||||
{
|
{
|
||||||
byte *p, *mark;
|
byte *p, *mark;
|
||||||
unsigned n;
|
unsigned n;
|
||||||
|
|
||||||
for(mark=NULL, p=line, n=0; n < len; n++, p++ ) {
|
for(mark=NULL, p=line, n=0; n < len; n++, p++ ) {
|
||||||
if( strchr(" \t\r\n", *p ) ) {
|
if( strchr( trimchars, *p ) ) {
|
||||||
if( !mark )
|
if( !mark )
|
||||||
mark = p;
|
mark = p;
|
||||||
}
|
}
|
||||||
@ -55,6 +55,12 @@ len_without_trailing_ws( byte *line, unsigned len )
|
|||||||
return mark? (mark - line) : len;
|
return mark? (mark - line) : len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned
|
||||||
|
len_without_trailing_ws( byte *line, unsigned len )
|
||||||
|
{
|
||||||
|
return len_without_trailing_chars( line, len, " \t\r\n" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -136,7 +142,7 @@ text_filter( void *opaque, int control,
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
|
copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
|
||||||
int escape_dash, int escape_from )
|
int escape_dash, int escape_from, int pgp2mode )
|
||||||
{
|
{
|
||||||
unsigned maxlen;
|
unsigned maxlen;
|
||||||
byte *buffer = NULL; /* malloced buffer */
|
byte *buffer = NULL; /* malloced buffer */
|
||||||
@ -163,7 +169,9 @@ copy_clearsig_text( IOBUF out, IOBUF inp, MD_HANDLE md,
|
|||||||
md_putc( md, '\r' );
|
md_putc( md, '\r' );
|
||||||
md_putc( md, '\n' );
|
md_putc( md, '\n' );
|
||||||
}
|
}
|
||||||
md_write( md, buffer, len_without_trailing_ws( buffer, n ) );
|
md_write( md, buffer,
|
||||||
|
len_without_trailing_chars( buffer, n,
|
||||||
|
pgp2mode? " \r\n":" \t\r\n"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
md_write( md, buffer, n );
|
md_write( md, buffer, n );
|
||||||
|
@ -163,6 +163,7 @@ STRLIST strlist_last( STRLIST node );
|
|||||||
const char *memistr( const char *buf, size_t buflen, const char *sub );
|
const char *memistr( const char *buf, size_t buflen, const char *sub );
|
||||||
char *mem2str( char *, const void *, size_t);
|
char *mem2str( char *, const void *, size_t);
|
||||||
char *trim_spaces( char *string );
|
char *trim_spaces( char *string );
|
||||||
|
unsigned trim_trailing_chars( byte *line, unsigned len, const char *trimchars);
|
||||||
unsigned trim_trailing_ws( byte *line, unsigned len );
|
unsigned trim_trailing_ws( byte *line, unsigned len );
|
||||||
int string_count_chr( const char *string, int c );
|
int string_count_chr( const char *string, int c );
|
||||||
int set_native_charset( const char *newset );
|
int set_native_charset( const char *newset );
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Thu May 20 14:04:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
|
* memory.c (membug): Nanu, there was a const instead of a static.
|
||||||
|
|
||||||
|
* strgutil.c (trim_trailing_chars): New.
|
||||||
|
|
||||||
Mon May 17 21:54:43 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
Mon May 17 21:54:43 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||||
|
|
||||||
* logger.c (g10_log_hexdump): Made 2nd arg a const.
|
* logger.c (g10_log_hexdump): Made 2nd arg a const.
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#define EXTRA_ALIGN 0
|
#define EXTRA_ALIGN 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const void membug( const char *fmt, ... );
|
static void membug( const char *fmt, ... );
|
||||||
|
|
||||||
#ifdef M_DEBUG
|
#ifdef M_DEBUG
|
||||||
#ifndef M_GUARD
|
#ifndef M_GUARD
|
||||||
@ -320,7 +320,7 @@ check_allmem( const char *info )
|
|||||||
|
|
||||||
#endif /* M_DEBUG */
|
#endif /* M_DEBUG */
|
||||||
|
|
||||||
const void
|
static void
|
||||||
membug( const char *fmt, ... )
|
membug( const char *fmt, ... )
|
||||||
{
|
{
|
||||||
va_list arg_ptr ;
|
va_list arg_ptr ;
|
||||||
|
@ -213,17 +213,14 @@ trim_spaces( char *str )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/****************
|
|
||||||
* remove trailing white spaces and return the length of the buffer
|
|
||||||
*/
|
|
||||||
unsigned
|
unsigned
|
||||||
trim_trailing_ws( byte *line, unsigned len )
|
trim_trailing_chars( byte *line, unsigned len, const char *trimchars )
|
||||||
{
|
{
|
||||||
byte *p, *mark;
|
byte *p, *mark;
|
||||||
unsigned n;
|
unsigned n;
|
||||||
|
|
||||||
for(mark=NULL, p=line, n=0; n < len; n++, p++ ) {
|
for(mark=NULL, p=line, n=0; n < len; n++, p++ ) {
|
||||||
if( strchr(" \t\r\n", *p ) ) {
|
if( strchr(trimchars, *p ) ) {
|
||||||
if( !mark )
|
if( !mark )
|
||||||
mark = p;
|
mark = p;
|
||||||
}
|
}
|
||||||
@ -238,6 +235,15 @@ trim_trailing_ws( byte *line, unsigned len )
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************
|
||||||
|
* remove trailing white spaces and return the length of the buffer
|
||||||
|
*/
|
||||||
|
unsigned
|
||||||
|
trim_trailing_ws( byte *line, unsigned len )
|
||||||
|
{
|
||||||
|
return trim_trailing_chars( line, len, " \t\r\n" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user