X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=patches%2Fcreationtime.diff;fp=patches%2Fcreationtime.diff;h=0000000000000000000000000000000000000000;hb=f1ab5079added604c2d1f8a043a75613755e3dec;hp=452aa6126f258f2ce944b9f7c9ac5f10eb64c70e;hpb=b7259bc293641fbe83e44d0f886cea52b8816769;p=epoint diff --git a/patches/creationtime.diff b/patches/creationtime.diff deleted file mode 100644 index 452aa61..0000000 --- a/patches/creationtime.diff +++ /dev/null @@ -1,40 +0,0 @@ -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 Fri Dec 02 01:56:00 2011 +0100 -@@ -144,14 +144,21 @@ - // parseSignatureSubpackets parses subpackets of the main signature packet. See - // RFC 4880, section 5.2.3.1. - func parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) { -+ hasCreationTime := false -+ - for len(subpackets) > 0 { -- subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed) -+ var packetType signatureSubpacketType -+ -+ packetType, subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed) - if err != nil { - return - } -+ if packetType == creationTimeSubpacket { -+ hasCreationTime = true -+ } - } - -- if sig.CreationTime == 0 { -+ if isHashed && !hasCreationTime { - err = error_.StructuralError("no creation time in signature") - } - -@@ -173,11 +180,10 @@ - ) - - // parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1. --func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) { -+func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (packetType signatureSubpacketType, rest []byte, err error) { - // RFC 4880, section 5.2.3.1 - var ( - length uint32 -- packetType signatureSubpacketType - isCritical bool - ) - switch {