summaryrefslogtreecommitdiff
path: root/lib/opencdk
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-30 22:04:37 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-30 22:04:46 +0100
commit0c081da36e6bd14daf2e9471a330678e32cdf3ce (patch)
treef42a844104f2f33da5282f7157d9877480af0b97 /lib/opencdk
parent26ec6f40ae4856e20e2b28119ed4afd73b320af0 (diff)
downloadgnutls-0c081da36e6bd14daf2e9471a330678e32cdf3ce.tar.gz
Correct export of openpgp packets that have no private keying material in it's primary key.
Patch by Sean Buckheister.
Diffstat (limited to 'lib/opencdk')
-rw-r--r--lib/opencdk/write-packet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/opencdk/write-packet.c b/lib/opencdk/write-packet.c
index 9fb9de9625..d698af4ccc 100644
--- a/lib/opencdk/write-packet.c
+++ b/lib/opencdk/write-packet.c
@@ -487,6 +487,9 @@ calc_s2ksize (cdk_pkt_seckey_t sk)
case CDK_S2K_ITERSALTED:
nbytes = 11;
break;
+ case CDK_S2K_GNU_EXT:
+ nbytes = 2;
+ break;
}
nbytes += sk->protect.ivlen;
nbytes++; /* single cipher byte */