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.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 );
}