return New(DsaKey(r), 0, "Holder of "+issuer, denomination, "")
}
+// Key id (fingerprint)
+func Id(e *openpgp.Entity) string {
+ return fmt.Sprintf("%X", e.PrimaryKey.Fingerprint)
+}
+
// Check the issuer and denomination associated with the given pgp key
func Check(e *openpgp.Entity) (isIssuer bool, issuer, denomination string, err error) {
// allow multiple identities, use the first one that looks like an epoint uid
denomination = id.UserId.Comment
if id.UserId.Name == "Issuer" {
isIssuer = true
- issuer = fmt.Sprintf("%X", e.PrimaryKey.Fingerprint)
+ issuer = Id(e)
return
}
const prefix = "Holder of "