rpmmd: add IgnoreSSL key to RepoConfig
This is the opposite of dnf.conf's `sslverify`, because go's default for booleans is always false. This is error prone: we'd like to default to true.
This commit is contained in:
parent
2b42612336
commit
305b2dda5c
3 changed files with 6 additions and 1 deletions
3
dnf-json
3
dnf-json
|
|
@ -29,6 +29,9 @@ def dnfrepo(desc, parent_conf=None):
|
|||
else:
|
||||
assert False
|
||||
|
||||
if desc.get("ignoressl", False):
|
||||
repo.sslverify = False
|
||||
|
||||
return repo
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ type RepoConfig struct {
|
|||
Metalink string `json:"metalink,omitempty"`
|
||||
MirrorList string `json:"mirrorlist,omitempty"`
|
||||
GPGKey string `json:"gpgkey,omitempty"`
|
||||
IgnoreSSL bool `json:"ignoressl"`
|
||||
}
|
||||
|
||||
type PackageList []Package
|
||||
|
|
|
|||
|
|
@ -594,7 +594,7 @@ func NewSourceConfig(repo rpmmd.RepoConfig, system bool) SourceConfig {
|
|||
sc := SourceConfig{
|
||||
Name: repo.Id,
|
||||
CheckGPG: true,
|
||||
CheckSSL: true,
|
||||
CheckSSL: !repo.IgnoreSSL,
|
||||
System: system,
|
||||
}
|
||||
|
||||
|
|
@ -617,6 +617,7 @@ func (s *SourceConfig) RepoConfig() rpmmd.RepoConfig {
|
|||
|
||||
repo.Name = s.Name
|
||||
repo.Id = s.Name
|
||||
repo.IgnoreSSL = !s.CheckSSL
|
||||
|
||||
if s.Type == "yum-baseurl" {
|
||||
repo.BaseURL = s.URL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue