aboutsummaryrefslogtreecommitdiffstats
path: root/g10/build-packet.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-08-11 17:29:34 +0000
committerWerner Koch <[email protected]>1998-08-11 17:29:34 +0000
commit3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0 (patch)
treedfff62df60f917addc9df4e83a1ed73e31041bab /g10/build-packet.c
parentrel 0.3.3 (diff)
downloadgnupg-0-3-4.tar.gz
gnupg-0-3-4.zip
bug fix releaseV0-3-4
Diffstat (limited to 'g10/build-packet.c')
-rw-r--r--g10/build-packet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index 6373e0cbd..a7c709302 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -291,7 +291,8 @@ do_secret_key( IOBUF out, int ctb, PKT_secret_key *sk )
for(i=0; i < npkey; i++ )
mpi_write(a, sk->skey[i] );
if( sk->is_protected ) {
- if( is_RSA(sk->pubkey_algo) && sk->version < 4 ) {
+ if( is_RSA(sk->pubkey_algo) && sk->version < 4
+ && !sk->protect.s2k.mode ) {
iobuf_put(a, sk->protect.algo );
iobuf_write(a, sk->protect.iv, 8 );
}