fix(GODT-2797): encode attached key name and use same pubkey name as web-app.

This commit is contained in:
Jakub
2023-11-23 14:54:20 +01:00
parent e1723fc24b
commit eaba6b6363
2 changed files with 11 additions and 5 deletions

View File

@ -138,7 +138,11 @@ func (s *Service) smtpSendMail(ctx context.Context, authID string, from string,
return fmt.Errorf("failed to get public key: %w", err)
}
parser.AttachPublicKey(pubKey, fmt.Sprintf("publickey - %v - %v", addrKR.GetIdentities()[0].Name, key.GetFingerprint()[:8]))
parser.AttachPublicKey(pubKey, fmt.Sprintf(
"publickey - %v - 0x%v",
addrKR.GetIdentities()[0].Name,
strings.ToUpper(key.GetFingerprint()[:8]),
))
}
// Parse the message we want to send (after we have attached the public key).