diff --git a/openpgp/keys_test.go b/openpgp/keys_test.go index 186df735..357f7610 100644 --- a/openpgp/keys_test.go +++ b/openpgp/keys_test.go @@ -998,7 +998,7 @@ func assertNotationPackets(t *testing.T, keys EntityList) { t.Fatalf("got %d Data Notation subpackets, expected %d", numSigs, numExpected) } - if notations[0].HumanReadable != true { + if notations[0].IsHumanReadable != true { t.Fatalf("got false, expected true") } diff --git a/openpgp/packet/notation.go b/openpgp/packet/notation.go index 5c215c2e..f4bd97b2 100644 --- a/openpgp/packet/notation.go +++ b/openpgp/packet/notation.go @@ -5,8 +5,8 @@ package packet type Notation struct { Name string Value []byte - Critical bool - HumanReadable bool + IsCritical bool + IsHumanReadable bool } func (not *Notation) getData() []byte { @@ -15,7 +15,7 @@ func (not *Notation) getData() []byte { valueLen := len(not.Value) data := make([]byte, 8 + nameLen + valueLen) - if not.HumanReadable { + if not.IsHumanReadable { data[0] = 0x80 } diff --git a/openpgp/packet/signature.go b/openpgp/packet/signature.go index 23540111..8cd89026 100644 --- a/openpgp/packet/signature.go +++ b/openpgp/packet/signature.go @@ -380,10 +380,10 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r } notation := Notation{ - HumanReadable: (subpacket[0] & 0x80) == 0x80, + IsHumanReadable: (subpacket[0] & 0x80) == 0x80, Name: string(subpacket[8: (nameLength + 8)]), Value: subpacket[(nameLength + 8) : (valueLength + nameLength + 8)], - Critical: isCritical, + IsCritical: isCritical, } sig.Notations = append(sig.Notations, notation) @@ -964,7 +964,7 @@ func (sig *Signature) buildSubpackets(issuer PublicKey) (subpackets []outputSubp outputSubpacket{ true, notationDataSubpacket, - notation.Critical, + notation.IsCritical, notation.getData(), }) }