1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-07 23:27:48 +02:00

2002-06-05 Timo Schulz <ts@winpt.org>

* encode.c (encode_simple): Ignore the new mode for RFC1991.
        * mainproc.c (symkey_sesskey_decrypt): Better check for weird
        keysizes.
This commit is contained in:
Timo Schulz 2002-06-05 13:48:41 +00:00
parent 8bd4025def
commit fa73dd2052
3 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-06-05 Timo Schulz <ts@winpt.org>
* encode.c (encode_simple): Ignore the new mode for RFC1991.
* mainproc.c (symkey_decrypt_sesskey): Better check for weird
keysizes.
2002-06-05 Timo Schulz <ts@winpt.org>
* encode.c (encode_sesskey): New.

View File

@ -135,6 +135,12 @@ encode_simple( const char *filename, int mode, int compat )
if( opt.textmode )
iobuf_push_filter( inp, text_filter, &tfx );
/* Due the the fact that we use don't use an IV to encrypt the
session key we can't use the new mode with RFC1991 because
it has no S2K salt. RFC1991 always uses simple S2K. */
if ( opt.rfc1991 && !compat )
compat = 1;
cfx.dek = NULL;
if( mode ) {
s2k = m_alloc_clear( sizeof *s2k );

View File

@ -242,7 +242,7 @@ symkey_decrypt_sesskey( DEK *dek, byte *sesskey, size_t slen )
{
CIPHER_HANDLE hd;
if ( slen > 33 ) {
if ( slen < 17 || slen > 33 ) {
log_error( "weird size for an encrypted session key (%d)\n", slen );
return;
}