aboutsummaryrefslogtreecommitdiffstats
path: root/g10/build-packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/build-packet.c')
-rw-r--r--g10/build-packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index ca0837f6b..b3831eb32 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -343,7 +343,7 @@ do_secret_key( IOBUF out, int ctb, PKT_secret_key *sk )
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 );
+ iobuf_write(a, sk->protect.iv, sk->protect.ivlen );
}
else {
iobuf_put(a, 0xff );
@@ -355,7 +355,7 @@ do_secret_key( IOBUF out, int ctb, PKT_secret_key *sk )
iobuf_write(a, sk->protect.s2k.salt, 8 );
if( sk->protect.s2k.mode == 3 )
iobuf_put(a, sk->protect.s2k.count );
- iobuf_write(a, sk->protect.iv, 8 );
+ iobuf_write(a, sk->protect.iv, sk->protect.ivlen );
}
}
else