cloudapi/v2: expose repo metadata verification

This commit is contained in:
Sanne Raymaekers 2023-04-13 16:29:11 +02:00
parent b90f51ff33
commit 14a9b2395d
3 changed files with 68 additions and 57 deletions

View file

@ -1371,6 +1371,9 @@ func genRepoConfig(repo Repository) (*rpmmd.RepoConfig, error) {
if repo.IgnoreSsl != nil {
repoConfig.IgnoreSSL = *repo.IgnoreSsl
}
if repo.CheckRepoGpg != nil {
repoConfig.CheckRepoGPG = *repo.CheckRepoGpg
}
if repoConfig.CheckGPG && len(repoConfig.GPGKeys) == 0 {
return nil, HTTPError(ErrorNoGPGKey)