aboutsummaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-06-13 17:00:02 +0000
committerWerner Koch <[email protected]>1998-06-13 17:00:02 +0000
commite662bf708b4f24ec36b4ec8d26e66e4381bddeda (patch)
tree63f6024556241d73918e22ce678ba91a07d24537 /g10/parse-packet.c
parenta whole bunch of internal cleanups (diff)
downloadgnupg-e662bf708b4f24ec36b4ec8d26e66e4381bddeda.tar.gz
gnupg-e662bf708b4f24ec36b4ec8d26e66e4381bddeda.zip
gnupg extension are now working
Diffstat (limited to 'g10/parse-packet.c')
-rw-r--r--g10/parse-packet.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 0ee6e7d37..0cd4238ad 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -972,15 +972,15 @@ parse_certificate( IOBUF inp, int pkttype, unsigned long pktlen,
}
else {
- if( list_mode )
- printf( "\tprotect algo: %d\n",
- cert->protect.algo);
/* old version, we don't have a S2K, so we fake one */
cert->protect.s2k.mode = 0;
/* We need this kludge to cope with old GNUPG versions */
cert->protect.s2k.hash_algo =
cert->protect.algo == CIPHER_ALGO_BLOWFISH160?
DIGEST_ALGO_RMD160 : DIGEST_ALGO_MD5;
+ if( list_mode )
+ printf( "\tprotect algo: %d (hash algo: %d)\n",
+ cert->protect.algo, cert->protect.s2k.hash_algo );
}
if( pktlen < 8 ) {
rc = G10ERR_INVALID_PACKET;
@@ -1176,6 +1176,9 @@ parse_certificate( IOBUF inp, int pkttype, unsigned long pktlen,
}
if( cert->protect.algo == CIPHER_ALGO_BLOWFISH160 )
memcpy(cert->protect.iv, temp, 8 );
+ /* old version, we don't have a S2K, so we fake one */
+ cert->protect.s2k.mode = 0;
+ cert->protect.s2k.hash_algo = DIGEST_ALGO_MD5;
}
else
cert->is_protected = 0;