update the codebase to latest go src (time, hash, strconv)
[epoint] / patches / creationtime.diff
diff --git a/patches/creationtime.diff b/patches/creationtime.diff
deleted file mode 100644 (file)
index 452aa61..0000000
+++ /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 {