return nil, fmt.Errorf("NewEntity: invalid argument: user id field contained invalid characters")
}
e = &openpgp.Entity{
- PrimaryKey: packet.NewDSAPublicKey(t, &priv.PublicKey, false /* not a subkey */ ),
- PrivateKey: packet.NewDSAPrivateKey(t, priv, false /* not a subkey */ ),
+ PrimaryKey: packet.NewDSAPublicKey(t, &priv.PublicKey),
+ PrivateKey: packet.NewDSAPrivateKey(t, priv),
Identities: make(map[string]*openpgp.Identity),
}
isPrimaryId := true
func Holder(r []byte, issuer, denomination string) (e *openpgp.Entity, err error) {
return New(DsaKey(r), time.Unix(0,0), "Holder of "+issuer, denomination, "")
}
+// Server generates a key for the server from random seed r
+func Server(r []byte) (e *openpgp.Entity, err error) {
+ return New(DsaKey(r), time.Now(), "Server", "", "")
+}
// Key id (fingerprint)
func Id(e *openpgp.Entity) string {