Fix: Looks like a self-signature is valid from its creation

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-04-05 14:47:53 +02:00
parent 7654f8a95b
commit 944f67e402
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

2
gpg.go
View file

@ -70,7 +70,7 @@ func processKey(ctx context.Context, key string) (string, mondash.Status) {
logger.Debugf("%s %#v", n, id)
if id.SelfSignature.KeyLifetimeSecs != nil {
idSelfSigExpiry := e.PrimaryKey.CreationTime.Add(time.Duration(*id.SelfSignature.KeyLifetimeSecs) * time.Second)
idSelfSigExpiry := id.SelfSignature.CreationTime.Add(time.Duration(*id.SelfSignature.KeyLifetimeSecs) * time.Second)
logger.WithField("id", n).Debugf("Selfsig: Identity expires: %s", idSelfSigExpiry)
if s := checkExpiry(idSelfSigExpiry); s != mondash.StatusOK {