diff -r 221f3eb76b52 src/pkg/crypto/openpgp/packet/signature.go
--- a/src/pkg/crypto/openpgp/packet/signature.go Thu Nov 24 08:51:47 2011 -0800
-+++ b/src/pkg/crypto/openpgp/packet/signature.go Wed Nov 30 21:54:03 2011 +0100
++++ b/src/pkg/crypto/openpgp/packet/signature.go Wed Nov 30 23:44:34 2011 +0100
@@ -163,7 +163,7 @@
const (
creationTimeSubpacket signatureSubpacketType = 2
subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, false, creationTime})
if sig.IssuerKeyId != nil {
-@@ -553,5 +550,56 @@
+@@ -553,5 +550,59 @@
subpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, false, keyId})
}
+ if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 {
+ sigLifetime := make([]byte, 4)
+ binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs)
-+ subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, false, sigLifetime})
++ // signature expiration is marked as critical
++ subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime})
+ }
+
+ // The following subpackets may only appear in self-signatures
+ if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 {
+ keyLifetime := make([]byte, 4)
+ binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs)
-+ subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, false, keyLifetime})
++ // TODO:
++ // key expiration is marked as critical
++ subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime})
+ }
+
+ if sig.IsPrimaryId != nil && *sig.IsPrimaryId {