Add insert functions for cross-signing signatures

This commit is contained in:
Neil Alexander 2021-07-29 14:47:09 +01:00
parent f1155d26bf
commit d84883d5c4
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 46 additions and 0 deletions

View file

@ -208,8 +208,11 @@ func (a *KeyInternalAPI) crossSigningKeys(
for originKeyID, signature := range forOrigin {
switch {
case req.UserID != "" && originUserID == req.UserID:
// Include signatures that we created
appendSignature(originUserID, originKeyID, signature)
case originUserID == userID:
// Include signatures that were created by the person whose key
// we are processing
appendSignature(originUserID, originKeyID, signature)
}
}